/* ============================================
   TIMELINE VERTICAL FIXA - Estilo Relume
   A linha fica fixa no centro da tela
   ============================================ */

/* Wrapper fixo que contém a linha */
.timeline-fixed-wrapper {
    position: fixed;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    transform: translateX(-50%);
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.timeline-fixed-wrapper.is-visible {
    opacity: 1;
}

/* Container da linha */
.timeline-fixed-line {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Trilha de fundo (linha completa, mais escura) */
.timeline-fixed-wrapper .timeline-track {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Linha de progresso (cresce do topo até a estrela) */
.timeline-fixed-wrapper .timeline-progress {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.3) 0%,
            rgba(255, 255, 255, 0.8) 90%,
            rgba(255, 255, 255, 1) 100%);
    border-radius: 2px;
}

/* ============================================
   ESTRELA LÍDER - Fixa no centro da tela
   ============================================ */

.timeline-leading-star {
    position: absolute;
    left: 50%;
    top: 50vh;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.timeline-leading-star.is-active {
    opacity: 1;
}

.timeline-leading-star svg,
.timeline-leading-star svg polygon {
    width: 100%;
    height: 100%;
    fill: #ffffff;
    stroke: var(--color-bg);
    stroke-width: 250px;
    stroke-linecap: round;
    stroke-linejoin: round;
    paint-order: stroke;
    overflow: visible;
}

/* Sombra esfumaçada na estrela */
.timeline-leading-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--color-bg) 0%, var(--color-bg) 30%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

/* Dots das décadas */
.timeline-dot {
    position: absolute;
    left: 50%;
    width: 14px;
    height: 14px;
    background: #333333;
    border: 8px solid var(--color-bg);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    box-sizing: content-box;
    transition: background-color 0.5s ease;
}

.timeline-dot.active {
    background: #ffffff;
}

/* ============================================
   DÉCADA - Título
   ============================================ */

.decade-group {
    position: relative;
}

.decade-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 240px;
    border-bottom: none !important;
    width: 100%;
    margin-bottom: 2rem;
    margin-top: 90px;
    transform: translateX(-40px);
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

.decade-title.active {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2);
}

.decade-title.active span {
    opacity: 1;
    color: #ffffff;
}

#season-explorer-container {
    position: relative;
}

/* ============================================
   GRID DESKTOP (≥ 992px)
   5 colunas: 2 cards | espaço | 2 cards
   ============================================ */

.seasons-grid.seasons-grid-timeline {
    display: grid;
    grid-template-columns: 1fr 1fr 60px 1fr 1fr;
    gap: 1.5rem;
    position: relative;
}

.seasons-grid-timeline .season-card:nth-child(4n+1) {
    grid-column: 1;
}

.seasons-grid-timeline .season-card:nth-child(4n+2) {
    grid-column: 2;
}

.seasons-grid-timeline .season-card:nth-child(4n+3) {
    grid-column: 4;
}

.seasons-grid-timeline .season-card:nth-child(4n+4) {
    grid-column: 5;
}

/* Ajuste para décadas com 10 temporadas */
.seasons-grid-timeline .season-card:first-child:nth-last-child(10)~.season-card:nth-child(9) {
    grid-column: 2;
}

.seasons-grid-timeline .season-card:first-child:nth-last-child(10)~.season-card:nth-child(10) {
    grid-column: 4;
}

/* ============================================
   RESPONSIVO - TABLET (768px - 991px)
   3 colunas: 1 card | linha | 1 card (igual mobile)
   ============================================ */

@media (min-width: 768px) and (max-width: 991px) {
    .seasons-grid.seasons-grid-timeline {
        grid-template-columns: 1fr 40px 1fr;
        gap: 1rem;
    }

    /* Cards ímpares ficam à esquerda - inclui card 9 de décadas com 10 */
    .seasons-grid-timeline .season-card:nth-child(odd) {
        grid-column: 1 !important;
    }

    /* Cards pares ficam à direita - inclui card 10 de décadas com 10 */
    .seasons-grid-timeline .season-card:nth-child(even) {
        grid-column: 3 !important;
    }

    /* Título da década ajustado */
    .decade-title {
        gap: 100px;
        margin-top: 60px;
        transform: translateX(-20px);
    }

    /* Estrela menor */
    .timeline-leading-star {
        width: 32px;
        height: 32px;
    }

    .timeline-leading-star::before {
        width: 80px;
        height: 80px;
    }

    /* Cards no tablet */
    .season-card-content {
        padding: 1rem;
    }

    .season-card-year {
        font-size: 1.2rem;
    }

    .season-card-label {
        font-size: 0.6rem;
    }
}


/* ============================================
   RESPONSIVO - MOBILE (< 768px)
   3 colunas: 1 card | linha | 1 card
   ============================================ */

@media (max-width: 767px) {
    .seasons-grid.seasons-grid-timeline {
        grid-template-columns: 1fr 30px 1fr;
        gap: 0.75rem;
    }

    /* Cards ímpares ficam à esquerda - inclui card 9 de décadas com 10 */
    .seasons-grid-timeline .season-card:nth-child(odd) {
        grid-column: 1 !important;
    }

    /* Cards pares ficam à direita - inclui card 10 de décadas com 10 */
    .seasons-grid-timeline .season-card:nth-child(even) {
        grid-column: 3 !important;
    }

    /* Título da década - mantém layout dividido como no desktop */
    .decade-title {
        gap: 80px;
        margin-top: 40px;
        margin-bottom: 1.5rem;
        transform: translateX(-15px);
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .decade-title span {
        font-size: 0.65rem;
        letter-spacing: 0.15rem;
    }

    /* Estrela menor em mobile */
    .timeline-leading-star {
        width: 28px;
        height: 28px;
    }

    .timeline-leading-star::before {
        width: 70px;
        height: 70px;
    }

    /* Dots menores */
    .timeline-dot {
        width: 10px;
        height: 10px;
        border-width: 6px;
    }

    /* Cards menores */
    .season-card {
        min-height: 180px;
    }

    /* Conteúdo do card ajustado para mobile */
    .season-card-content {
        padding: 0.75rem;
    }

    .season-card-year {
        font-size: 1.1rem;
    }

    .season-card-label {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }
}


/* ============================================
   RESPONSIVO - MOBILE PEQUENO (< 480px)
   Linha central ainda menor
   ============================================ */

@media (max-width: 479px) {
    .seasons-grid.seasons-grid-timeline {
        grid-template-columns: 1fr 24px 1fr;
        gap: 0.5rem;
    }

    .decade-title {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
        margin-top: 30px;
        gap: 50px;
        transform: translateX(-12px);
    }

    .decade-title span {
        font-size: 0.55rem;
        letter-spacing: 0.1rem;
    }

    .timeline-leading-star {
        width: 24px;
        height: 24px;
    }

    .timeline-leading-star::before {
        width: 60px;
        height: 60px;
    }

    .timeline-dot {
        width: 8px;
        height: 8px;
        border-width: 5px;
    }

    /* Cards ainda menores */
    .season-card-content {
        padding: 0.5rem;
    }

    .season-card-year {
        font-size: 0.95rem;
    }

    .season-card-label {
        font-size: 0.5rem;
        letter-spacing: 0.5px;
    }
}