/* Hero y Fondos Fluidos Complejos */
.hero-section { position: relative; height: 65vh; display: flex; flex-direction: column; justify-content: center; padding-left: 10%; } /* Altura reducida y sin overflow hidden */
.hero-title { font-size: 5vw; font-weight: 900; line-height: 1.1; position: relative; z-index: 2;}
.hero-subtitle { font-size: 2.5vw; font-weight: 300; position: relative; z-index: 2;}

/* Fondo fijado a la pantalla para que sea continuo en todo el scroll */
.fluid-bg-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -2 !important; filter: blur(60px); opacity: 0.7; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; animation: fluidMotion 15s infinite alternate ease-in-out; }
.blob-1 { width: 40vw; height: 40vw; background: var(--primary-color); top: 10%; left: 20%; animation-delay: 0s; }
.blob-2 { width: 35vw; height: 35vw; background: var(--secondary-color); top: 30%; right: 10%; animation-delay: -5s; }
.blob-3 { width: 45vw; height: 45vw; background: var(--accent-color); bottom: -10%; left: 30%; animation-delay: -10s; }
@keyframes fluidMotion { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(10vw, 10vh) scale(1.1); } }

/* 1. Ajuste general de dimensiones para que el SVG no se deforme ni ocupe de más */
.nav-logo img {
    height: 38px; /* Puedes ajustar esta altura en píxeles según tu preferencia */
    width: auto;
    display: block;
    transition: transform 0.2s ease;
}

/* Efecto opcional: ligero zoom al pasar el cursor por encima del logo */
.nav-logo:hover img {
    transform: scale(1.04);
}

/* 2. Comportamiento en Modo Claro por defecto */
.nav-logo .logo-light {
    display: block;
}
.nav-logo .logo-dark {
    display: none;
}

/* 3. Comportamiento al activarse el Modo Oscuro */
[data-theme="dark"] .nav-logo .logo-light {
    display: none;
}
[data-theme="dark"] .nav-logo .logo-dark {
    display: block;
}

/* Carrusel Marcas */
.brands-carousel-container { width: 100%; overflow: hidden; padding: 40px 0; background: transparent; }
.brands-track { display: flex; gap: 50px; animation: scrollBrands 20s linear infinite; width: max-content; }

/* --- COMPORTAMIENTO MODO CLARO (Tus estilos originales) --- */
.brand-item { width: 150px; opacity: 0.6; filter: grayscale(100%); transition: 0.3s; display: flex; justify-content: center; align-items: center;}
.brand-item img { max-width: 100%; height: auto; transition: filter 0.3s ease, opacity 0.3s ease; }
.brand-item:hover { opacity: 1; filter: grayscale(0%); }

/* --- COMPORTAMIENTO EXCLUSIVO PARA MODO OSCURO --- */
/* 1. Reseteamos los filtros del modo claro para que no interfieran */
[data-theme="dark"] .brand-item {
    filter: none;
    opacity: 1; 
}

/* 2. Estado por defecto al girar en Modo Oscuro (Blanco claro / translúcido) */
[data-theme="dark"] .brand-item img {
    /* Fuerza a cualquier logo (sea negro o de color) a convertirse en blanco puro */
    filter: brightness(0) invert(1);
    /* Bajamos la opacidad para lograr el efecto de "blanco claro" suavizado con el fondo oscuro */
    opacity: 0.45; 
}

/* 3. Estado al pasar el cursor por encima en Modo Oscuro (Blanco intenso) */
[data-theme="dark"] .brand-item:hover img {
    /* Sube al 100% de opacidad mostrando el color blanco con máxima intensidad */
    opacity: 1; 
}

@keyframes scrollBrands { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Portfolio Desordenado (Ancho completo) */
.portfolio-section { padding: 60px 2%; width: 100%; margin: 0 auto; position: relative; z-index: 2;}
.portfolio-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-bottom: 60px; padding-top: 20px;}
.portfolio-item { width: calc(33.333% - 20px); border-radius: 15px; overflow: hidden; background: #222; transition: transform 0.4s ease; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.portfolio-item:hover img { transform: scale(1.05); }

/* Tamaños y posiciones desordenadas para las pastillas del collage */
.portfolio-item:nth-child(3n+1) { aspect-ratio: 4/5; transform: translateY(30px); }
.portfolio-item:nth-child(3n+2) { aspect-ratio: 1/1; transform: translateY(-20px); }
.portfolio-item:nth-child(3n)   { aspect-ratio: 16/9; transform: translateY(15px); }

.portfolio-action { text-align: center; margin-top: 40px; }
.behance-btn { display: inline-block; padding: 15px 40px; border: 1px solid var(--text-color); color: var(--text-color); border-radius: 50px; font-weight: 700; text-transform: uppercase; text-decoration: none; transition: 0.3s; }
.behance-btn:hover { background: var(--text-color); color: var(--bg-color); }

/* Adaptación Responsive para el collage */
@media (max-width: 900px) { 
    .portfolio-item { width: 100%; margin-bottom: 15px; }
    .portfolio-item:nth-child(3n+1), .portfolio-item:nth-child(3n+2), .portfolio-item:nth-child(3n) { aspect-ratio: 1/1; transform: translateY(0); }
    .portfolio-item:nth-child(2n) { transform: translateY(30px); }
    /* --- Solución al desbordamiento horizontal de la sección CTA --- */
    .cta-section {
        overflow: hidden; /* Evita que cualquier sobrante rompa el ancho de la página */
    }

    .hero-section {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        box-sizing: border-box; /* Evita que el contenedor sea más ancho que la pantalla */
        align-items: center;
        justify-content: center;
    }

    .hero-title, .hero-subtitle {
        text-align: center;
        width: 90%; /* Genera el "respiro" lateral de forma segura sin usar padding en el padre */
        margin: 0 auto; /* Garantiza un centrado perfecto del bloque */
    }

    /* Textos Hero más grandes (tu código anterior) */
    .hero-title { font-size: 12vw !important; }
    .hero-subtitle { font-size: 6vw !important; }
    
    .hablemos-wrapper {
        transform: scale(1) !important; /* Anula el scale(0.7) que confunde al espacio del DOM */
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .hablemos-svg {
        width: 90%; /* Permite que ocupe el ancho de la pantalla móvil dejando un respiro lateral */
        max-width: 500px; /* Tamaño tope para tablets */
        height: auto; /* Ajusta la altura automáticamente para no deformar las letras */
    }
}
@media (max-width: 500px) {
    .portfolio-item { width: 100%; transform: translateY(0) !important; aspect-ratio: 4/3 !important; }
    .portfolio-grid { gap: 15px; }
}

/* Reseñas Desordenadas */
.reviews-section { padding: 80px 5%; max-width: 1400px; margin: 0 auto; }
.reviews-scattered { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    align-items: stretch; /* Obliga a todas las tarjetas de la fila a igualar la altura de la más alta */
    gap: 30px; 
}
.review-card {
    border: 1px solid var(--text-color); 
    border-radius: 15px; 
    padding: 25px;
    width: 30%; /* Respetamos estrictamente el ancho original que indicaste */
    min-width: 280px; 
    transition: 0.4s ease; 
    background: transparent;
    display: flex;
    flex-direction: column; /* Organiza el texto interno */
    justify-content: flex-start; /* Puedes cambiar esto a "center" si prefieres el texto centrado verticalmente */
}
/* Se eliminaron los selectores nth-child(2n) y (3n) para quitar el efecto desordenado y tener 2 filas rectas */
.review-card:hover { 
    transform: translateY(-10px); 
    background: var(--text-color); 
    color: var(--bg-color); 
}

/* Top Box Cita */
.quote-section { padding: 60px 5%; text-align: center; }
.quote-box { max-width: 900px; margin: 0 auto; }
.quote-mark { font-family: Georgia, serif; font-size: 100px; color: var(--primary-color); display: block; line-height: 0.5; margin-bottom: 20px;}
.quote-box h3 { font-size: clamp(24px, 4vw, 36px); font-weight: 300; font-style: italic; }

/* Top Box Nosotros (80% Texto, 20% Imagen) */
.about-section { padding: 60px 5%; }
.about-box { 
    display: flex; max-width: 1200px; margin: 0 auto; 
    border: 1px solid var(--text-color); border-radius: 30px; overflow: hidden; 
}
.about-text { 
    width: 80%; 
    padding: 60px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}
/* Justifica los párrafos de texto dentro de la sección para que queden alineados a ambos márgenes */
.about-text p {
    text-align: justify; 
}
.about-text h2 { font-size: 32px; font-weight: 900; margin-bottom: 20px; }
.about-images { width: 20%; position: relative; background: #000; min-height: 350px;}
.fade-img { position: absolute; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.fade-img.active { opacity: 1; }
@media (max-width: 900px) {
    .about-box { flex-direction: column; }
    .about-text { width: 100%; padding: 40px; }
    .about-images { width: 100%; height: 300px; }
}

/* Servicios 4x2 */
.services-section { padding: 80px 5%; }
.section-title { text-align: center; font-size: 36px; font-weight: 900; margin-bottom: 50px; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1200px; margin: 0 auto; }
.service-pill { 
    border: 1px solid var(--text-color); border-radius: 20px; padding: 40px 20px; 
    text-align: center; cursor: pointer; transition: 0.4s ease; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.service-icon { width: 40px; height: 40px; fill: var(--text-color); margin-bottom: 15px; transition: 0.4s; }
.service-pill h4 { font-size: 18px; font-weight: 700; margin-bottom: 5px; }
.service-desc { max-height: 0; opacity: 0; overflow: hidden; transition: all 0.4s ease; }
.service-desc p { font-size: 13px; line-height: 1.4; font-weight: 300; margin-top: 10px; }
.service-pill:hover { background: var(--text-color); color: var(--bg-color); transform: scale(1.02); }
.service-pill:hover .service-icon { fill: var(--bg-color); }
.service-pill:hover .service-desc { max-height: 80px; opacity: 1; }
@media (max-width: 1000px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }

/* Hablemos CTA */
.cta-section { padding: 20px 0 100px; display: flex; justify-content: center; }
.hablemos-wrapper { transform: scale(0.7); } /* 30% más chico */
.hablemos-svg { width: 800px; height: 200px; }
/* Hablemos en minúscula y trazo sin rulos internos */
/* Hablemos en minúscula y trazo limpio */
/* Hablemos en minúscula, sin rulos y con barrido */
.hablemos-stroke, .hablemos-fill {
    font-size: 140px; font-weight: 900; text-transform: lowercase; font-family: 'Montserrat', sans-serif;
}
.hablemos-stroke { 
    fill: var(--bg-color); /* Tapamos los rulos superpuestos con el color del fondo */
    stroke: var(--text-color);
    stroke-width: 3px; 
    paint-order: stroke fill;
    stroke-linejoin: round;
    cursor: pointer;
}
.hablemos-fill { 
    fill: var(--text-color); 
    clip-path: inset(0 100% 0 0); /* 100% oculto desde la derecha */
    transition: clip-path 0.5s ease-in-out;
    pointer-events: none; /* Evita interferir con el hover */
}
.hablemos-btn:hover .hablemos-fill { 
    clip-path: inset(0 0 0 0); /* Se revela de izquierda a derecha */
}

/* Modales Pop-Up */
/* Modales / Pop-ups con Scroll Interno */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.9); z-index: 2000; 
    display: none; justify-content: center; align-items: flex-start; /* Permite que crezca hacia abajo */
    opacity: 0; transition: opacity 0.3s ease;
    overflow-y: auto; /* Scroll interno en el pop-up */
    padding: 50px 0; /* Espaciado arriba y abajo */
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal-box { 
    background: var(--bg-color); padding: 50px; border: 1px solid var(--text-color); 
    width: 90%; max-width: 500px; position: relative; border-radius: 20px;
    margin: auto; /* Centra verticalmente si es corto, o fluye normal si es largo */
}

/* Clase para bloquear el scroll del body por JS */
body.modal-open { overflow: hidden; }
.status-box { text-align: center; }
.modal-close-btn { 
    position: absolute; top: 15px; right: 20px; background: none; border: none; 
    font-size: 32px; color: var(--text-color); cursor: pointer; transition: 0.3s;
}
.modal-close-btn:hover { opacity: 0.5; }
.modular-form input, .modular-form textarea, .modular-form select { 
    width: 100%; padding: 15px; margin-bottom: 15px; background: transparent; 
    border: 1px solid rgba(128,128,128,0.5); color: var(--text-color); border-radius: 8px; font-family: inherit;
}
.submit-btn { 
    width: 100%; padding: 15px; background: var(--text-color); color: var(--bg-color); 
    border: none; border-radius: 8px; cursor: pointer; font-weight: 700; text-transform: uppercase; transition: 0.3s;
}
.submit-btn:hover { opacity: 0.8; }

/* Botón WhatsApp con Resplandor */
.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px; background-color: #25D366; 
    width: 60px; height: 60px; border-radius: 50%; display: flex; 
    align-items: center; justify-content: center; z-index: 1500; 
    /* Sombra oscura sutil + Resplandor verde exterior */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2), 0 0 20px rgba(37, 211, 102, 0.6); 
    transition: 0.3s ease;
}
.whatsapp-float:hover { 
    transform: scale(1.1);
    /* Al pasar el mouse, el resplandor se hace más intenso */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 35px rgba(37, 211, 102, 1); 
}

/* --- NUEVOS ESTILOS: Collage, Formularios y Responsive --- */

/* Collage Desordenado y Ancho Completo */
.collage-section { padding: 60px 2%; width: 100%; max-width: 100%; margin: 0 auto; }
.collage-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.collage-item { width: calc(33.333% - 20px); border-radius: 15px; overflow: hidden; transition: transform 0.4s ease; }
.collage-item:nth-child(3n+1) { aspect-ratio: 4/5; transform: translateY(30px); }
.collage-item:nth-child(3n+2) { aspect-ratio: 1/1; transform: translateY(-20px); }
.collage-item:nth-child(3n)   { aspect-ratio: 16/9; transform: translateY(15px); }

/* Sistema de Estrellas, Ojito y Subtítulos para Formularios */
.star-rating { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 10px; margin: 15px 0 25px; }
.star-rating input { display: none; }
.star-rating label { font-size: 35px; color: rgba(128,128,128,0.3); cursor: pointer; transition: 0.2s; }
.star-rating input:checked ~ label, .star-rating label:hover, .star-rating label:hover ~ label { color: #f1c40f; }
.form-subtitle { font-size: 18px; font-weight: 700; margin: 30px 0 15px; text-transform: uppercase; color: var(--text-color); border-bottom: 1px solid rgba(128,128,128,0.2); padding-bottom: 5px; }
.password-eye { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); cursor: pointer; font-size: 18px; }

/* Responsive General (Celulares) */
@media (max-width: 900px) {
    /* Textos Hero más grandes */
    .hero-title { font-size: 12vw !important; }
    .hero-subtitle { font-size: 6vw !important; }
    
    /* Collage a 2 columnas sin saltos feos */
    .collage-item { width: calc(50% - 20px); }
    .collage-item:nth-child(n) { transform: none !important; aspect-ratio: 1/1 !important; }
    
    /* Reseñas: 1 columna, manteniendo la separación pero sin el desorden que rompe el móvil */
    /* Reseñas: 1 columna, manteniendo la separación pero sin el desorden que rompe el móvil */
    .review-card { transform: none !important; margin-top: 0 !important; margin-bottom: 15px !important; width: 100% !important; }
}

/* --- BOTÓN SEGUINOS (INSTAGRAM) NAV BAR --- */
.nav-btn-ig {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 8px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.nav-btn-ig:hover {
    background: var(--text-color);
    color: var(--bg-color);
    transform: scale(1.05);
}

/* Lógica de reordenamiento exclusivo para móviles */
@media (max-width: 992px) {
    .nav-btn-ig {
        order: 4; /* Fuerzo a que el botón se vaya hacia abajo de los enlaces (que por defecto tienen order: 0) */
        margin-top: 15px; /* Separación extra respecto a "contacto" */
        font-size: 16px;
        padding: 12px 25px;
    }
    .theme-switch-container {
        order: 5; /* Asegura que el switch de tema (luna/sol) quede siempre como el último elemento del menú móvil */
    }
}