/* =====================================================================
   Tour Highlights — horizontal bookshelf with fixed image cover
   ===================================================================== */

.tour-highlights {
    background: #f7f7f6;
    border-top: 1px solid #e8e8e8;
    overflow: hidden;
}

.tour-highlights__inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 40px 40px 0;
}

/* ── Heading ───────────────────────────────────────────────────────── */
.tour-highlights__heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.tour-highlights__heading-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #e8620a;
    white-space: nowrap;
}

.tour-highlights__heading-line {
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.tour-highlights__title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.5px;
    margin: 0 0 28px;
    line-height: 1.25;
}

/* ── Shelf: books strip + image cover ───────────────────────────── */
.tour-highlights__shelf {
    display: flex;
    height: 320px;
    overflow: hidden;
}

/* ── Books strip (left, flex) ─────────────────────────────────── */
.tour-highlights__books {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
}

/* ── Individual book ─────────────────────────────────────────────── */
.tour-highlights__book {
    position: relative;
    flex: 0 0 56px;
    cursor: pointer;
    overflow: hidden;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    will-change: flex-basis;
    contain: layout style;
    transition: flex-basis 0.52s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s ease;
}

.tour-highlights__book:first-child {
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

/* Hover on closed book: widen + highlight spine --*/
.tour-highlights__book:hover:not(.is-open) {
    background: #fff9f6;
    flex-basis: 80px;
}

.tour-highlights__book:hover:not(.is-open) .tour-highlights__spine-num {
    color: #c9520a;
}

.tour-highlights__book:hover:not(.is-open) .tour-highlights__spine-title {
    color: #111;
}

.tour-highlights__book:hover:not(.is-open) .tour-highlights__spine-arrow {
    opacity: 1;
    transform: translateX(0);
}

.tour-highlights__book.is-open {
    flex: 1 1 auto;
    cursor: default;
    background: #fff;
}

/* ── Spine ──────────────────────────────────────────────────────────── */
.tour-highlights__spine {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 20px;
    gap: 10px;
    opacity: 1;
    transition: opacity 0.1s ease;
    pointer-events: none;
}

.tour-highlights__book.is-open .tour-highlights__spine {
    opacity: 0;
    transition: opacity 0.08s ease;
}

.tour-highlights__spine-num {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #e8620a;
    font-variant-numeric: tabular-nums;
    transition: color 0.18s;
}

.tour-highlights__spine-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #666;
    white-space: nowrap;
    line-height: 1;
    transition: color 0.18s;
}

/* Arrow hint at the bottom of the spine */
.tour-highlights__spine-arrow {
    color: #e8620a;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Content ─────────────────────────────────────────────────────────── */
.tour-highlights__content {
    position: absolute;
    inset: 0;
    padding: 72px 28px 26px;
    opacity: 0;
    pointer-events: none;
    /* Delay appearance until the width animation is nearly complete */
    transition: opacity 0.18s ease 0.22s;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 200px;
}

.tour-highlights__book.is-open .tour-highlights__content {
    opacity: 1;
    pointer-events: auto;
}

/* Collapse sequence: content fades out before flex-basis collapses */
.tour-highlights__book.is-closing .tour-highlights__content {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease 0s;
}

.tour-highlights__content-num {
    font-size: 56px;
    font-weight: 800;
    color: #f0ede8;
    line-height: 1;
    letter-spacing: -3px;
    font-variant-numeric: tabular-nums;
    position: absolute;
    top: 18px;
    left: 24px;
    pointer-events: none;
}

.tour-highlights__content-title {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 10px;
    line-height: 1.3;
}

.tour-highlights__content-desc {
    font-size: 13.5px;
    color: #555;
    line-height: 1.72;
    max-width: 340px;
}

/* ── Image cover panel (fixed right side of shelf) ───────────────── */
.tour-highlights__cover {
    flex: 0 0 430px;
    height: 100%;
    border-left: 3px solid #ff9900;
    overflow: hidden;
    position: relative;
}

.tour-highlights__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.6s ease;
}

.tour-highlights__cover:hover img {
    transform: scale(1.03);
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .tour-highlights__cover {
        flex-basis: 260px;
    }
}

@media (max-width: 900px) {
    .tour-highlights__cover {
        flex-basis: 200px;
    }

    .tour-highlights__book {
        flex-basis: 48px;
    }

    .tour-highlights__book:hover:not(.is-open) {
        flex-basis: 66px;
    }
}

@media (max-width: 768px) {
    .tour-highlights__inner {
        padding: 0 20px;
    }

    .tour-highlights__title {
        font-size: 18px;
    }

    /* Stack shelf vertically on mobile */
    .tour-highlights__shelf {
        flex-direction: column;
        height: auto;
        border-bottom: none;
        border-left: 3px solid #ff9900;
    }

    .tour-highlights__books {
        flex-direction: column;
        height: auto;
    }

    .tour-highlights__book {
        flex: none !important;
        width: 100% !important;
        height: 52px;
        border-right: none;
        border-left: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.07);
        transition: height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
                    background 0.2s ease;
    }

    .tour-highlights__book:first-child {
        border-left: none;
    }

    .tour-highlights__book:hover:not(.is-open) {
        flex-basis: auto;
        height: 62px;
    }

    .tour-highlights__book.is-open {
        height: 210px;
    }

    .tour-highlights__spine {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0 16px;
        gap: 10px;
        align-items: center;
        height: 52px;
        top: 0;
        bottom: auto;
    }

    .tour-highlights__spine-title {
        writing-mode: horizontal-tb;
        transform: none;
        letter-spacing: 1.5px;
    }

    .tour-highlights__spine-arrow {
        writing-mode: horizontal-tb;
        transform: none;
        opacity: 0.4;
        margin-top: 0;
    }

    .tour-highlights__book:hover:not(.is-open) .tour-highlights__spine-arrow {
        opacity: 1;
        transform: none;
    }

    .tour-highlights__content {
        padding: 60px 18px 18px;
        min-width: unset;
    }

    .tour-highlights__content-num {
        font-size: 36px;
        top: 8px;
        left: 14px;
    }

    /* Image below books on mobile */
    .tour-highlights__cover {
        flex: none;
        width: 100%;
        height: 220px;
        border-left: none;
        border-top: 3px solid #ff9900;
    }
}
