/* ============================================
   Book Progress – Horizontal Timeline
   ============================================ */

.book-progress-section {
    background-color: #111111;
    background-image: linear-gradient(32deg,
            rgba(8, 8, 8, 0.74) 30px,
            transparent);
    background-size: 60px 60px;
    background-position: -5px -5px;
    padding: 5rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.book-progress-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(74, 168, 201, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.progress-header {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    z-index: 1;
}

.progress-header .ornament {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: #e4d88a;
}

.progress-header .section-title {
    color: #e4d88a;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.progress-header .section-subtitle {
    color: #888;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

/* ---- Horizontal Timeline ---- */
.timeline-horizontal {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 1rem;
}

/* The horizontal bar (track) */
.timeline-track {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 0;
}

/* The background line connecting all dots */
.timeline-track::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 24px;
    right: 24px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    z-index: 0;
}

/* The filled progress line */
.timeline-track::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 24px;
    height: 3px;
    background: linear-gradient(90deg, #e4d88a 0%, #4aa8c9 100%);
    border-radius: 3px;
    width: 0;
    animation: fill-track 2s ease-out 0.5s forwards;
    z-index: 0;
}

@keyframes fill-track {
    to {
        /* Fill up to ~38% (between milestone 2 and 3, since 2 of 6 done, progressing toward 3) */
        width: 38%;
    }
}

/* ---- Individual Milestone ---- */
.timeline-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    opacity: 0;
    animation: ms-appear 0.5s ease forwards;
    z-index: 1;
}

.timeline-milestone:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-milestone:nth-child(2) {
    animation-delay: 0.25s;
}

.timeline-milestone:nth-child(3) {
    animation-delay: 0.4s;
}

.timeline-milestone:nth-child(4) {
    animation-delay: 0.55s;
}

.timeline-milestone:nth-child(5) {
    animation-delay: 0.7s;
}

.timeline-milestone:nth-child(6) {
    animation-delay: 0.85s;
}

@keyframes ms-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Dot ---- */
.ms-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 3px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    font-size: 0.7rem;
    color: #555;
    font-weight: 700;
}

/* Completed dot */
.timeline-milestone.completed .ms-dot {
    background: #e4d88a;
    border-color: #e4d88a;
    color: #111;
    box-shadow: 0 0 12px rgba(228, 216, 138, 0.35),
        0 0 30px rgba(228, 216, 138, 0.1);
}

/* In-progress dot */
.timeline-milestone.in-progress .ms-dot {
    background: #4aa8c9;
    border-color: #4aa8c9;
    color: #fff;
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(74, 168, 201, 0.4), 0 0 20px rgba(74, 168, 201, 0.1);
    }

    50% {
        box-shadow: 0 0 16px rgba(74, 168, 201, 0.7), 0 0 40px rgba(74, 168, 201, 0.2);
    }
}

/* Upcoming dot */
.timeline-milestone.upcoming .ms-dot {
    border-color: rgba(255, 255, 255, 0.1);
}

/* ---- Label area below dot ---- */
.ms-label {
    text-align: center;
    margin-top: 1rem;
    max-width: 120px;
}

.ms-date {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4aa8c9;
    font-weight: 600;
    margin-bottom: 0.3rem;
    white-space: nowrap;
}

.timeline-milestone.completed .ms-date {
    color: #e4d88a;
}

.timeline-milestone.upcoming .ms-date {
    color: #555;
}

.ms-title {
    color: #d0ccc0;
    font-size: 0.82rem;
    line-height: 1.35;
    font-weight: 400;
}

.timeline-milestone.upcoming .ms-title {
    color: #555;
}

.ms-sub {
    color: #444;
    font-size: 0.65rem;
    margin-top: 0.2rem;
    line-height: 1.3;
}

/* ---- Badge ---- */
.ms-badge {
    display: inline-block;
    margin-top: 0.45rem;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ms-badge.complete {
    background: rgba(228, 216, 138, 0.15);
    color: #e4d88a;
    border: 1px solid rgba(228, 216, 138, 0.3);
}

.ms-badge.current {
    background: rgba(74, 168, 201, 0.15);
    color: #4aa8c9;
    border: 1px solid rgba(74, 168, 201, 0.3);
}

.ms-badge.future {
    background: rgba(255, 255, 255, 0.04);
    color: #555;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- Disclaimer ---- */
.progress-disclaimer {
    text-align: center;
    margin-top: 3rem;
    color: #cc3333;
    font-size: 0.82rem;
    font-style: italic;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ============ Responsive ============ */

/* Tablet: keep horizontal but smaller */
@media (max-width: 900px) {
    .ms-label {
        max-width: 100px;
    }

    .ms-title {
        font-size: 0.75rem;
    }

    .ms-date {
        font-size: 0.65rem;
    }

    .ms-dot {
        width: 30px;
        height: 30px;
        font-size: 0.6rem;
    }

    .ms-sub {
        display: none;
    }
}

/* Mobile: scroll horizontally */
@media (max-width: 640px) {
    .book-progress-section {
        padding: 3.5rem 1rem 3rem;
    }

    .timeline-horizontal {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
    }

    .timeline-horizontal::-webkit-scrollbar {
        height: 4px;
    }

    .timeline-horizontal::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.03);
    }

    .timeline-horizontal::-webkit-scrollbar-thumb {
        background: rgba(74, 168, 201, 0.3);
        border-radius: 4px;
    }

    .timeline-track {
        min-width: 700px;
        padding: 0 1rem;
    }

    .ms-dot {
        width: 28px;
        height: 28px;
        font-size: 0.55rem;
    }

    .timeline-track::before,
    .timeline-track::after {
        top: 14px;
    }

    .ms-label {
        max-width: 90px;
    }

    .ms-title {
        font-size: 0.72rem;
    }

    .ms-sub {
        display: none;
    }
}