/**
 * YDO article gallery (Premium multi-image pages).
 *
 * Replaces the legacy bxslider with a main image + thumbnail rail, matching the
 * redesign references (439686-7.OCTO — Airbnb/Tiqets style). Thumbnails on the
 * left on desktop, a horizontal strip under the main image on mobile. Colours
 * come from the shared tokens (navy --accent).
 */
.ydo-gallery {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 18px;
    font-family: 'Open Sans', Roboto, Arial, sans-serif;
}

/* Thumbnail rail */
.ydo-gallery__thumbs {
    flex: 0 0 92px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}
.ydo-gallery__thumb {
    flex: 0 0 70px;
    width: 92px;
    height: 70px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background-color: var(--bg-soft, #f6f7f9);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    position: relative;
    transition: border-color .15s ease, opacity .15s ease;
    opacity: .85;
}
.ydo-gallery__thumb:hover { opacity: 1; }
.ydo-gallery__thumb.is-active {
    border-color: var(--accent, #1b2a4a);
    opacity: 1;
}
/* "See More" overlay on the last thumb when there are extra images */
.ydo-gallery__thumb--more::after {
    content: "+" attr(data-more) "\00a0More";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(13, 17, 23, .55);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* Main image */
.ydo-gallery__main {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-soft, #f6f7f9);
}
.ydo-gallery__main-img {
    display: block;
    width: 100%;
    height: 480px;
    object-fit: cover;
}
/* Top-left overlay row: YDO logo badge + type label side by side */
.ydo-gallery__topleft {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ydo-gallery__topleft .ydo-img-logo,
.ydo-gallery__topleft .ydo-gallery__label { position: static; }
.ydo-gallery__label {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--accent, #1b2a4a);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}
.ydo-gallery__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 16px 12px;
    background: linear-gradient(transparent, rgba(13, 17, 23, .65));
    color: #fff;
    font-size: 13px;
    white-space: pre-line;
}
.ydo-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--accent, #1b2a4a);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(13, 17, 23, .2);
    transition: background .15s ease, color .15s ease;
}
.ydo-gallery__nav:hover { background: var(--accent, #1b2a4a); color: #fff; }
.ydo-gallery__prev { left: 12px; }
.ydo-gallery__next { right: 12px; }

/* ---- Sticky mobile "Book Now" bar (ticketed pages) ---- */
.ydo-sticky-book { display: none; }
@media (max-width: 991.98px) {
    .ydo-sticky-book {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        padding: 10px 14px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid var(--border, #e6e8ec);
        box-shadow: 0 -4px 16px rgba(13, 17, 23, .08);
    }
    .ydo-sticky-book .book-now {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: center;
        height: 48px;
        border-radius: 999px;
        /* Discovery tier — same colour as the desktop sidebar "Book Now". */
        background: var(--discover-primary, #274bd0);
        color: #fff !important;
        font-weight: 700;
        font-size: 15px;
        text-decoration: none;
    }
    .ydo-sticky-book .book-now:hover { background: var(--discover-primary-hover, #1e3ba8); color: #fff !important; }
    body.ydo-has-sticky-book { padding-bottom: 76px; }

    /* The sticky bar replaces the sidebar's "Book Now" on mobile — without this
       the mobile copy of the sidebar shows a second, duplicate Book Now. */
    body.ydo-has-sticky-book .article-content > .sidebar-left .book-now { display: none !important; }
}

/* ---- Premium page header (Top Rated / stars / reviews / location) ---- */
.ydo-premium-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 2px 0 16px;
    font-family: 'Open Sans', Roboto, Arial, sans-serif;
}
.ydo-premium-head__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--accent, #1b2a4a);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}
.ydo-premium-head__badge .fa { color: var(--ydo-yellow, #fdb813); }
.ydo-premium-head__meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-muted, #5b6472);
    font-size: 14px;
}
.ydo-premium-head__rate { color: var(--text, #0d1117); font-weight: 700; }
.ydo-premium-head__reviews { color: var(--accent, #1b2a4a); font-weight: 600; text-decoration: underline; }
.ydo-premium-head__reviews:hover { color: var(--accent-hover, #13203a); }
.ydo-premium-head__sep { color: var(--border-strong, #d3d6dd); }
.ydo-premium-head__loc { display: inline-flex; align-items: center; gap: 5px; }
.ydo-premium-head .star-ratings-sprite { vertical-align: middle; }

/* ---- Premium promo panels (replace ad units with the business's own promos) ---- */
.ydo-promos {
    margin: 26px 0;
    font-family: 'Open Sans', Roboto, Arial, sans-serif;
}
.ydo-promos__heading {
    font-size: 18px;
    font-weight: 800;
    color: var(--ydo-navy, #1b2a4a);
    margin: 0 0 14px;
}
.ydo-promos__viewport { position: relative; }
/* Mobile-first: always a horizontal swipe track (1+ cards), no JS needed -
   native scroll-snap. Desktop decides grid-vs-slider below based on count. */
.ydo-promos__grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ydo-promos__grid::-webkit-scrollbar { display: none; }
.ydo-promo { scroll-snap-align: start; }
.ydo-promos__nav { display: none; } /* mobile: swipe the track directly */
@media (max-width: 767.98px) {
    .ydo-promo { flex: 0 0 82%; }
}
@media (min-width: 768px) {
    /* 3 or fewer promos: back to the original static responsive grid. */
    .ydo-promos:not(.ydo-promos--slider) .ydo-promos__grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        overflow: visible;
    }
    .ydo-promos:not(.ydo-promos--slider) .ydo-promo { flex: initial; }

    /* More than 3: stay a horizontal track, sized to 3-up, with nav arrows -
       a bare scrollbar isn't an obvious "there's more" control on desktop. */
    .ydo-promos--slider .ydo-promo { flex: 0 0 calc((100% - 32px) / 3); }
    .ydo-promos__nav {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, .95);
        color: var(--accent, #1b2a4a);
        font-size: 20px;
        line-height: 1;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(13, 17, 23, .2);
        z-index: 1;
        transition: background .15s ease, color .15s ease;
    }
    .ydo-promos__nav:hover { background: var(--accent, #1b2a4a); color: #fff; }
    .ydo-promos__prev { left: -16px; }
    .ydo-promos__next { right: -16px; }
}
.ydo-promo {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border, #e6e8ec);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(13, 17, 23, .05));
    transition: transform .15s ease, box-shadow .15s ease;
}
.ydo-promo:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -10px rgba(13, 17, 23, .18); }
.ydo-promo__img {
    position: relative; /* anchors the logo badge + heart overlays */
    height: 150px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-soft, #f6f7f9);
}
.ydo-promo__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.ydo-promo__date { font-size: 12px; font-weight: 600; color: var(--ydo-blue, #1d4ed8); display: inline-flex; align-items: center; gap: 6px; }
.ydo-promo__title { font-size: 16px; font-weight: 700; color: var(--text, #0d1117); margin: 0; }
.ydo-promo__text {
    font-size: 13.5px;
    color: var(--text-muted, #5b6472);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ydo-promo__cta {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: none;
    color: var(--accent, #1b2a4a) !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
}
.ydo-promo__cta:hover { color: var(--accent-hover, #13203a) !important; }
.ydo-promo__cta .material-icons { font-size: 16px; }

@media (max-width: 767px) {
    .ydo-gallery { flex-direction: column-reverse; gap: 8px; }
    .ydo-gallery__thumbs {
        flex-direction: row;
        flex: 0 0 auto;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .ydo-gallery__thumb { flex: 0 0 92px; }
    .ydo-gallery__main-img { height: 300px; }
}
