/* ============================================================
   INTERACTIVE TIMELINE - POMPEYRAMA
   Styles for timeline.php (decade accordion + milestone cards)
   and the homepage preview widget on index.php
   ============================================================ */

/* ------------------------------------------------------------
   DECADE QUICK-JUMP STRIP (top of timeline.php)
   ------------------------------------------------------------ */
.decade-jump-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 900px;
    margin: 0 auto 20px;
    padding: 0 10px;
}

.decade-jump-pill {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(180deg, #0044cc 0%, #002a80 100%);
    border: 1px solid #003da5;
    border-radius: 20px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.decade-jump-pill:hover {
    background: linear-gradient(180deg, #1a66ff 0%, #0047cc 100%);
    box-shadow: 0 0 10px rgba(255, 204, 51, 0.45);
    transform: translateY(-2px);
}

/* ------------------------------------------------------------
   HISTORY PROGRESS BAR
   ------------------------------------------------------------ */
.timeline-progress-wrap {
    max-width: 900px;
    margin: 0 auto 30px;
    padding: 0 10px;
    text-align: center;
}

.timeline-progress-label {
    font-size: 13px;
    color: #b3c9e6;
    margin-bottom: 8px;
}

.timeline-progress-bar {
    position: relative;
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.timeline-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ffcc33 0%, #ff9900 100%);
    border-radius: 6px 0 0 6px;
    transition: width 0.6s ease;
}

/* ------------------------------------------------------------
   MILESTONE CARDS (inside decade-content accordion body)
   ------------------------------------------------------------ */
.milestone-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
    padding: 10px;
}

.milestone-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(135deg, #002b66 0%, #001f4d 100%);
    border: 1px solid #003d80;
    border-left: 5px solid var(--milestone-color, #66a3ff);
    border-radius: 8px;
    padding: 14px 16px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}

/* Full-card background photo variant (milestones.background_image)
   NOTE: background-image itself is now set inline via PHP (not via a CSS
   custom property + url()), because url() values referenced through a CSS
   custom property are resolved relative to the *stylesheet's* location,
   not the element's document location - which broke image loading. This
   rule now only supplies the sizing/position for that inline image. */
.milestone-card.has-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}



.milestone-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 87, 184, 0.3);
    border-color: #66a3ff;
}

.milestone-icon {
    font-size: 26px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

/* Promotion/relegation arrow badges (styled instead of emoji so colors are controllable) */
.milestone-arrow-badge,
.timeline-mini-icon .milestone-arrow-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4em;
    height: 1.4em;
    border-radius: 50%;
    color: #ffffff;
    font-size: 0.85em;
    line-height: 1;
}

.milestone-arrow-up {
    background: #22c55e;
}

.milestone-arrow-down {
    background: #ef4444;
}


.milestone-image {
    flex-shrink: 0;
    width: 59px;
    height: 59px;

    line-height: 1;
    margin-top: 2px;
    border-radius: 4px;
    overflow: hidden;
}


.milestone-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top;
    display: block;
}



.milestone-body {
    flex: 1;
    min-width: 0;
}

.milestone-type-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--milestone-color, #66a3ff);
    margin-bottom: 4px;
}

.milestone-season-label {
    font-size: 11px;
    color: #8fb3d9;
    margin-bottom: 4px;
}

.milestone-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
    line-height: 1.3;
}

.milestone-description {
    font-size: 13px;
    color: #b3c9e6;
    margin: 0 0 10px;
    line-height: 1.4;
}

.milestone-explore-btn {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.milestone-explore-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* ------------------------------------------------------------
   HOMEPAGE PREVIEW WIDGET (index.php)
   ------------------------------------------------------------ */
.timeline-preview-section {
    margin-bottom: 30px;
}

.timeline-preview-section h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.timeline-preview-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
}

.timeline-preview-scroll::-webkit-scrollbar {
    height: 6px;
}

.timeline-preview-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
}

.timeline-mini-card {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 200px;
    background: linear-gradient(135deg, #002b66 0%, #001f4d 100%);
    border: 1px solid #003d80;
    border-left: 4px solid var(--milestone-color, #66a3ff);
    border-radius: 8px;
    padding: 12px 14px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Full-tile background photo variant (milestones.background_image)
   NOTE: background-image itself is set inline via PHP (see index.php),
   not via a CSS custom property + url(), because url() values referenced
   through a custom property are resolved relative to the *stylesheet's*
   location rather than the element's document - which broke image
   loading. This rule now only supplies sizing/position for that image. */
.timeline-mini-card.has-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}




.timeline-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 87, 184, 0.3);
    border-color: #66a3ff;
}

.timeline-mini-icon {
    font-size: 20px;
    margin-bottom: 6px;
}

.timeline-mini-image {
    width: 45px;
    height: 45px;

    margin-bottom: 6px;
    border-radius: 4px;
    overflow: hidden;
}


.timeline-mini-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top;
    display: block;
}



.timeline-mini-season {
    font-size: 10px;
    color: #8fb3d9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.timeline-mini-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin: 0;
}

.timeline-view-all-link {
    display: inline-block;
    margin-top: 12px;
    color: #66a3ff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.timeline-view-all-link:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 600px) {
    .milestone-card {
        padding: 12px;
        gap: 10px;
    }

    .milestone-title {
        font-size: 14px;
    }

    .milestone-description {
        font-size: 12px;
    }

    .timeline-mini-card {
        width: 160px;
    }
}
