/* ==================================
   Day 1 Itinerary Schedule Layout
==================================== */
.itinerary-page {
    padding: 60px 24px;
    background-color: var(--light-grey, #EDF2F7);
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 72px);
}

.itinerary-container {
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* 1. Viewport Header & Page Navigation */
.itinerary-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-grey, #4A5568);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--brand-red, #C8102E);
}

.itinerary-date {
    color: var(--brand-navy, #0A2540);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
}

.itinerary-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding-left: 16px;
    border-left: 4px solid var(--gold-accent, #D4AF37);
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-grey, #4A5568);
    font-size: 0.9375rem;
    font-weight: 600;
}

.meta-item.accent-red {
    color: var(--brand-red, #C8102E);
}

.meta-item .material-symbols-outlined {
    font-size: 1.25rem;
}

/* 2. Timeline Tree Architecture */
.timeline-tree {
    display: flex;
    flex-direction: column;
}

.timeline-item {
    display: flex;
    flex-direction: row;
    gap: 24px;
}

/* Left Track: Vertical Timeline Axis */
.timeline-time {
    width: 160px;
    flex-shrink: 0;
    text-align: right;
    padding-top: 24px; /* Optically aligns text alongside the ring marker */
}

.timeline-time span {
    color: var(--brand-navy, #0A2540);
    font-size: 1.125rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Timeline Node Markers */
.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 24px;
    flex-shrink: 0;
}

.marker-ring {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--light-grey, #EDF2F7);
    border: 3px solid;
    margin-top: 28px;
    z-index: 2;
}

/* State-Driven Color Tokens */
.ring-gold { border-color: var(--gold-accent, #D4AF37); }
.ring-gray { border-color: var(--text-grey, #4A5568); }
.ring-red { border-color: var(--brand-red, #C8102E); }

.marker-line {
    position: absolute;
    top: 44px;
    bottom: -28px; /* Bridges the gap down to the next row */
    width: 2px;
    background-color: var(--border-grey, #E2E8F0);
    z-index: 1;
}

/* Right Track: Content Card Container Stack */
.timeline-content {
    flex: 1;
    position: relative;
    padding: 24px 32px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-content:hover {
    transform: translateY(-2px);
}

.external-link-icon {
    position: absolute;
    top: 24px;
    right: 24px;
    color: inherit;
    opacity: 0.4;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.timeline-content:hover .external-link-icon {
    opacity: 1;
}

.card-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.3;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.card-desc {
    font-size: 1rem;
    line-height: 1.6;
}

/* Standard Light Theme Card */
.light-card {
    background-color: var(--bg-white, #ffffff);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-grey, #E2E8F0);
}
.light-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.light-card .card-kicker { color: var(--text-grey, #4A5568); }
.light-card .card-title { color: var(--brand-navy, #0A2540); }
.light-card .card-meta { color: var(--text-grey, #4A5568); }
.light-card .card-desc { color: var(--text-grey, #4A5568); }

/* Featured Dark Theme Card */
.dark-card {
    background-color: var(--brand-navy, #0A2540);
    color: var(--bg-white, #ffffff);
    border-left: 6px solid var(--gold-accent, #D4AF37);
    box-shadow: 0 8px 25px rgba(10, 37, 64, 0.15);
}
.dark-card:hover {
    box-shadow: 0 12px 30px rgba(10, 37, 64, 0.25);
}
.dark-card .card-kicker { color: var(--gold-accent, #D4AF37); }
.dark-card .card-title { color: var(--bg-white, #ffffff); }
.dark-card .card-meta { color: rgba(255, 255, 255, 0.8); }
.dark-card .card-desc { color: rgba(255, 255, 255, 0.9); }

/* Responsive Viewport Reflow */
@media (max-width: 768px) {
    .itinerary-date {
        font-size: 2.25rem;
    }
    
    .itinerary-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .timeline-item {
        flex-direction: column;
        gap: 8px; /* Tightens the gap between the migrated timestamp and the card */
    }
    
    /* Timestamps collapse into an overline kicker */
    .timeline-time {
        width: 100%;
        text-align: left;
        padding-top: 0;
        padding-left: 4px;
    }
    
    .timeline-time span {
        font-size: 0.875rem;
        color: var(--text-grey, #4A5568);
    }
    
    /* Free up horizontal screen width */
    .timeline-marker {
        display: none; 
    }
    
    .timeline-content {
        margin-bottom: 32px;
        padding: 24px;
    }
}