/* ==========================================================================
   Nosotros Page Styles (css/nosotros.css)
   ========================================================================== */

/* Hero Section */
.nosotros-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
    background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.55)), url('../assets/personal/fondo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* For screens where background-attachment: fixed causes performance issues, scroll is safer, but we can make it look parallax if needed. We'll use background-size: cover. */

.nosotros-hero-content {
    max-width: 900px;
    text-align: center;
    z-index: 10;
    padding-top: 5rem;
    /* Space for the fixed header */
    animation: fadeUp 1.2s ease-out forwards;
}

.nosotros-hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 1.5rem;
}

/* Nosotros Story Section */
.nosotros-story-section {
    padding: 8rem 5% 8rem;
    background-color: #ffffff;
    width: 100%;
    min-height: auto;
    display: block;
}

.nosotros-story-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 8rem;
    align-items: center;
}

.nosotros-story-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 3.5rem;
}

.nosotros-story-tag {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: inline-block;
}

.nosotros-story-left h2 {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.nosotros-story-left h2 span.highlight-blue {
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.nosotros-story-left p {
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
    text-align: justify;
}

.nosotros-signature {

    display: flex;
    justify-content: center;
}

.nosotros-signature img {
    max-width: 180px;
    height: auto;
    display: block;
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

.nosotros-signature img:hover {
    opacity: 1;
}

.nosotros-story-right {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: -3.5rem;
    /* Ajuste para elevar la imagen y centrarla mejor con el texto en desktop */
}

.nosotros-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

.nosotros-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.1), transparent);
    z-index: 2;
    pointer-events: none;
}

.nosotros-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.nosotros-image-wrapper:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(59, 130, 246, 0.15);
}

.nosotros-image-wrapper:hover img {
    transform: scale(1.04);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nosotros-story-container {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }

    .nosotros-story-left {
        padding-right: 0;
    }

    .nosotros-story-right {
        order: -1;
        margin-top: 0;
        /* Resetear el margen negativo en móviles */
        /* Place image on top on tablet/mobile for better readability flow */
    }

    .nosotros-image-wrapper {
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .nosotros-story-section {
        padding: 5rem 5% 5rem;
    }

    .nosotros-hero {
        background-attachment: scroll;
        /* Disable parallax on mobile */
    }
}

/* ==========================================================================
   Timeline / Historia por Años (2019-2025)
   ========================================================================== */

.timeline-section {
    padding: 6rem 5% 8rem;
    background-color: #ffffff;
    width: 100%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

/* Divisor y línea que crece */
.timeline-divider {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto 4rem;
    padding: 0 2rem;
}

.timeline-line {
    height: 1.5px;
    background-color: #111111; /* Línea negra */
    width: 0%; /* Animado dinámicamente por JS */
    transition: width 0.05s linear;
}

.timeline-year {
    font-size: 2.2rem;
    font-weight: 800;
    color: #dfa15f; /* Naranja/oro elegante */
    margin-left: 1.5rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-15px);
    transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.timeline-year.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Contenido de cada sección de año */
.timeline-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 8rem;
    align-items: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.timeline-content.active {
    opacity: 1;
    transform: translateY(0);
}

.timeline-left-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 3.5rem;
}

.timeline-left-col h3 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.timeline-left-col p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
    text-align: justify;
}

.timeline-left-col p:last-child {
    margin-bottom: 0;
}

/* Imagen Principal (Columna derecha) */
.timeline-right-col {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.timeline-img-primary {
    position: relative;
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

.timeline-img-primary img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.timeline-img-primary:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

.timeline-img-primary:hover img {
    transform: scale(1.03);
}

/* Imagen Secundaria (Columna izquierda, abajo del texto) */
.timeline-img-secondary {
    margin-top: 4rem; /* Separación amplia para dar su propio espacio */
    width: 100%;
    max-width: 100%; /* Ocupa el mismo ancho de columna que el texto */
    border-radius: 24px; /* Consistencia en bordes con la principal */
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    align-self: flex-start; /* Alineado al inicio del texto */
}

.timeline-img-secondary img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.timeline-img-secondary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.1);
}

.timeline-img-secondary:hover img {
    transform: scale(1.03);
}

/* Responsive para la línea de tiempo */
@media (max-width: 992px) {
    .timeline-section {
        padding: 4rem 5% 5rem;
        min-height: auto;
    }
    
    .timeline-divider {
        margin: 1.5rem auto 2.5rem;
        padding: 0;
    }
    
    .timeline-content {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    
    .timeline-left-col {
        padding-right: 0;
    }
    
    .timeline-right-col {
        order: -1; /* La imagen principal se muestra arriba en móviles */
    }
    
    .timeline-img-secondary {
        max-width: 100%;
        align-self: center;
        margin-top: 2rem;
    }
}