/* ==========================================================================
   Stránka O nás – Časová mapa & Historie souboru
   ========================================================================== */
.main-about {
    padding-top: 50px;
}

.about-timeline-section {
    padding: 70px 0 80px 0;
    background-color: var(--color-bg);
    position: relative;
    overflow: hidden;
}

.timeline-header {
    text-align: center;
    max-width: 840px;
    margin: 0 auto 60px auto;
}

.timeline-header .subtitle-badge {
    margin-bottom: 22px;
}

.timeline-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--color-secondary);
    margin-bottom: 20px;
    line-height: 1.15;
}

.timeline-subtitle {
    font-size: 1.15rem;
    color: var(--color-text);
    line-height: 1.7;
    margin: 0 auto;
    max-width: 780px;
}

/* Obal samotné časové osy */
.timeline-container {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 0;
}

/* Svislá vodící čára uprostřed */
.timeline-track {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: #e5e7eb;
    transform: translateX(-50%);
    border-radius: 4px;
}

/* Progresivní barevná linka při scrollování */
.timeline-track-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--color-primary) 0%, #b32228 100%);
    border-radius: 4px;
    transition: height 0.15s ease-out;
}

/* Jednotlivý záznam na časové ose */
.timeline-item {
    position: relative;
    margin-bottom: 60px;
    width: 100%;
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Uzel / Bod na ose */
.timeline-marker {
    position: absolute;
    top: 26px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--color-white);
    border: 4px solid var(--color-secondary);
    box-shadow: 0 0 0 4px var(--color-white), 0 4px 10px rgba(0, 0, 0, 0.12);
    z-index: 3;
    transition: all 0.35s ease;
}

.timeline-item.in-view .timeline-marker {
    border-color: var(--color-primary);
    background-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-white), 0 0 16px rgba(209, 34, 41, 0.35);
}

/* Výroční / jubilejní uzel */
.timeline-marker.jubilee {
    width: 32px;
    height: 32px;
    border-width: 5px;
}

.timeline-item.in-view .timeline-marker.jubilee {
    animation: markerPulse 2.5s infinite;
}

@keyframes markerPulse {
    0% {
        box-shadow: 0 0 0 4px var(--color-white), 0 0 0 0 rgba(209, 34, 41, 0.5);
    }
    70% {
        box-shadow: 0 0 0 4px var(--color-white), 0 0 0 12px rgba(209, 34, 41, 0);
    }
    100% {
        box-shadow: 0 0 0 4px var(--color-white), 0 0 0 0 rgba(209, 34, 41, 0);
    }
}

/* Obsahová karta */
.timeline-content {
    position: relative;
    width: 44%;
    background-color: var(--color-white);
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    z-index: 2;
}

.timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.07);
    border-color: #dfdfdf;
}

/* Karta vlevo */
.timeline-item.left .timeline-content {
    margin-right: auto;
}

/* Karta vpravo */
.timeline-item.right .timeline-content {
    margin-left: auto;
}

/* Šipka ukazující na osu */
.timeline-content::before {
    content: '';
    position: absolute;
    top: 26px;
    width: 14px;
    height: 14px;
    background-color: var(--color-white);
    border: 1px solid #eaeaea;
    transform: translateY(-50%) rotate(45deg);
    z-index: -1;
}

.timeline-item.left .timeline-content::before {
    right: -8px;
    border-left: none;
    border-bottom: none;
}

.timeline-item.right .timeline-content::before {
    left: -8px;
    border-right: none;
    border-top: none;
}

/* Horní lišta karty (Rok a Štítek) */
.timeline-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f3f5;
}

.timeline-year {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    letter-spacing: -0.5px;
}

.timeline-badge {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f3f5f8;
    color: var(--color-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-radius: 20px;
}

.timeline-badge.jubilee {
    background-color: rgba(209, 34, 41, 0.1);
    color: var(--color-primary);
}

.timeline-desc {
    font-size: 1.02rem;
    color: var(--color-text);
    line-height: 1.65;
    margin: 0;
}

/* Výroční zvýrazněná karta */
.timeline-item.is-jubilee .timeline-content {
    border-left: 4px solid var(--color-primary);
}


.timeline-item.is-jubilee.left .timeline-content {
    border-right: 4px solid var(--color-primary);
    border-left: 1px solid #eaeaea;
}

/* Responzivita časové osy */
@media (max-width: 900px) {
    .timeline-title {
        font-size: 2.4rem;
    }

    .timeline-container {
        padding: 20px 0;
    }

    /* Čára se přesune doleva */
    .timeline-track {
        left: 24px;
        transform: none;
    }

    /* Všechny uzly doleva */
    .timeline-marker {
        left: 24px;
        transform: translate(-50%, -50%);
    }

    .timeline-marker.jubilee {
        width: 28px;
        height: 28px;
    }

    /* Všechny karty doprava */
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        margin-right: 0 !important;
        padding: 22px 24px;
    }

    .timeline-content::before {
        left: -8px !important;
        right: auto !important;
        border-right: none !important;
        border-top: none !important;
        border-left: 1px solid #eaeaea !important;
        border-bottom: 1px solid #eaeaea !important;
    }

    .timeline-item.is-jubilee .timeline-content,
    .timeline-item.is-jubilee.left .timeline-content {
        border-left: 4px solid var(--color-primary);
        border-right: 1px solid #eaeaea;
    }
}

@media (max-width: 600px) {
    .about-timeline-section {
        padding: 60px 0 50px 0;
    }

    .timeline-title {
        font-size: 2rem;
    }

    .timeline-year {
        font-size: 1.55rem;
    }

    .timeline-content {
        padding: 18px 20px;
    }

    .timeline-desc {
        font-size: 0.95rem;
    }
}