:root {
    --color-primary: #007aff; 
    --color-primary-light: #e6f2ff;
    --color-bg: #ffffff;      
    --color-bg-alt: #f4f8fa;  
    --color-text: #222222;      
    --color-text-muted: #555555;
    --color-border: #dde4e9;
    --header-height: 70px;
    --max-width: 1200px;
    --radius: 8px;
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

/* Reset y Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body {
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin-bottom: 16px; font-weight: 700; }
h1 { font-size: clamp(3rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); }
h3 { font-size: 1.5rem; color: var(--color-primary); }
p { margin-bottom: 1rem; color: var(--color-text-muted); font-size: 1.1rem; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Header (sin cambios) */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}
.main-header.scrolled { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); }
.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.header-logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text);
    text-decoration: none;
}
.header-logo:hover { text-decoration: none; }
.logo-img { height: 40px; width: auto; margin-right: 12px; }
.main-nav ul { display: flex; list-style: none; gap: 20px; }
.main-nav a {
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 8px;
    border-radius: var(--radius);
    transition: color 0.2s ease, background-color 0.2s ease;
}
.main-nav a:hover,
.main-nav a.active {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}
.mobile-nav-toggle { display: none; background: none; border: none; font-size: 2rem; cursor: pointer; }

/* Secciones Espaciosas */
.spacious-section {
    padding: 100px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.full-screen-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--color-bg);
    overflow: hidden; /* Para contener el video */
}
.full-screen-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1; /* Encima del video, debajo del contenido */
}
.hero-content {
    position: relative;
    z-index: 2; /* Encima del overlay */
    text-align: center;
    max-width: 800px;
    padding: 20px;
}
.hero-content h1, .hero-content p {
    color: var(--color-bg);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* PUNTO 1: Estilos del Video de Fondo */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0; /* Detrás de todo */
}

/* Hero de inicio (sin cambios) */
#inicio {
    padding-top: var(--header-height);
    text-align: left;
    justify-content: flex-start;
}
#inicio .hero-content {
    text-align: left;
    max-width: 600px;
    margin-top: -15vh; 
}
.alt-bg { background-color: var(--color-bg-alt); }

/* Visión/Misión (sin cambios) */
.text-content { max-width: 800px; text-align: center; }
.text-content h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.tooltip-icon { position: relative; cursor: help; color: var(--color-text-muted); }
.tooltip-icon svg { width: 24px; height: 24px; }
.tooltip-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-text);
    color: var(--color-bg);
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
}
.tooltip-icon:hover::after, .tooltip-icon:focus::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}
.section-title { text-align: center; margin-bottom: 40px; }

/* PUNTO 2: NUEVO TIMELINE INTERACTIVO (SLIDER)
  Estos estilos REEMPLAZAN los anteriores de .timeline-scroll-container 
*/
.timeline-interactive-container {
    position: relative;
    width: 100%;
    max-width: 900px; /* Limita el ancho en pantallas grandes */
    margin: 40px auto 0;
    padding: 20px 0;
}

/* 1. Contenido (Arriba) */
.timeline-content-wrapper {
    position: relative;
    width: 100%;
    min-height: 120px; /* Evita que colapse durante el fade */
    margin-bottom: 30px;
}
.timeline-milestone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0 10%; /* Centra el texto un poco */
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    pointer-events: none; /* No se puede hacer clic en el texto */
}
.timeline-milestone.active {
    opacity: 1;
    transform: translateY(0);
    position: relative; /* El activo ocupa espacio */
}

/* 2. Barra y Círculo (En medio) */
.timeline-track-container {
    position: relative;
    width: 100%;
    height: 40px; /* Área de toque */
    padding: 0 30px; /* Deja espacio para que el círculo no se salga */
}
.timeline-track-yellow {
    position: absolute;
    left: 30px;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    height: 8px;
    background-color: #ffc107; /* Barra Amarilla */
    border-radius: 4px;
}
.timeline-thumb-blue {
    position: absolute;
    top: 50%;
    left: 30px; /* Posición inicial (0%) */
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background-color: var(--color-primary); /* Círculo Azul */
    border: 4px solid var(--color-bg);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
    z-index: 2;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-bg);
    font-weight: 700;
    font-size: 1.2rem;
    user-select: none; /* Evita seleccionar el número al arrastrar */
}
.timeline-thumb-blue:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.1);
}
.timeline-thumb-blue:focus-visible {
    outline: 3px solid var(--color-primary-light);
    outline-offset: 2px;
}

/* Animación de "nudge" para el círculo */
.timeline-thumb-blue.nudge {
    animation: nudge-right 1.5s ease-in-out 2 1s; /* Inicia tras 1s, 2 veces */
}
@keyframes nudge-right {
    0%, 100% { transform: translate(-50%, -50%) translateX(0); }
    50% { transform: translate(-50%, -50%) translateX(10px); }
}


/* 3. Etiquetas (Abajo) */
.timeline-labels {
    display: flex;
    justify-content: space-between;
    padding: 10px 0; /* Espacio relativo a los bordes del contenedor */
    width: 100%;
}
.timeline-labels span {
    width: 33.3%;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 700;
}
.timeline-labels span:nth-child(1) { text-align: left; }
.timeline-labels span:nth-child(2) { text-align: center; }
.timeline-labels span:nth-child(3) { text-align: right; }

/* PUNTO 3: Sliders de 1 solo ítem */
.slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}
.slider-wrapper {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.slider-item {
    flex: 0 0 100%; /* Cada item ocupa 100% del contenedor SIEMPRE */
    min-width: 0;
    padding: 10px; /* Espacio para que se vea el item de al lado */
    text-align: center;
}
/* Ya no se necesitan media queries para .slider-item */

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-text);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}
.slider-btn:hover {
    background-color: var(--color-bg);
    color: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}
.slider-btn.prev { left: 20px; }
.slider-btn.next { right: 20px; }
.slider-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.timeline-item, .culture-item, .department-item {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    margin: 0 10px; /* Espacio entre items */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
/* Reemplazo: imágenes más altas, mantienen proporción y no se cortan tanto */
.culture-item img,
.department-item img {
    width: 100%;
    height: auto;                  /* dejar que la imagen mantenga su altura natural */
    aspect-ratio: 4 / 3;           /* mantiene una proporción consistente */
    max-height: 520px;             /* límite máximo en desktop */
    object-fit: cover;             /* sigue recortando si hace falta, pero menos agresivo */
    object-position: center;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: block;
}
@media (max-width: 768px) {
    .culture-item img,
    .department-item img {
        max-height: 360px;         /* menor alto en móvil */
        aspect-ratio: 16 / 9;
    }
}

/* Productos (sin cambios) */
.product-feature {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
}
.product-feature:last-child { margin-bottom: 0; }
.product-image img {
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.product-description { text-align: left; }
@media (min-width: 768px) {
    .product-feature { grid-template-columns: 1fr 1fr; }
    .product-feature:nth-child(odd) .product-image { order: 2; }
    .product-feature:nth-child(odd) .product-description { order: 1; }
}

/* CTA (sin cambios) */
.cta-button {
    display: inline-block;
    margin-top: 20px;
    padding: 14px 28px;
    border-radius: var(--radius);
    background-color: var(--color-primary);
    color: var(--color-bg);
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
    transition: all 0.3s ease;
}
.cta-button:hover {
    background-color: #006ae0;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 122, 255, 0.4);
    text-decoration: none;
}

/* PUNTO 4: Estilos de Contacto fusionados en Footer */
.main-footer {
    padding: 80px 0 40px 0; /* Más padding arriba */
    text-align: center;
    background-color: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
}
.main-footer h2 {
    color: var(--color-text); /* Título más oscuro */
}
.main-footer .social-links {
    margin-top: 20px;
    margin-bottom: 40px; 
    display: flex;
    justify-content: center;
    gap: 20px;
}
.main-footer .social-links a { font-weight: 700; }
.main-footer .copyright {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border); /* Separador */
}

/* Animación de entrada (sin cambios) */
.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fade-in-element.in-view { opacity: 1; transform: translateY(0); }

/* Responsividad (Nav sin cambios) */
@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--color-bg);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-120%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .main-nav.active { transform: translateY(0); opacity: 1; }
    .main-nav ul { flex-direction: column; gap: 10px; width: 100%; }
    .main-nav a { display: block; padding: 10px; text-align: center; }
    .mobile-nav-toggle { display: block; }
    
    /* Hero */
    #inicio .hero-content { margin-top: 0; text-align: center; }
    #inicio { justify-content: center; }
    
    /* Productos */
    .product-feature { grid-template-columns: 1fr; }
    .product-feature .product-image { order: 1 !important; }
    .product-feature .product-description { order: 2 !important; text-align: center; }

    /* Timeline en móvil */
    .timeline-content { width: 300%; } /* 1 item a la vez */
    .timeline-milestone { padding: 0 10px; }
}