
/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Offset při scrollování na anchor */
.timeline-content {
    scroll-margin-top: 300px; /* Posune scroll 300px výše od začátku boxu */
}



/* ===== TIMELINE STYLY ===== */

.timeline-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.timeline-header {
    text-align: center;
    margin-bottom: 50px;
}

.timeline-header h1 {
    color: yellow;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.timeline-header p {
    color: #40e0d0;
    font-size: 1.2em;
    font-style: italic;
}

/* ===== PŘEPÍNAČ SMĚRU (trojúhelníky na ose) ===== */
.timeline-order-switch {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 25px;
    line-height: 0.7;
}

.order-btn {
    text-decoration: none;
    color: rgba(64, 224, 208, 0.3);
    font-size: 1.6em;
    transition: all 0.3s ease;
}

.order-btn:hover {
    color: #40e0d0;
    text-shadow: 0 0 12px #40e0d0;
    transform: scale(1.2);
}

.order-btn.active {
    color: #40e0d0;
    text-shadow: 0 0 12px #40e0d0;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

/* Hlavní čára timeline */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #40e0d0;    
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin: 40px 0;
    width: 100%;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.8s ease forwards;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 55%;
    text-align: left;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 55%;
    text-align: right;
}

/* Kruhový indikátor na timeline */
.timeline-marker {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 20px;
    height: 20px;
    background: #40e0d0;
    border: 4px solid #000;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-marker:hover {
    width: 30px;
    height: 30px;
    top: 15px;
    box-shadow: 0 0 20px #40e0d0;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #40e0d0;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(64, 224, 208, 0.3);
}

.timeline-year {
    display: inline-block;
    background: linear-gradient(45deg, #40e0d0, #32cd32);
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(64, 224, 208, 0.4);
}

.timeline-title {
    color: #da70d6;
    text-align: center;
    font-size: 1.3em;
    margin-bottom: 12px;
    font-weight: bold;
}

.timeline-description {
    color: #ccc;
    text-align: left;
    line-height: 1.6;
    font-size: 1.05em;
    margin-top: 15px;
}

.timeline-people {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(64, 224, 208, 0.3);
    font-style: italic;
    color: #40e0d0;
    text-align: left;
}

/* Skrytý obsah */
.timeline-details {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed rgba(64, 224, 208, 0.5);
    animation: fadeIn 0.3s ease;
}

/* Zobrazený obsah */
.timeline-details.expanded {
    display: block;
}

/* Indikátor rozbalení */
.expand-indicator {
    color: #40e0d0;
    font-size: 1.2em;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.expand-indicator.expanded {
    transform: rotate(180deg);
}

/* Bold text pro důležité informace */
.bold-CAL {
    font-weight: bold;
    color: #40e0d0;
}

/* Animace */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Delay pro postupné objevování */
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; }
.timeline-item:nth-child(8) { animation-delay: 0.8s; }
.timeline-item:nth-child(9) { animation-delay: 0.9s; }
.timeline-item:nth-child(10) { animation-delay: 1.0s; }
.timeline-item:nth-child(11) { animation-delay: 1.1s; }
.timeline-item:nth-child(12) { animation-delay: 1.2s; }

/* ===== RESPONSIVE DESIGN PRO TIMELINE ===== */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-marker {
        left: 30px;
    }

    .timeline-item:nth-child(even) .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        margin-left: 70px;
        margin-right: 0;
        text-align: left;
    }

    .timeline-header h1 {
        font-size: 1.8em;
    }

    .timeline-container {
        padding: 20px 10px;
    }

    .timeline-content {
        padding: 20px;
    }

    .timeline-year {
        font-size: 1em;
        padding: 6px 12px;
    }

    .timeline-title {
        font-size: 1.1em;
    }

    .timeline-description {
        font-size: 1em;
    }
}
