:root {
    --primary-orange: #F3570F;
    --dark-bg: #0f0f11;
    --card-bg: #1a1a1d;
    --text-white: #ffffff;
    --text-grey: #bbbbbb;
    --font-main: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--dark-bg);
    color: var(--text-white);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--primary-orange);
    color: white;
    padding: 12px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-primary:hover { background-color: #d84a0a; }

.btn-outline {
    border: 1px solid white;
    color: white;
    padding: 12px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    margin-left: 15px;
    transition: background 0.3s;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* --- Navbar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: absolute;
    width: 100%;
    z-index: 100;
    top: 0;
}

.logo-img {
    height: 60px; /* Ajusta esto según tu logo */
    width: auto;
    display: block;
}

.nav-links { list-style: none; display: flex; gap: 25px; align-items: center; }
.nav-links a { color: var(--text-white); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary-orange); }

/* --- Hero --- */
.hero {
    height: 100vh;
    min-height: 700px;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.8)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px 0;
    position: relative;
}

.hero-content h1 { 
    font-size: 3.8rem; 
    max-width: 900px; 
    margin: 0 auto 20px; 
    line-height: 1.1; 
    font-weight: 800;
}
.hero-content p { font-size: 1.3rem; margin-bottom: 35px; color: #ddd; }

.hero-cards {
    display: flex;
    gap: 30px;
    margin-top: 80px;
    max-width: 1100px;
    width: 100%;
    align-items: stretch;
}

.card.glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 35px;
    border-radius: 12px;
    flex: 1;
    text-align: left;
}
.card h3 { color: white; margin-bottom: 15px; font-size: 1.1rem; letter-spacing: 1px; font-weight: 700; }
.card p { color: #ccc; font-size: 0.95rem; line-height: 1.7; }

/* --- Section: Historias --- */
.historias-section {
    padding: 80px 5%;
    background-color: #0f0f11;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
}
.section-header h2 { font-size: 2.5rem; font-weight: 700; }

.filters { display: flex; gap: 25px; }
.filters span { 
    color: #666; 
    font-weight: 600; 
    cursor: pointer; 
    padding-bottom: 5px; 
    transition: color 0.3s;
}
.filters span.active, .filters span:hover { 
    color: var(--primary-orange); 
    border-bottom: 2px solid var(--primary-orange); 
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.story-card {
    height: 450px;
    background-color: #222;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}
.story-card:hover { transform: translateY(-8px); }

/* Overlay degradado */
.story-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 80%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
}

.story-content {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    z-index: 10;
}

.story-content h3 { font-size: 1.6rem; line-height: 1.2; margin-bottom: 8px; font-weight: 700; }
.yo-text { 
    font-family: 'Brush Script MT', cursive; 
    font-size: 2.2rem; 
    color: white; 
    margin-right: 4px;
    font-weight: normal;
}
.story-content p { font-size: 1rem; color: #ddd; font-weight: 500; }

/* Celular CTA */
.story-cta {
    background: #151515;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #333;
}
.phone-mockup {
    width: 220px;
    padding: 20px;
    background: #000;
    border-radius: 30px;
    border: 4px solid #333;
    text-align: center;
}
.rec-dot { color: red; font-size: 0.8rem; margin-bottom: 10px; animation: blink 1.5s infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* --- Footer --- */
.footer { background: #050505; padding: 60px 5% 30px; margin-top: 50px; border-top: 1px solid #222; }
.footer-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; }
.footer-brand p { color: #666; font-size: 0.9rem; margin-top: 10px; }
.footer-links ul { list-style: none; margin-top: 10px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #888; text-decoration: none; }
.input-group { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.input-group input { padding: 12px; background: #222; border: 1px solid #333; color: white; border-radius: 4px; }
.footer-bottom { border-top: 1px solid #222; margin-top: 40px; padding-top: 20px; color: #444; font-size: 0.8rem; display: flex; justify-content: space-between; }

/* --- EFECTOS INTERACTIVOS (NUEVO) --- */

/* Animación para tarjetas Visión/Objetivo */
.card.glass {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: default;
}

.card.glass:hover {
    transform: translateY(-12px) scale(1.02); /* Sube y crece un poquito */
    background: rgba(255, 255, 255, 0.15); /* Se pone más brillante */
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

/* Ajuste para que el Grid de historias se vea bien con muchas tarjetas */
.stories-grid {
    /* Forzamos que las filas sean iguales */
    grid-auto-rows: 450px; 
}

/* --- MODAL (VISTA PREVIA) --- */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1a1a1d;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid #333;
    animation: zoomIn 0.3s ease;
}

.modal-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.modal-text { padding: 30px; text-align: center; }
.modal-text h3 { color: var(--primary-orange); margin-bottom: 10px; font-size: 1.5rem; }
.modal-text p { color: white; font-size: 1.2rem; }

.close-btn {
    position: absolute;
    top: 15px; right: 20px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 40px; height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
}

@keyframes zoomIn { from {transform: scale(0.8); opacity: 0;} to {transform: scale(1); opacity: 1;} }

/* --- PÁGINA PARTICIPAR (FORMULARIO) --- */
.form-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 40px;
}

.form-container {
    background: #1a1a1d;
    padding: 40px;
    border-radius: 15px;
    width: 100%;
    max-width: 600px;
    border: 1px solid #333;
}

.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; color: #ccc; font-weight: 600; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    background: #0f0f11;
    border: 1px solid #333;
    border-radius: 6px;
    color: white;
    font-family: var(--font-main);
}
.form-group input:focus { border-color: var(--primary-orange); outline: none; }

/* --- FIX: VISTA PREVIA DE IMAGENES --- */
/* Esto sobrescribe los estilos anteriores para que la foto no se corte */

.modal-img {
    width: 100%;
    height: auto;            /* Deja que la altura sea natural */
    max-height: 60vh;        /* Limita la altura al 60% de la pantalla para dejar espacio al texto y botón */
    object-fit: contain;     /* CLAVE: Esto obliga a mostrar la imagen entera */
    background-color: #000;  /* Fondo negro elegante si la foto es muy angosta */
    display: block;
}

.modal-content {
    background: #1a1a1d;
    max-width: 550px;        /* Ancho máximo controlado */
    width: 95%;              /* En móviles usa casi todo el ancho */
    display: flex;
    flex-direction: column;
}

.modal-text {
    padding: 20px;
    background: #1a1a1d;     /* Asegura que el texto tenga fondo */
}

/* --- FOOTER PRO (ESTILO NUEVO) --- */
.footer-pro {
    background-color: #0a0a0c; /* Fondo muy oscuro */
    color: #888; /* Texto gris suave */
    padding: 80px 5% 30px;
    border-top: 1px solid #222;
    font-size: 0.95rem;
    margin-top: 60px;
}

.footer-content-grid {
    display: grid;
    /* 4 columnas: La primera más ancha, las otras se ajustan */
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 70px;
}

/* Estilos generales de columnas */
.footer-col h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Columna 1: Marca */
.brand-desc { line-height: 1.7; margin-bottom: 30px; max-width: 320px; }
.footer-socials-pro { display: flex; gap: 15px; }
.footer-socials-pro a {
    color: white;
    background: #222;
    width: 42px; height: 42px;
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%; /* Círculos */
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.1rem;
}
.footer-socials-pro a:hover {
    background: var(--primary-orange);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(243, 87, 15, 0.3);
}

/* Columnas 2 y 3: Enlaces */
.links-col ul { list-style: none; padding: 0; }
.links-col li { margin-bottom: 18px; }
.links-col a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    display: inline-block;
}
.links-col a:hover {
    color: var(--primary-orange);
    padding-left: 8px; /* Pequeño efecto de movimiento al hover */
}

/* Columna 4: Newsletter */
.newsletter-col p { margin-bottom: 25px; }
.input-wrapper {
    position: relative;
    border-bottom: 2px solid #333;
    display: flex;
}
.input-wrapper input {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    color: white;
    outline: none;
    font-family: var(--font-main);
}
.input-wrapper input::placeholder { color: #555; }
.input-wrapper button {
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-orange);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s;
}
.input-wrapper button:hover { transform: translateY(-50%) translateX(5px); }

/* Barra inferior */
.footer-bottom-pro {
    border-top: 1px solid #1a1a1d;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.legal-links { display: flex; list-style: none; gap: 30px; }
.legal-links a { color: #666; text-decoration: none; font-size: 0.9rem; transition: color 0.3s; }
.legal-links a:hover { color: var(--primary-orange); }

/* Responsive para móviles y tablets */
@media (max-width: 992px) {
    .footer-content-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 600px) {
    .footer-pro { padding: 60px 5% 30px; }
    .footer-content-grid { grid-template-columns: 1fr; text-align: left; gap: 50px; }
    .footer-bottom-pro { flex-direction: column-reverse; align-items: flex-start; }
    .legal-links { flex-wrap: wrap; gap: 15px; margin-bottom: 15px; }
}

/* --- ESTILOS VIDEO MODAL --- */
.modal-video {
    width: 100%;
    height: auto;
    max-height: 60vh; /* Misma altura máxima que la imagen */
    background: black;
    outline: none;
}

/* --- NAVEGACIÓN MODAL (Video Switcher) --- */
.modal-content {
    position: relative; /* Necesario para posicionar las flechas */
}

.modal-nav-arrow {
    position: absolute;
    top: 40%; /* Centrado verticalmente respecto a la imagen/video */
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20; /* Encima de la imagen/video */
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.2);
}

.modal-nav-arrow:hover {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
}

.left-arrow {
    left: 20px;
}

/* Ajuste para que el video no tape el botón de cerrar */
.close-btn { z-index: 30; }

/* --- CORRECCIÓN NAVEGACIÓN (Flecha Derecha) --- */
/* Sobrescribimos la posición anterior */
.modal-nav-arrow {
    left: auto !important;  /* Anular la izquierda */
    right: 20px !important; /* Poner a la derecha */
}

/* Ajuste visual para que se vea clickable */
.modal-nav-arrow:active {
    transform: translateY(-50%) scale(0.95); /* Pequeño efecto de click */
}

/* --- AJUSTE POSICIÓN FLECHAS MODAL --- */
/* Clase para cuando está a la derecha (viendo foto) */
.arrow-pos-right {
    left: auto;
    right: 20px;
}

/* Clase para cuando está a la izquierda (viendo video) */
.arrow-pos-left {
    right: auto;
    left: 20px;
}

/* --- HERO SLIDER (FONDOS CAMBIANTES) --- */
.hero {
    position: relative;
    background: none !important; /* Quitamos el fondo estático viejo */
    overflow: hidden; /* Asegura que no se salga nada */
}

/* Contenedor de las imágenes de fondo */
.hero-bg-slider {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; /* Detrás del contenido */
}

/* Estilo base de cada imagen del slider */
.hero-bg-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0; /* Ocultas por defecto */
    transition: opacity 1.5s ease-in-out; /* Transición suave de 1.5s */
    filter: brightness(0.4); /* Oscurecerlas un poco para que se lea el texto */
}

/* Clase para mostrar la imagen activa */
.hero-bg-img.active {
    opacity: 1;
}

/* Asegurar que el contenido del hero esté por encima */
.hero-content, .hero-cards {
    position: relative;
    z-index: 10;
}

/* --- CORRECCIÓN DEFINITIVA FLECHAS --- */

/* 1. Estilo base (neutro en posición) */
.modal-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px; height: 50px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    display: none; /* Oculto por defecto, JS lo activa flex */
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

/* 2. Clase para ver VIDEO (Flecha a la derecha) */
.arrow-pos-right {
    left: auto !important;
    right: 20px !important;
}

/* 3. Clase para volver a FOTO (Flecha a la izquierda) */
.arrow-pos-left {
    right: auto !important;
    left: 20px !important;
}

.modal-nav-arrow:hover {
    background: var(--primary-orange);
    transform: translateY(-50%) scale(1.1);
}

/* --- LIMPIEZA DE TEXTOS (IMAGENES CON TEXTO INTEGRADO) --- */

/* 1. Ocultar el texto HTML en las tarjetas de historia normales */
.story-card:not(.story-cta) .story-content {
    display: none !important;
}

/* 2. Quitar el degradado oscuro para que la imagen se vea pura */
.story-card:not(.story-cta)::after {
    display: none !important;
}

/* 3. Asegurar que la tarjeta 'Tu turno' (CTA) siga viéndose bien */
.story-cta .story-content {
    display: block !important;
}

/* --- CORRECCIONES FINALES MÓVIL (HERO) --- */
@media (max-width: 768px) {
    /* 1. Dar aire arriba para que el menú no tape el texto */
    .hero {
        padding-top: 140px; 
        padding-bottom: 60px;
        height: auto; /* Dejar que crezca lo necesario */
        min-height: 100vh;
    }

    /* 2. Reducir el título gigante */
    .hero-content h1 {
        font-size: 2rem; /* Mucho más manejable */
        line-height: 1.2;
        margin-bottom: 25px;
    }

    /* 3. Separar los botones (que no se monten uno sobre otro) */
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        align-items: center;
    }

    /* 4. Botones anchos para dedos */
    .hero-buttons .btn-primary, 
    .hero-buttons .btn-outline {
        width: 90%;
        text-align: center;
        margin: 0;
        display: block;
    }
    
    /* 5. Ajustar el slider de fondo para que cubra todo al scrollear */
    .hero-bg-slider, .hero-bg-img {
        position: fixed; /* Efecto cool: el fondo se queda quieto */
        height: 100vh;
    }
}

/* --- REPARACIÓN URGENTE HERO MÓVIL --- */
@media (max-width: 768px) {
    
    /* 1. Menú: Fondo sólido para que no se mezcle con la foto */
    .navbar {
        position: relative !important; /* Ya no flota sobre la foto */
        background-color: #000 !important;
        flex-direction: column;
        padding: 20px 0;
        height: auto;
    }
    
    /* 2. Hero: Quitamos el relleno exagerado porque el menú ya no flota */
    .hero {
        padding-top: 40px !important; 
        height: auto !important;
        min-height: auto !important;
        display: block !important; /* Quitar flex para que no centre forzado */
        text-align: center;
    }

    /* 3. Texto del Hero: Pequeño y legible */
    .hero-content {
        padding: 0 20px;
        margin-top: 20px;
    }

    .hero-content h1 {
        font-size: 2rem !important; /* Letra más pequeña */
        line-height: 1.2;
        margin-bottom: 20px;
    }

    /* 4. Botones: Uno debajo del otro y anchos */
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
        margin-bottom: 40px;
    }
    
    .hero-buttons a {
        width: 100%;
        max-width: 300px;
        margin: 0 !important;
        box-sizing: border-box;
        text-align: center;
    }

    /* 5. Tarjetas Visión/Objetivo: Verticales y con margen */
    .hero-cards {
        flex-direction: column;
        gap: 20px;
        padding: 0 20px 40px; /* Espacio abajo */
        margin-top: 0 !important;
    }
    
    .card.glass {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* --- EFECTOS VISUALES DE TARJETAS (POLISH) --- */

.story-card {
    /* 1. Forzar cursor de mano (Clickable) */
    cursor: pointer !important; 
    
    /* 2. Definir la transición suave (Animación elegante) */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* 3. Borde invisible base para que no salte al hacer hover */
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* Sombra base */
}

.story-card:hover {
    /* 4. El efecto: Se levanta y crece ligeramente */
    transform: translateY(-10px) scale(1.02); 
    
    /* 5. Resplandor Naranja Elegante (Glow) */
    box-shadow: 0 20px 40px rgba(243, 87, 15, 0.25);
    
    /* 6. Borde iluminado */
    border-color: rgba(243, 87, 15, 0.6);
    
    /* Asegurar que quede por encima de las otras si se solapan */
    z-index: 10;
}

/* Ajuste específico para la tarjeta final "¿A qué aspiras?" */
.story-cta:hover {
    transform: translateY(-5px); /* Movimiento más sutil para esta */
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.1); /* Glow blanco/gris */
    border-color: rgba(255, 255, 255, 0.3);
}

/* --- EFECTO HOVER PREMIUM (CURSOR Y ELEVACIÓN) --- */
.story-card {
    cursor: pointer !important; /* Forzar que salga la manito */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
}

.story-card:hover {
    transform: translateY(-10px); /* Se levanta suavemente */
    box-shadow: 0 15px 30px rgba(243, 87, 15, 0.3); /* Resplandor naranja detrás */
    z-index: 10;
    border: 1px solid rgba(243, 87, 15, 0.5); /* Borde sutil naranja */
}
