/**
 * Timeline & Chronology Components
 * For chronological content display
 */

/* ===================================
   Timeline Container
   =================================== */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: var(--spacing-xl, 2rem) auto;
    padding: var(--spacing-lg, 1.5rem) 0;
}

/* Timeline Line */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #f4b223, #1a5490);
    top: 0;
}

/* ===================================
   Timeline Items
   =================================== */
.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-xl, 2rem);
    width: calc(50% - 40px);
}

.timeline-item:nth-child(odd) {
    margin-left: 0;
    margin-right: auto;
    text-align: right;
}

.timeline-item:nth-child(even) {
    margin-left: auto;
    margin-right: 0;
    text-align: left;
}

/* Timeline Dot */
.timeline-dot {
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background-color: #f4b223;
    border: 4px solid #1a5490;
    border-radius: 50%;
    z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -50px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -50px;
}

/* Timeline Card */
.timeline-card {
    background-color: white;
    padding: var(--spacing-md, 1rem);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

/* Timeline Arrow */
.timeline-card::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border-style: solid;
}

.timeline-item:nth-child(odd) .timeline-card::before {
    right: -15px;
    border-width: 15px 0 15px 15px;
    border-color: transparent transparent transparent white;
}

.timeline-item:nth-child(even) .timeline-card::before {
    left: -15px;
    border-width: 15px 15px 15px 0;
    border-color: transparent white transparent transparent;
}

/* Timeline Year */
.timeline-year {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a5490;
    margin-bottom: var(--spacing-sm, 0.5rem);
    font-family: 'Segoe UI', sans-serif;
}

.timeline-date {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: var(--spacing-xs, 0.25rem);
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a5490;
    margin-bottom: var(--spacing-xs, 0.25rem);
}

.timeline-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
}

/* ===================================
   Decade Navigation
   =================================== */
.decade-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm, 0.5rem);
    margin: var(--spacing-xl, 2rem) 0;
    padding: var(--spacing-md, 1rem);
    background-color: #f5f5f5;
    border-radius: 8px;
}

.decade-link {
    padding: var(--spacing-xs, 0.25rem) var(--spacing-md, 1rem);
    background-color: #1a5490;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.decade-link:hover {
    background-color: #0d3a66;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.decade-link.active {
    background-color: #f4b223;
    color: #1a5490;
}

/* ===================================
   Chronology Cards (Alternative Layout)
   =================================== */
.chronology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md, 1rem);
    margin: var(--spacing-lg, 1.5rem) 0;
}

.chronology-card {
    background-color: white;
    border-left: 4px solid #f4b223;
    padding: var(--spacing-md, 1rem);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.chronology-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateX(4px);
}

.chronology-year {
    font-size: 2rem;
    font-weight: 700;
    color: #1a5490;
    margin-bottom: var(--spacing-xs, 0.25rem);
    font-family: 'Segoe UI', sans-serif;
}

.chronology-event {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: var(--spacing-xs, 0.25rem);
}

.chronology-event strong {
    color: #1a5490;
}

/* ===================================
   Responsive Timeline
   =================================== */
@media screen and (max-width: 768px) {
    /* Single column timeline on mobile */
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        margin-right: 0 !important;
        text-align: left !important;
    }

    .timeline-dot {
        left: 20px !important;
        right: auto !important;
    }

    .timeline-card::before {
        left: -15px !important;
        right: auto !important;
        border-width: 15px 15px 15px 0 !important;
        border-color: transparent white transparent transparent !important;
    }

    .decade-nav {
        gap: var(--spacing-xs, 0.25rem);
    }

    .decade-link {
        font-size: 0.875rem;
        padding: var(--spacing-xs, 0.25rem) var(--spacing-sm, 0.5rem);
    }

    .chronology-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .timeline-year {
        font-size: 1.2rem;
    }

    .timeline-title {
        font-size: 1rem;
    }

    .timeline-description {
        font-size: 0.875rem;
    }

    .chronology-year {
        font-size: 1.5rem;
    }
}
