/* =========================================
   ESTILOS EXCLUSIVOS: INICIO (HOME) - FINAL CORREGIDO
   ========================================= */

:root {
    /* Paleta de Colores */
    --color-blanco: #ffffff;
    --color-texto: #202020;
    --color-primario: #397DC6;       /* Azul */
    --color-primario-dark: #12375F;  /* Azul Oscuro */
    --color-secundario: #FF945E;     /* Naranja */
    --color-secundario-dark: #e07b48;
    --color-terciario: #F8EDD9;      /* Crema / Tierra */
    --color-gris-claro: #f4f4f4;

    /* Configuración UI */
    --space-container: 90%;
    --max-width: 1200px;
    --radius-btn: 12px;
    --radius-card: 20px;
}

/* --- RESET BÁSICO --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--color-texto);
    line-height: 1.6;
    background-color: var(--color-blanco);
    overflow-x: hidden;
    padding-top: 80px; /* Espacio para el header fijo */
}

h1, h2, h3, h4 { line-height: 1.2; margin-bottom: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- TIPOGRAFÍA --- */
.supertitulo { font-size: 2.2rem; font-weight: 700; color: var(--color-primario-dark); }
.titulo { font-size: 1.5rem; font-weight: 600; color: var(--color-primario); }
.body-text { font-family: 'Lora', serif; font-size: 1.05rem; color: #555; margin-bottom: 20px; }
.texto-blanco { color: white !important; }

/* --- BOTONES --- */
.btn {
    display: inline-flex; justify-content: center; align-items: center;
    padding: 14px 28px; border-radius: var(--radius-btn);
    font-weight: 700; cursor: pointer; border: none; transition: 0.3s;
}
.btn-primario {
    background-color: var(--color-secundario); color: white;
    box-shadow: 0 4px 15px rgba(255, 148, 94, 0.4);
}
.btn-primario:hover { transform: translateY(-2px); background-color: var(--color-secundario-dark); }

.contenido_seccion {
    width: var(--space-container);
    max-width: var(--max-width);
    margin: 0 auto;
}

/* --- HEADER & NAV --- */
header {
    position: fixed; top: 0; left: 0; width: 100%;
    background-color: var(--color-primario);
    z-index: 100; padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
nav {
    display: flex; justify-content: flex-end; align-items: center;
    width: var(--space-container); max-width: var(--max-width); margin: 0 auto;
}
.logo-trigger { cursor: pointer; z-index: 102; transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.logo-trigger img { height: 45px; filter: brightness(0) invert(1); }
.logo-trigger.rotando { transform: rotate(90deg); }

/* Menú Overlay */
.menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: var(--color-primario-dark);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.4s ease; z-index: 101;
}
.menu-overlay.active { opacity: 1; visibility: visible; }
.menu-lista { list-style: none; text-align: center; }
.menu-lista li { margin: 20px 0; opacity: 0; transform: translateY(20px); transition: 0.4s; }
.menu-overlay.active .menu-lista li { opacity: 1; transform: translateY(0); }
.menu-link { font-size: 1.5rem; color: white; font-weight: 700; }
.menu-overlay.active li:nth-child(1) { transition-delay: 0.1s; }
.menu-overlay.active li:nth-child(2) { transition-delay: 0.2s; }
.menu-overlay.active li:nth-child(3) { transition-delay: 0.3s; }

/* =========================================
   HERO LANDSCAPE (CORRECCIÓN Z-INDEX)
   ========================================= */
.primera_seccion {
    background-color: var(--color-terciario); 
    min-height: 90vh;
    padding-top: 40px; padding-bottom: 0;
    position: relative;
    
    /* CORRECCIÓN 1: Dejar que la imagen se salga y poner capa superior */
    overflow: visible; 
    z-index: 10; 
    
    display: flex; align-items: flex-end;
}

.hero-layout {
    display: flex; flex-direction: column; gap: 20px; padding-bottom: 0;
    position: relative; z-index: 5; width: 100%;
}

.contenedor-derecha {
    display: flex; flex-direction: column; margin-bottom: 20px;
    padding-left: 15px; padding-right: 15px;
}
.hero-btn-right { align-self: flex-end; margin-top: 10px; }

/* Ilustración */
.contenedor-izquierda { display: flex; justify-content: center; align-items: flex-end; }
.contenedor-izquierda img {
    max-height: 500px; width: auto; margin: 0 auto;
    
    /* CORRECCIÓN 2: Margen negativo para pisar la siguiente sección */
    margin-bottom: -50px; 
    
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
    animation: float 6s ease-in-out infinite; 
    position: relative; 
    z-index: 20; /* Encima de la curva */
}
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }

/* Curva SVG */
.wave-divider {
    position: absolute; bottom: -1px; left: 0; width: 100%;
    overflow: hidden; line-height: 0; transform: rotate(180deg); 
    z-index: 1;
}
.wave-divider svg { position: relative; display: block; width: calc(140% + 1.3px); height: 100px; }
.wave-divider .shape-fill { fill: #FFFFFF; }

/* =========================================
   TARJETAS CARRUSEL (CORRECCIÓN CAPAS)
   ========================================= */
.segunda_seccion { 
    background: white; 
    
    /* CORRECCIÓN 3: Más espacio arriba para no tapar la imagen del hero */
    padding: 100px 0 40px 0; 
    
    overflow: hidden; 
    position: relative; 
    
    /* CORRECCIÓN 4: Capa inferior al Hero */
    z-index: 1; 
}

.carrusel-mobile {
    display: flex; gap: 20px; overflow-x: auto; padding: 20px 5px 40px 5px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scroll-padding: 20px;
}
.carrusel-mobile::-webkit-scrollbar { display: none; }
.tarjeta {
    min-width: 75vw; max-width: 320px; scroll-snap-align: center;
    background: var(--color-blanco); padding: 40px 25px;
    border-radius: var(--radius-card); border-top: 5px solid var(--color-secundario);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.02);
    display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: space-between;
}
.tarjeta img { width: 80px; height: 80px; margin-bottom: 20px; object-fit: contain; }

/* =========================================
   RESTO DE SECCIONES
   ========================================= */

/* Taller */
.tercera_seccion { background-color: white; padding: 60px 0; }
.grid-content { display: flex; flex-direction: column; gap: 30px; }
.taller-imagen {
    width: 100%; height: 600px;
    background-image: url('../assets/imgs/inicio/founderpraysq.jpg');
    background-size: cover; background-position: center;
    border-radius: var(--radius-card); box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Galería */
.cuarta_seccion { background-color: var(--color-gris-claro); padding: 60px 0; text-align: center; }
.cont-galeria { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 40px 0; }
.cont-img-galeria img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; transition: transform 0.3s; }
.cont-img-galeria:hover img { transform: scale(1.03); }

/* Newsletter */
.quinta_seccion { background-color: var(--color-primario); padding: 80px 0; text-align: center; }
.form-newsletter { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.inputs { padding: 15px; border-radius: var(--radius-btn); border: none; width: 100%; font-size: 1rem; }

/* Footer */
footer { background: var(--color-primario-dark); color: white; padding: 60px 0 30px; text-align: center; }
.menu-footer { list-style: none; padding: 0; margin-bottom: 40px; display: flex; flex-direction: column; gap: 15px; }
.menu-footer a { color: #ccc; font-size: 0.95rem; transition: 0.3s; }
.menu-footer a:hover { color: white; text-decoration: underline; }
.legal-f { font-family: 'Lora', serif; font-style: italic; color: var(--color-secundario); margin-top: 15px; }

/* Animaciones */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* =========================================
   MEDIA QUERIES (DESKTOP)
   ========================================= */
@media (min-width: 768px) {
    .supertitulo { font-size: 3.5rem; }
    
    /* Hero Ajustes Desktop */
    .hero-layout { display: grid; grid-template-columns: 1fr 1.2fr; align-items: end; padding-bottom: 40px; }
    .contenedor-izquierda { order: 2; margin-bottom: 0; }
    .contenedor-derecha { order: 1; text-align: left; margin-bottom: 150px; padding-left: 0; padding-right: 40px; }
    
    /* Imagen Gigante Desktop */
    .contenedor-izquierda img { 
        max-height: 750px; 
        margin-bottom: -120px; /* Más overlap en PC */
        margin-left: auto; 
    }
    .wave-divider svg { height: 160px; }

    /* Tarjetas Grid */
    .carrusel-mobile { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; overflow-x: visible; padding: 10px; }
    .tarjeta { min-width: auto; max-width: none; }

    /* Taller & Resto */
    .grid-content { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
    .taller-texto { padding-right: 40px; }
    .cont-galeria { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .menu-footer { flex-direction: row; justify-content: center; gap: 30px; flex-wrap: wrap; }
    .form-newsletter { flex-direction: row; justify-content: center; max-width: 500px; margin: 20px auto; }
    .inputs { width: auto; flex-grow: 1; }
}

@media (max-width: 768px) {
    .taller-imagen { height: 450px; margin-top: 20px; }
}