/* ===========================================================================
   Safaris — single safari (tour) page
   File:   assets/css/ato-single-safari.css
   Handle: ato-single-safari  (enqueue AFTER 'ato-public', depends on it)

   Companion sheet to ato-public.css. Contains ONLY components that do not
   already exist there. Everything colour-related resolves through the
   --ato-* tokens declared at the top of ato-public.css, which in turn resolve
   to the ugandasafaris-asv theme tokens. There is not a single hardcoded
   colour value in this file — tints are built with color-mix() or with
   rgba(var(--shadow), …) (the --olive-dark green key), per the design contract.

   Reused from ato-public.css (not redefined here, only extended):
     .ato-container .ato-single-tour-container .ato-meta-pill .ato-price-pill
     .ato-book-card .ato-book-operator .ato-op-name .ato-op-prefix
     .ato-op-rating-mini .ato-book-note .ato-badge-verified .ato-day-badge
     .ato-day-content .ato-button .ato-button-primary .ato-button-outline
     .ato-ie-grid .ato-ie-box .ato-ie-title .ato-ie-list .ato-star-rating
   Reused from the theme stylesheet:
     .pp-crumbs .pp-wrap type scale
   =========================================================================== */

/* --- Page shell ---------------------------------------------------------- */

.ato-safari-single {
    padding: 0 0 72px;
}

.ato-safari-single .ato-container {
    font-size: var(--ato-fs-base);
}

/* --- Breadcrumbs ---------------------------------------------------------
   .ato-breadcrumbs in ato-public.css paints its links white for the dark
   hero band. This page sits on cream, so the colour is re-stated here. */

.ato-safari-crumbs {
    margin: 0;
    padding: 26px 0 22px;
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-label);
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ato-text-main);
    opacity: 1;
}

.ato-safari-crumbs a,
.ato-breadcrumbs.ato-safari-crumbs a {
    color: var(--ato-text-main);
    text-decoration: none;
    transition: var(--ato-transition);
}

.ato-safari-crumbs a:hover,
.ato-breadcrumbs.ato-safari-crumbs a:hover {
    color: var(--ato-primary);
    text-decoration: none;
}

.ato-safari-crumbs__sep {
    margin: 0 10px;
    color: var(--ato-rule);
}

.ato-safari-crumbs__current {
    color: var(--ato-title-color);
    font-weight: 700;
}

/* --- Two-column layout, ~60/40 ------------------------------------------- */

.ato-safari-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr);
    gap: 44px;
    align-items: start;
}

.ato-safari-main {
    min-width: 0;
}

.ato-safari-aside {
    min-width: 0;
    align-self: start;
}

@media (max-width: 900px) {
    .ato-safari-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* --- Featured image + gallery thumbnails --------------------------------- */

.ato-safari-media {
    margin: 0 0 26px;
}

.ato-safari-hero {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--ato-radius-lg);
    border: 1px solid var(--ato-border-color);
    background: var(--ato-bg-white);
    aspect-ratio: 16 / 10;
}

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

.ato-safari-hero:hover img {
    transform: scale(1.03);
}

.ato-safari-hero__badge {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 2;
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-label);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: var(--ato-radius-sm);
    background: var(--ato-primary);
    color: var(--ato-bg-light);
}

.ato-safari-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 8px;
    list-style: none;
    padding: 0;
}

.ato-safari-thumbs li {
    margin: 0;
}

.ato-safari-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: var(--ato-radius-sm);
    border: 1px solid var(--ato-border-color);
    background: var(--ato-bg-white);
}

.ato-safari-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.ato-safari-thumb:hover img {
    transform: scale(1.06);
}

.ato-safari-thumb__more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--shadow), 0.62);
    color: var(--ato-bg-light);
    font-family: var(--ato-font-heading);
    font-size: 22px;
    font-weight: 600;
}

@media (max-width: 600px) {
    .ato-safari-thumbs {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- Info chip row (duration / group size / difficulty) ------------------ */

.ato-safari-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.ato-safari-chips li {
    margin: 0;
}

.ato-safari-chips .ato-meta-pill {
    padding: 9px 16px;
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-small);
    background: var(--ato-bg-white);
}

.ato-safari-chips .ato-meta-pill b {
    font-weight: 700;
    color: var(--ato-title-color);
}

/* --- Description --------------------------------------------------------- */

.ato-safari-desc {
    max-width: var(--ato-measure, 700px);

    font-family: var(--ato-font-body);
    font-size: var(--ato-fs-reading);
    line-height: 1.8;
    color: var(--ato-text-main);
}

.ato-safari-desc > *:first-child {
    margin-top: 0;
}

.ato-safari-desc p {
    margin: 0 0 18px;
}

.ato-safari-desc h2,
.ato-safari-desc h3,
.ato-safari-desc h4 {
    font-family: var(--ato-font-heading);
    color: var(--ato-title-color);
    font-weight: 600;
    line-height: 1.25;
    margin: 30px 0 12px;
}

.ato-safari-desc h2 {
    font-size: 30px;
}

.ato-safari-desc h3 {
    font-size: 24px;
}

.ato-safari-desc h4 {
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-small);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
}

.ato-safari-desc ul,
.ato-safari-desc ol {
    margin: 0 0 18px 20px;
}

.ato-safari-desc li {
    margin-bottom: 9px;
}

.ato-safari-desc a {
    color: var(--ato-primary);
    border-bottom: 1px solid var(--ato-secondary-light);
}

.ato-safari-desc img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ato-radius-sm);
}

/* --- Booking panel -------------------------------------------------------
   .ato-book-card already supplies the card chrome. It centres its children
   and sticks at top:40px; both are re-stated for this layout. */

.ato-safari-single .ato-safari-aside .ato-book-card {
    align-items: stretch;
    text-align: left;
    padding: 26px;
    background: var(--ato-bg-white);
    border-radius: var(--ato-radius-lg);
    position: static;
}

/* Desktop only.

   The theme header is NOT sticky here: style.css only sets
   .pp-header{position:sticky} inside @media(max-width:820px), and this block
   starts at 901px, so the two never overlap. Offsetting by --navbar-h would
   leave ~104px of dead space above the panel. The only fixed element at this
   width is the WordPress admin bar, so that is what we clear. */
@media (min-width: 901px) {

    .ato-safari-single .ato-safari-aside .ato-book-card {
        position: sticky;
        top: 24px;
        max-height: calc(100vh - 48px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    body.admin-bar .ato-safari-single .ato-safari-aside .ato-book-card {
        top: 56px;                          /* 32px admin bar + 24px gutter */
        max-height: calc(100vh - 80px);
    }
}

.ato-safari-title {
    font-family: var(--ato-font-heading);
    font-weight: 600;
    font-size: 28px;
    line-height: 1.16;
    color: var(--ato-title-color);
    margin: 0 0 4px;
    letter-spacing: -0.005em;
}

.ato-safari-book__op-line {
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-label);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ato-text-muted);
    margin: 0 0 18px;
}

.ato-safari-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 20px;
    margin: 0 0 20px;
    border-bottom: 1px solid var(--ato-border-color);
}

.ato-safari-price__amount {
    font-family: var(--ato-font-heading);
    font-size: 40px;
    line-height: 1;
    font-weight: 600;
    color: var(--ato-primary);
}

.ato-safari-price__unit {
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-small);
    color: var(--ato-text-muted);
}

.ato-safari-price__note {
    flex: 1 0 100%;
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-label);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ato-text-muted);
    margin-top: 6px;
}

/* --- Booking panel actions ----------------------------------------------- */

.ato-safari-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.ato-safari-actions .ato-button {
    width: 100%;
    min-width: 0;
    padding: 15px 22px;
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-label);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border-radius: var(--ato-radius-md);
}

.ato-safari-actions .ato-button:hover {
    transform: none;
}

/* "Enquire" is the page's only primary action. This is a marketplace listing:
   nothing here books or takes payment, the enquiry is handed to the operator.
   The solid fill comes from `.ato-book-card .ato-request-quote` in
   ato-public.css; it is re-stated here so the button does not depend on that
   sheet's cascade order. */

.ato-safari-actions .ato-button-primary {
    background: var(--ato-primary);
    border: 1px solid var(--ato-primary);
    color: var(--ato-bg-light);
}

.ato-safari-actions .ato-button-primary:hover {
    background: var(--ato-primary-hover);
    border-color: var(--ato-primary-hover);
    color: var(--ato-bg-light);
}

/* Secondary, and only rendered when a safari has no attached operator: the
   enquiry still opens, but the directory is the more useful onward step. */

.ato-safari-actions .ato-btn-browse-ops {
    background: transparent;
    border: 1px solid var(--ato-title-color);
    color: var(--ato-title-color);
    text-align: center;
    text-decoration: none;
}

.ato-safari-actions .ato-btn-browse-ops:hover {
    background: var(--ato-title-color);
    color: var(--ato-bg-light);
    text-decoration: none;
}

.ato-safari-book .ato-book-note {
    text-align: center;
}

/* ato-public.css ships `.ato-book-card .ato-request-quote` with a hardcoded
   orange glow (rgba(236,123,35,…)) left over from the pre-Uganda palette, plus
   a stack of !important declarations. That file is out of scope for this
   template, so the offending properties are neutralised here instead. */

.ato-safari-single .ato-book-card .ato-request-quote {
    box-shadow: none !important;
    margin-top: 0;
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-label) !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 15px 22px !important;
    border-radius: var(--ato-radius-md) !important;
}

.ato-safari-single .ato-book-card .ato-request-quote:hover {
    box-shadow: none !important;
    transform: none;
}

.ato-safari-single .ato-book-card .ato-request-quote:active {
    box-shadow: none !important;
    transform: none;
}

.ato-safari-single .ato-book-card .ato-safari-operator__msg {
    display: inline-block !important;
    width: auto !important;
    background: none !important;
    color: var(--ato-primary) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ato-secondary-light) !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-top: 7px;
    font-size: 11px !important;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ato-safari-single .ato-book-card .ato-safari-operator__msg:hover {
    color: var(--ato-primary-hover) !important;
    border-bottom-color: var(--ato-primary) !important;
}

/* --- Operator strip inside the panel ------------------------------------- */

.ato-safari-operator {
    margin: 22px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--ato-border-color);
    border-bottom: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
}

.ato-safari-operator__logo {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: var(--ato-radius-sm);
    border: 1px solid var(--ato-border-color);
    background: var(--ato-bg-white);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ato-safari-operator__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ato-safari-operator__initial {
    font-family: var(--ato-font-heading);
    font-size: 22px;
    font-weight: 600;
    color: var(--ato-primary);
    line-height: 1;
}

.ato-safari-operator__body {
    min-width: 0;
    flex: 1 1 auto;
}

.ato-safari-operator .ato-op-prefix {
    display: block;
    font-family: var(--ato-font-label);
    font-size: 10.5px;
    font-style: normal;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ato-text-muted);
    margin: 0 0 2px;
}

.ato-safari-operator__name-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.ato-safari-operator .ato-op-name {
    font-family: var(--ato-font-body);
    font-size: 15px;
}

.ato-safari-operator .ato-badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    color: var(--ato-bg-light);
}

.ato-safari-operator .ato-badge-verified .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

.ato-safari-operator__msg {
    display: inline-block;
    margin-top: 7px;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: var(--ato-font-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ato-primary);
    border-bottom: 1px solid var(--ato-secondary-light);
    transition: var(--ato-transition);
}

.ato-safari-operator__msg:hover {
    color: var(--ato-primary-hover);
    border-bottom-color: var(--ato-primary);
}

/* --- tap target: "Message operator" --------------------------------------
   139.9 x 15 as shipped. The `padding: 0` above is not a reset stripping the
   button: it is declared deliberately here, and again as `padding: 0
   !important` in the `.ato-safari-single .ato-book-card` override, so the
   control renders as an underlined text link -- the 1px border-bottom IS the
   underline. Padding would lift that underline off the text and make the
   operator strip taller, so the box is left exactly where it is and the hit
   area is extended with a transparent ::after, the pattern the header icons
   already use. The width is 139.9 and needs nothing; only the height grows.

   `overflow` has to be unpinned: ato-public.css sets `overflow: hidden` on
   every `.ato-book-card .ato-request-quote` for the big CTA's fill effect,
   which this text-link variant does not use, and a clipped pseudo-element
   receives no pointer events. Stated at (0,3,0) as well as (0,1,0) so it
   beats that (0,2,0) rule whatever the sheet order is.

   Vertically the 44px zone runs from 14.5px above the box to 14.5px below.
   Above that is the inert .ato-vbadge span; the operator's <a> is a further
   15px clear. Below is the book card's own padding. No link loses a click. */
.ato-safari-operator__msg {
    position: relative;
    overflow: visible;
}

.ato-safari-single .ato-book-card .ato-safari-operator__msg {
    overflow: visible;
}

/* Biased downward rather than centred. Measured at 1280, a centred 44px zone
   reached 7.5px up into the operator's own <a>, which sits 7px above this
   button -- the button's margin-top -- and would have lost the bottom of a
   real link to a hit zone. There is 31px of clear card padding below the
   button and only 7px above it, so the zone takes 5px above and 24px below.
   That 7px is a margin, not a text height, so the 2px of clearance holds when
   the operator name wraps to two lines in a narrow sidebar. */
.ato-safari-operator__msg::after {
    content: "";
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    height: 44px;
}

/* --- Detail sections -----------------------------------------------------
   This page used to carry a tab strip (Overview / Highlights & Inclusions /
   Itinerary / FAQs) whose panels were hidden with [hidden] once JS ran. The
   itinerary is the reason visitors open a safari listing, so it was promoted
   into the page flow and the tab component was deleted outright — there is no
   .ato-safari-tabs, no .is-enhanced, and no panel-hiding rule anywhere on
   this page any more. Every section below is unconditionally visible. */

.ato-safari-sections {
    margin: 56px 0 0;
    border-top: 1px solid var(--ato-border-color);
    padding-top: 40px;
}

.ato-safari-section {
    margin: 0 0 56px;
}

.ato-safari-section:last-child {
    margin-bottom: 0;
}

.ato-safari-section__h {
    font-family: var(--ato-font-heading);
    font-size: 27px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ato-title-color);
    margin: 0 0 18px;
}

/* Optional standfirst directly under a section heading. */
.ato-safari-section__sub {
    font-family: var(--ato-font-body);
    font-size: var(--ato-fs-small);
    color: var(--ato-text-muted);
    margin: -10px 0 22px;
}

.ato-safari-subh {
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-label);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ato-title-color);
    margin: 0 0 14px;
}

.ato-safari-empty {
    font-family: var(--ato-font-body);
    font-size: var(--ato-fs-small);
    color: var(--ato-text-muted);
    font-style: italic;
    margin: 0;
}

/* --- Highlights ---------------------------------------------------------- */

.ato-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    list-style: none;
    margin: 0 0 34px;
    padding: 0;
}

.ato-highlights li {
    margin: 0;
}

.ato-highlights a,
.ato-highlights span {
    display: inline-block;
    padding: 8px 15px;
    border-radius: var(--ato-radius-sm);
    border: 1px solid var(--ato-border-color);
    background: var(--ato-bg-white);
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-small);
    font-weight: 600;
    color: var(--ato-primary);
    text-decoration: none;
    transition: var(--ato-transition);
}

.ato-highlights a:hover {
    border-color: var(--ato-primary);
    background: color-mix(in srgb, var(--ato-primary) 6%, transparent);
}

/* --- Itinerary -----------------------------------------------------------
   Rendered from _ato_itinerary meta in the template. Nothing here is ever
   written to post_content, so wp_kses never sees this markup.

   These were <details> accordions. They are now a plain <ol> of always-open
   blocks: the itinerary is the page's primary content, so there is no
   disclosure state, no summary, and nothing to click. Do not reintroduce a
   collapsed default here — with CSS or JS off the days must still read top to
   bottom, and a display:none anywhere in this block would break that. */

.ato-days {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.ato-day {
    border: 1px solid var(--ato-border-color);
    border-radius: var(--ato-radius-md);
    background: var(--ato-bg-white);
    overflow: hidden;
    transition: var(--ato-transition);
}

/* Flow variant: every day is open, so it carries the emphasis that used to be
   reserved for [open]. */
.ato-days--flow > .ato-day {
    border-color: color-mix(in srgb, var(--ato-primary) 28%, var(--ato-border-color));
    box-shadow: var(--ato-shadow-sm);
}

.ato-days--flow > .ato-day + .ato-day {
    margin-top: 6px;
}

.ato-day__head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px 10px;
}

/* .ato-day-badge is reused from ato-public.css; only the radius and size are
   brought into line with the theme's restrained radius scale. */
.ato-day .ato-day-badge {
    flex: 0 0 auto;
    border-radius: var(--ato-radius-sm);
    min-width: 66px;
    padding: 6px 10px;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    color: var(--ato-bg-light);
}

.ato-day__title {
    flex: 1 1 auto;
    min-width: 0;
    font-family: var(--ato-font-heading);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ato-title-color);
    margin: 0;
}

/* .ato-day-content is reused; it is a grid in the admin builder, reset here. */
.ato-day .ato-day-content {
    display: block;
    padding: 0 18px 20px 18px;
}

.ato-day .ato-day-content p {
    margin: 0 0 14px;
    font-size: var(--ato-fs-base);
    line-height: 1.75;
    color: var(--ato-text-main);
}

.ato-day .ato-day-content p:last-child {
    margin-bottom: 0;
}

.ato-day__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--ato-radius-sm);
    margin: 0 0 14px;
}

@media (max-width: 600px) {
    .ato-day__head {
        flex-wrap: wrap;
        gap: 9px;
    }

    .ato-day__title {
        flex: 1 0 100%;
        font-size: 19px;
    }
}

/* --- Photo gallery -------------------------------------------------------
   Rendered from validated `_ato_gallery` attachment IDs. Every tile is a real
   <a href="…full.jpg"><img> pair, so the section is fully usable with both JS
   and CSS switched off; the lightbox below is an enhancement layered on top.
   Images below the fold carry loading="lazy" from the template. */

.ato-safari-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ato-safari-gallery__item {
    margin: 0;
    min-width: 0;
}

.ato-safari-gallery__link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--ato-radius-md);
    border: 1px solid var(--ato-border-color);
    background: var(--ato-bg-light);
    aspect-ratio: 4 / 3;
    text-decoration: none;
}

.ato-safari-gallery__link:focus-visible {
    outline: 2px solid var(--ato-primary);
    outline-offset: 2px;
}

.ato-safari-gallery__img,
.ato-safari-gallery__link img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.ato-safari-gallery__link:hover img {
    transform: scale(1.045);
}

@media (max-width: 900px) {
    .ato-safari-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 520px) {
    .ato-safari-gallery {
        grid-template-columns: minmax(0, 1fr);
    }

    .ato-safari-gallery__link {
        aspect-ratio: 3 / 2;
    }
}

/* --- Lightbox ------------------------------------------------------------
   Built in JS on first use, so none of this markup exists without scripts;
   the gallery anchors then simply open the full-size file. No library. */

.ato-lb {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    background: rgba(var(--shadow), 0.93);
}

.ato-lb[hidden] {
    display: none;
}

html.ato-lb-open {
    overflow: hidden;
}

.ato-lb__frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    max-height: 100%;
}

.ato-lb__img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    border-radius: var(--ato-radius-md);
    background: var(--ato-bg-light);
}

.ato-lb__cap {
    margin: 0;
    max-width: 60ch;
    text-align: center;
    font-family: var(--ato-font-body);
    font-size: var(--ato-fs-small);
    line-height: 1.5;
    color: var(--ato-on-dark);
}

.ato-lb__cap[hidden] {
    display: none;
}

.ato-lb__btn {
    position: absolute;
    background: rgba(var(--shadow), 0.55);
    border: 1px solid var(--ato-on-dark);
    border-radius: var(--ato-radius-full);
    width: 44px;
    height: 44px;
    line-height: 1;
    font-size: 26px;
    font-family: var(--ato-font-body);
    color: var(--ato-bg-light);
    cursor: pointer;
    transition: var(--ato-transition);
}

.ato-lb__btn:hover {
    background: var(--ato-primary);
}

.ato-lb__btn:focus-visible {
    outline: 2px solid var(--ato-secondary);
    outline-offset: 2px;
}

.ato-lb__close {
    top: 14px;
    right: 16px;
}

.ato-lb__prev {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.ato-lb__next {
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 600px) {
    .ato-lb {
        padding: 60px 10px;
    }

    .ato-lb__prev {
        left: 8px;
    }

    .ato-lb__next {
        right: 8px;
    }
}

/* --- FAQs ---------------------------------------------------------------- */

.ato-faqs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.ato-faq {
    border-bottom: 1px solid var(--ato-border-color);
}

.ato-faq__q {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 2px;
    cursor: pointer;
    list-style: none;
    font-family: var(--ato-font-body);
    font-size: var(--ato-fs-base);
    font-weight: 600;
    color: var(--ato-title-color);
}

.ato-faq__q::-webkit-details-marker {
    display: none;
}

.ato-faq__q:focus-visible {
    outline: 2px solid var(--ato-primary);
    outline-offset: -2px;
}

.ato-faq__mark {
    flex: 0 0 auto;
    color: var(--ato-secondary);
    font-family: var(--ato-font-body);
    font-size: 20px;
    line-height: 1.2;
    transition: transform 0.25s ease;
}

.ato-faq[open] .ato-faq__mark {
    transform: rotate(45deg);
}

.ato-faq__a {
    max-width: var(--ato-measure, 700px);

    padding: 0 2px 18px;
    font-size: var(--ato-fs-base);
    line-height: 1.75;
    color: var(--ato-text-main);
}

.ato-faq__a p {
    margin: 0 0 12px;
}

.ato-faq__a p:last-child {
    margin-bottom: 0;
}

/* --- Closing call to action ---------------------------------------------- */
/*
 * The band between the end of the itinerary and Related Safaris.
 *
 * Two columns: the argument on the left, the action on the right in its own
 * card so the button never has to compete with body text for attention. Tracks
 * are minmax(0, …) rather than 1fr, because a 1fr track floors at min-content
 * and the destination line would then push the action card narrower on the
 * safaris that list three long park names.
 *
 * It collapses to one column at 860px, which is where the two columns stop
 * being wide enough to read: the action card goes underneath, still full width,
 * still the last thing before the related grid.
 *
 * Colours are tints of the existing tokens via color-mix(), as everywhere else
 * in this sheet. There is no new colour value in here.
 */

.ato-safari-cta {
    margin: 56px 0 0;
    padding: 34px 36px;
    border: 1px solid color-mix(in srgb, var(--ato-primary) 18%, var(--ato-border-color));
    border-radius: var(--ato-radius-lg);
    background: color-mix(in srgb, var(--ato-primary) 5%, var(--ato-bg-white));
}

.ato-safari-cta__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 330px);
    gap: 34px;
    align-items: center;
}

/* The no-operator band carries no facts row and no operator mark, so it needs
   less vertical room and a narrower action column than the main one. */
.ato-safari-cta--noop {
    padding: 28px 36px;
}

.ato-safari-cta__inner--single {
    grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
}

.ato-safari-cta__lead {
    min-width: 0;
}

.ato-safari-cta__eyebrow {
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-label);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ato-text-muted);
    margin: 0 0 8px;
}

.ato-safari-cta__h {
    font-family: var(--ato-font-heading);
    font-size: 27px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ato-title-color);
    margin: 0 0 12px;
}

.ato-safari-cta__body {
    font-family: var(--ato-font-body);
    font-size: var(--ato-fs-reading);
    line-height: 1.7;
    color: var(--ato-text-main);
    max-width: var(--ato-measure, 700px);
    margin: 0;
}

/* The three facts the reader is holding in their head at this point. A plain
   list, reset: it is data, not decoration. */
.ato-safari-cta__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
}

.ato-safari-cta__fact {
    padding: 6px 13px;
    border: 1px solid var(--ato-border-color);
    border-radius: var(--ato-radius-full);
    background: var(--ato-bg-white);
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-small);
    font-weight: 600;
    color: var(--ato-title-color);
}

.ato-safari-cta__act {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--ato-border-color);
    border-radius: var(--ato-radius-md);
    background: var(--ato-bg-white);
    text-align: center;
}

.ato-safari-cta__op {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    margin: 0 0 16px;
}

.ato-safari-cta__logo {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: var(--ato-radius-sm);
    border: 1px solid var(--ato-border-color);
    background: var(--ato-bg-white);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ato-safari-cta__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ato-safari-cta__initial {
    font-family: var(--ato-font-heading);
    font-size: 24px;
    font-weight: 600;
    color: var(--ato-primary);
    line-height: 1;
}

.ato-safari-cta__op-body {
    min-width: 0;
}

.ato-safari-cta__op-prefix {
    display: block;
    font-family: var(--ato-font-label);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ato-text-muted);
    margin: 0 0 2px;
}

.ato-safari-cta__op-name {
    font-family: var(--ato-font-body);
    font-size: 16px;
    font-weight: 600;
    color: var(--ato-title-color);
}

.ato-safari-cta__op-name:hover,
.ato-safari-cta__op-name:focus-visible {
    color: var(--ato-primary);
}

.ato-safari-cta__btn {
    width: 100%;
    padding: 15px 22px;
}

.ato-safari-cta__note {
    font-family: var(--ato-font-body);
    font-size: var(--ato-fs-small);
    line-height: 1.55;
    color: var(--ato-text-muted);
    margin: 12px 0 0;
}

.ato-safari-cta__more {
    display: inline-block;
    margin: 14px 0 0;
    font-family: var(--ato-font-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ato-primary);
    border-bottom: 1px solid var(--ato-secondary-light);
    transition: var(--ato-transition);
}

.ato-safari-cta__more:hover,
.ato-safari-cta__more:focus-visible {
    color: var(--ato-primary-hover);
    border-bottom-color: var(--ato-primary);
}

@media (max-width: 860px) {

    .ato-safari-cta__inner,
    .ato-safari-cta__inner--single {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
    }
}

@media (max-width: 599px) {

    .ato-safari-cta {
        margin-top: 44px;
        padding: 24px 18px;
        border-radius: var(--ato-radius-md);
    }

    .ato-safari-cta__h {
        font-size: 22px;
    }

    .ato-safari-cta__body {
        font-size: var(--ato-fs-base);
    }

    .ato-safari-cta__act {
        padding: 18px 16px;
    }

    /* Measured at 375px: the destinations chip wraps to two lines, and a
       two-line pill at the full 999px radius reads as a lozenge rather than a
       chip. Ordinary corners below 600px. */
    .ato-safari-cta__fact {
        border-radius: var(--ato-radius-md);
    }

    .ato-safari-cta__more {
        letter-spacing: 0.1em;
    }
}
/* --- Related safaris (3-up) ---------------------------------------------- */

.ato-safari-related {
    margin: 64px 0 0;
    padding: 44px 0 0;
    border-top: 1px solid var(--ato-border-color);
}

.ato-safari-related__h {
    font-family: var(--ato-font-heading);
    font-size: 29px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ato-title-color);
    text-align: center;
    margin: 0 0 6px;
}

.ato-safari-related__sub {
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-label);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ato-text-muted);
    text-align: center;
    margin: 0 0 32px;
}

/* The card (a.at-tour.ato-tour-card, styled in ato-marketplace.css) is built
   for a 3-up grid: below roughly 300px of column it starts wrapping its meta
   row onto three lines and clipping the activity chip. This grid therefore
   mirrors `.ato-mk .ato-tours-grid` breakpoints exactly, so a related card
   looks identical to the same card on the archive and homepage.

   Equal heights: the card already declares `height: 100%` and pushes
   `.at-tour-foot` down with `margin-top: auto`, so all it needs from the grid
   is a stretched row. `grid-auto-rows: 1fr` keeps that true on the second row
   as well, if the related query ever returns more than one row's worth. */

.ato-safari-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: var(--ato-grid-gap);
    align-items: stretch;
}

.ato-safari-related-grid > * {
    min-width: 0;
    height: 100%;
}

@media (max-width: 1079px) {
    .ato-safari-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 699px) {
    .ato-safari-related-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
}

/* --- Utilities ----------------------------------------------------------- */

.ato-safari-single .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {

    .ato-safari-single *,
    .ato-safari-single *::before,
    .ato-safari-single *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* "From" qualifier ahead of a scraped starting price. */
.ato-safari-price__lead {
    display: inline-block;
    margin-right: .25rem;
    font-size: .8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .75;
}

/* --- Tab strip -----------------------------------------------------------
   No-JS default: the nav is hidden and every panel renders stacked and visible,
   so the page is complete without script. The inline tab script adds
   .is-enhanced, which reveals the nav and hides all panels but the selected one.

   The day-by-day itinerary is NOT a panel. It lives outside .ato-safari-tabs and
   carries no [role=tabpanel], so nothing in this block can reach it — which is
   exactly the point: it must never be hidden behind a tab again.
   ------------------------------------------------------------------------- */

.ato-safari-tabs {
    margin: 56px 0 0;
    border-top: 1px solid var(--ato-border-color);
    padding-top: 40px;
}

.ato-safari-tabs__nav {
    display: none;
}

.ato-safari-tabs.is-enhanced .ato-safari-tabs__nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
    border-bottom: 1px solid var(--ato-border-color);
    margin: 0 0 34px;
}

.ato-safari-tabs__btn {
    flex: 0 0 auto;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 13px 18px;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--ato-font-label);
    font-size: var(--ato-fs-label);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ato-text-muted);
    transition: var(--ato-transition);
}

.ato-safari-tabs__btn:hover {
    color: var(--ato-title-color);
}

.ato-safari-tabs__btn:focus-visible {
    outline: 2px solid var(--ato-primary);
    outline-offset: -2px;
}

.ato-safari-tabs__btn[aria-selected="true"] {
    color: var(--ato-primary);
    border-bottom-color: var(--ato-secondary);
}

/* Panels are .ato-safari-section elements carrying role="tabpanel". Stacked and
   spaced apart without JS; flush and one-at-a-time with it. */
.ato-safari-tabs .ato-safari-section {
    margin: 0 0 48px;
    border-top: 0;
    padding-top: 0;
}

.ato-safari-tabs.is-enhanced .ato-safari-section {
    margin: 0;
}

.ato-safari-tabs.is-enhanced [role="tabpanel"][hidden] {
    display: none;
}

/* Once the nav is showing, the panel heading only repeats the tab label, so it
   is taken out of the visual flow but left for screen readers. */
.ato-safari-tabs.is-enhanced .ato-safari-section__h {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* The itinerary follows the tab strip and needs its own separation. */
.ato-safari-section--itinerary {
    margin-top: 48px;
}

/* =====================================================================
   PHOTOGRAPHER CREDITS
   =====================================================================
   This page rendered no credit at all until now, so its CC BY-SA hero and
   every CC-licensed gallery and itinerary photograph were published with
   the attribution stripped. There is room here, so each credit sits with
   the photograph it belongs to and keeps its links to the source and the
   licence deed.

   ato-guides.css holds the base .ato-img-credit rules but does not load on
   a safari page, so each placement is styled in full.
   ===================================================================== */

.ato-safari-media__cap {
    display: block;
    margin-top: 8px;
}

/* The featured photograph is credited in the same figcaption but is usually not
   one of the images above it — it is what Yoast emits as og:image and what every
   card linking here displays. It gets a label so a reader can tell which
   photograph the credit under it belongs to. */
.ato-safari-media__caplabel {
    display: block;
    margin-top: 10px;
    font-size: 0.6875rem;
    line-height: 1.55;
    font-weight: 600;
    color: var(--ato-text-muted);
}

.ato-safari-media__caplabel + .ato-safari-media__credit {
    margin-top: 2px;
}

.ato-safari-media__credit,
.ato-safari-gallery__credit,
.ato-day__credit {
    margin: 6px 0 0;
    font-size: 0.6875rem;
    line-height: 1.55;
    color: var(--ato-text-muted);
    text-align: left;
    overflow-wrap: anywhere;
}

.ato-safari-media__credit a,
.ato-safari-gallery__credit a,
.ato-day__credit a {
    color: inherit;
    text-decoration: underline;
}

.ato-safari-media__credit a:hover,
.ato-safari-gallery__credit a:hover,
.ato-day__credit a:hover {
    color: var(--ato-primary);
}

/* The gallery is a grid of equal cells; the credit must not push its own
   cell taller than its neighbours' images, so it sits under the link in
   the flow and the cell simply grows. Nothing is clipped and nothing is
   hidden. */
.ato-safari-gallery__item .ato-safari-gallery__credit {
    padding: 0 2px;
}

.ato-day__credit {
    margin-bottom: 10px;
}
