/* ============================================
   HISTORIA PAGE - Estilos específicos
   ============================================ */

@import url('variables.css');

.historia-page {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
}

/* ============================================
   HERO SECTION
   ============================================ */

.historia-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    overflow: hidden;
}

.historia-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.5;
    background: url('../assets/historia/nuestrahistoria.png') 30% 39%  /cover no-repeat;

}

.historia-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--spacing-xl);
    max-width: 800px;
}

.historia-hero__tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    padding: 8px 20px;
    border-radius: var(--border-radius-full);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
    backdrop-filter: blur(10px);
}

.historia-hero__title {
    font-size: clamp(48px, 8vw, 72px);
    color: var(--text-light);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.historia-hero__subtitle {
    font-size: clamp(20px, 2.5vw, 28px);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* ============================================
   HISTORIA INTRO
   ============================================ */

.historia-intro {
    padding: var(--spacing-2xl) 0;
    padding-bottom: 10px;
    text-align: center;
    background: var(--bg-secondary);
}

.historia-intro__text {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    font-size: clamp(16px, 2vw, 18px);
    color: var(--text-secondary);
    line-height: 1.9;
}

/* ============================================
   GALERÍA DE PRESIDENTAS
   ============================================ */

.galeria-presidentas {
    padding: 20px 0;
    background: var(--bg-primary);
}

.galeria-presidentas__header {
    text-align: center;
    width: 80%;
    max-width: 1200px;
    margin: 0 auto var(--spacing-xl);
}

.galeria-presidentas__title {
    font-size: clamp(28px, 4vw, 38px);
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.galeria-presidentas__description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   TIMELINE CONTAINER
   ============================================ */

.timeline-container {
    width: 80%;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

/* Contador */
.timeline-counter {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.timeline-counter span:first-child {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
}

/* Navegación */
.timeline-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--text-light);
    border: none;
    cursor: pointer;
    font-size: 20px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    margin: var(--spacing-md) auto;
    position: relative;
    z-index: 10;
}

.timeline-nav:hover:not(.timeline-nav--disabled) {
    background: var(--color-secondary);
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.timeline-nav--disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Barra de progreso lateral */
.timeline-progress {
    position: absolute;
    right: -40px;
    top: 120px;
    bottom: 120px;
    width: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.timeline-progress__bar {
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
    border-radius: 3px;
    transition: height 0.3s ease;
}

/* ============================================
   TIMELINE - Vista de 4 items con línea central
   ============================================ */

.timeline {
    position: relative;
    overflow: hidden;
    height: 1600px; /* Altura para 4 items */
    padding: 0 20px;
}

/* Línea central del timeline */
.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, 
        var(--color-primary) 0%, 
        var(--color-secondary) 50%, 
        var(--color-accent) 100%
    );
    transform: translateX(-50%);
    border-radius: 2px;
    z-index: 1;
}

.timeline__wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    transition: transform 0.4s ease;
    position: relative;
    z-index: 2;
}

/* Item del timeline */
.timeline__item {
    display: flex;
    align-items: center;
    min-height: 130px;
    position: relative;
    padding: 0 10px;
}

/* Alternar posición izquierda/derecha */
.timeline__item:nth-child(odd) {
    justify-content: flex-start;
    padding-right: calc(50% + 30px);
}

.timeline__item:nth-child(even) {
    justify-content: flex-end;
    padding-left: calc(50% + 30px);
}

/* Punto en la línea central */
.timeline__item::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    border: 4px solid var(--bg-primary);
    border-radius: 50%;
    z-index: 5;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.timeline__item:hover::before {
    background: var(--color-secondary);
    transform: translate(-50%, -50%) scale(1.2);
}

/* Contenido del item */
.timeline__content {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    width: 100%;
}

.timeline__item:nth-child(even) .timeline__content {
    flex-direction: row-reverse;
}

.timeline__content:hover {
    box-shadow: var(--shadow-xl);
    transform: scale(1.02);
}

/* Flecha conectora */
.timeline__content::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--bg-secondary);
    transform: translateY(-50%) rotate(45deg);
    box-shadow: 2px -2px 4px rgba(0,0,0,0.05);
}

.timeline__item:nth-child(odd) .timeline__content::after {
    right: -10px;
}

.timeline__item:nth-child(even) .timeline__content::after {
    left: -10px;
    box-shadow: -2px 2px 4px rgba(0,0,0,0.05);
}

/* Número */
.timeline__number {
    width: 45px;
    height: 45px;
    background: var(--color-primary);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

/* Año flotante */
.timeline__year {
    position: absolute;
    left: 50%;
    top: -5px;
    transform: translateX(-50%);
    background: var(--color-secondary);
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: var(--border-radius-full);
    font-size: 12px;
    font-weight: 700;
    z-index: 6;
    white-space: nowrap;
}

/* Badge actual */
.timeline__badge {
    position: absolute;
    top: var(--spacing-xs);
    background: var(--color-accent);
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: var(--border-radius-full);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 2;
}

.timeline__item:nth-child(odd) .timeline__badge {
    right: var(--spacing-sm);
}

.timeline__item:nth-child(even) .timeline__badge {
    left: var(--spacing-sm);
}

/* Imagen */
.timeline__image {
    width: 80px;
    height: 95px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.timeline__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform var(--transition-normal);
}

.timeline__content:hover .timeline__image img {
    transform: scale(1.1);
}

/* Info */
.timeline__info {
    flex: 1;
    min-width: 0;
}

.timeline__item:nth-child(even) .timeline__info {
    text-align: right;
}

.timeline__name {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
}

.timeline__period {
    font-size: 13px!important;
    color: var(--color-secondary);
    font-weight: 600;
    margin: 0;
}

.timeline__description {
    display: none;
}

/* Enlace a Memorias */
.timeline__memoria-link {
    display: inline-block;
    margin-top: var(--spacing-sm);
    color: var(--color-primary);
    font-size: clamp(14px, 1.5vw, 16px);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    position: relative;
}

.timeline__memoria-link:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}



.timeline__memoria-link:hover::after {
    transform: translateX(4px);
}

.timeline__item--actual .timeline__memoria-link {
    color: var(--text-light);
}

.timeline__item--actual .timeline__memoria-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Item actual destacado */
.timeline__item--actual::before {
    background: var(--color-accent);
    width: 26px;
    height: 26px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(26, 175, 190, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(26, 175, 190, 0); }
}

.timeline__item--actual .timeline__content {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border: none;
}

.timeline__item--actual .timeline__content::after {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.timeline__item--actual .timeline__name,
.timeline__item--actual .timeline__period {
    color: var(--text-light);
}

.timeline__item--actual .timeline__number {
    background: var(--text-light);
    color: var(--color-primary);
}

.timeline__item--actual .timeline__badge {
    background: var(--text-light);
    color: var(--color-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media screen and (max-width: 968px) {
    .historia-hero {
        height: 50vh;
        min-height: 350px;
    }

    .historia-hero__content {
        padding: var(--spacing-lg);
    }

    .historia-intro__text,
    .galeria-presidentas__header {
        width: 90%;
    }

    .timeline-container {
        width: 95%;
    }

    .timeline-progress {
        display: none;
    }

    .timeline {
        height: 560px;
    }

    /* En tablet, línea a la izquierda */
    .timeline::before {
        left: 30px;
    }

    .timeline__item::before {
        left: 30px;
    }

    .timeline__year {
        left: 30px;
    }

    .timeline__item:nth-child(odd),
    .timeline__item:nth-child(even) {
        justify-content: flex-end;
        padding-left: 70px;
        padding-right: 10px;
    }

    .timeline__item:nth-child(odd) .timeline__content,
    .timeline__item:nth-child(even) .timeline__content {
        flex-direction: row;
    }

    .timeline__item:nth-child(odd) .timeline__content::after,
    .timeline__item:nth-child(even) .timeline__content::after {
        left: -10px;
        right: auto;
        box-shadow: -2px 2px 4px rgba(0,0,0,0.05);
    }

    .timeline__item:nth-child(even) .timeline__info {
        text-align: left;
    }

    .timeline__item:nth-child(odd) .timeline__badge,
    .timeline__item:nth-child(even) .timeline__badge {
        right: var(--spacing-sm);
        left: auto;
    }
}

@media screen and (max-width: 768px) {
    .historia-hero {
        height: 45vh;
        min-height: 300px;
    }

    .historia-hero__title {
        font-size: 32px;
    }

    .historia-hero__subtitle {
        font-size: 15px;
    }

    .timeline {
        height: 520px;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline__item::before {
        left: 20px;
        width: 16px;
        height: 16px;
    }

    .timeline__year {
        left: 20px;
        font-size: 10px;
        padding: 3px 8px;
    }

    .timeline__item:nth-child(odd),
    .timeline__item:nth-child(even) {
        padding-left: 50px;
    }

    .timeline__content {
        padding: var(--spacing-sm);
        gap: var(--spacing-sm);
    }

    .timeline__number {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }

    .timeline__image {
        width: 65px;
        height: 75px;
    }

    .timeline__name {
        font-size: 13px;
    }

    .timeline__period {
        font-size: 11px;
    }

    .timeline-nav {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }

    .timeline__memoria-link {
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .timeline {
        height: 480px;
    }

    .timeline__item {
        min-height: 110px;
    }

    .timeline__image {
        width: 55px;
        height: 65px;
    }

    .timeline__number {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .timeline__year {
        display: none;
    }

    .timeline__memoria-link {
        font-size: 12px;
    }
}
