/* Variables CSS */
:root {
    --primary-color: #38bdf8;
    --secondary-color: #0284c7;
    --dark-color: #075985;
    --text-color: #ffffff;
    --transition: all 0.3s ease;
    --glass-bg: rgba(13, 96, 185, 0.35);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-hover: rgba(13, 96, 185, 0.45);
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
}

/* Contenedor principal */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* Fondo animado */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    will-change: transform;
    backface-visibility: hidden;
}

.bg-overlay {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-image: url('images/bg-pattern.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.8;
    animation: backgroundMove 35s ease-in-out infinite alternate;
    z-index: -1;
}

/* Header y Logo */
.header {
    text-align: center;
    margin: 3rem auto;
    max-width: 600px;
    position: relative;
    padding-top: 3rem;
}

.logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 6rem auto 2rem; /* Aumentado a 6rem */
    transition: width 0.3s, height 0.3s;
}

.logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: float 3s ease-in-out infinite;
}

/* Animación de ondas */
.logo-animation {
    position: absolute;
    inset: 0;
}

.wave {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.5);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: rippleOut 2s linear infinite;
}

.wave:nth-child(2) {
    animation-delay: 0.5s;
}

.wave:nth-child(3) {
    animation-delay: 1s;
}

h1 {
    font-size: 2.5rem;
    margin: 1rem 0;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: white;
    text-align: center;
    width: 100%;
    position: relative;
}

/* Welcome Container */
.welcome-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 600px;
    border: 1px solid var(--glass-border);
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.welcome-text {
    width: 100%;
    text-align: center;
    position: relative;
}

.typing-text {
    position: absolute;
    width: 90%;
    max-width: 500px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) translateY(20px);
    text-align: center;
    opacity: 0;
    padding: 0 1rem;
    margin: 0;
}

.typing-text:nth-child(1) {
    animation: fadeInOutCentered 15s infinite 0s;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.typing-text:nth-child(2) {
    animation: fadeInOutCentered 15s infinite 5s;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.typing-text:nth-child(3) {
    animation: fadeInOutCentered 15s infinite 10s;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Servicios */
.services {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem auto;
    max-width: 600px;
}

.service-tag {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    color: white;
}

.service-tag:hover {
    transform: translateY(-2px);
    background: var(--glass-hover);
}

/* Enlaces sociales */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem auto;
    max-width: 600px;
}

.social-button {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-button:hover {
    background: var(--glass-hover);
    transform: translateY(-2px);
}

.location {
    flex-direction: column;
}

.address {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Formulario de contacto */
.contact-section {
    margin: 3rem auto;
    max-width: 600px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--glass-border);
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form button {
    width: 100%;
    padding: 1rem;
    background: var(--glass-bg);
    color: white;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.contact-form button:hover {
    background: var(--glass-hover);
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin: 2rem auto;
    max-width: 600px;
    color: white;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.developer-info {
    margin-top: 1rem;
}

.developer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    margin-top: 0.5rem;
}

.developer-link:hover {
    background: var(--glass-hover);
    transform: translateY(-2px);
}

/* Animaciones */
@keyframes fadeInOutCentered {
    0%, 45%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(20px);
    }
    5%, 40% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes rippleOut {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes backgroundMove {
    0% {
        transform: translate(0, 0) scale(1.1);
        background-position: 0% 0%;
    }
    50% {
        transform: translate(-10px, -10px) scale(1.2);
        background-position: 50% 50%;
    }
    100% {
        transform: translate(0, 0) scale(1.1);
        background-position: 100% 100%;
    }
}

/* Fondo degradado */
body:before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(56, 189, 248, 0.3),
        rgba(2, 132, 199, 0.3),
        rgba(7, 89, 133, 0.3)
    );
    z-index: -1;
}

/* Responsive */
@media (max-width: 640px) {
    .container,
    .header,
    .welcome-container,
    .services,
    .social-links,
    .contact-section,
    footer {
        max-width: calc(100% - 2rem);
        margin-left: auto;
        margin-right: auto;
    }

    .logo-container {
        width: 120px;
        height: 120px;
        margin-top: 4rem; /* Ajustado para móviles */
    }

    h1 {
        font-size: 2rem;
    }

    .service-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Tablet */
@media (min-width: 768px) {
    .logo-container {
        width: 180px;
        height: 180px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .logo-container {
        width: 300px;
        height: 300px;
    }
}