/* FAQ page (template_faqs_v2.php) */

.da-faq-page {
    --da-faq-red: #b82e26;
    --da-faq-text: #3a3a3a;
    --da-faq-muted: #757575;
    --da-faq-border: #f2f2f2;
    --da-faq-divider: #e9eaeb;
    --da-faq-shadow: 0 4px 20px 5px rgba(223, 223, 223, 0.15);
}

/* .wrapper's overflow:hidden stops the topic nav sticking; clip still prevents sideways scroll.
   flow-root keeps the block formatting context hidden gave, otherwise the hero's top margin
   collapses through the wrapper and shifts the breadcrumb and hero image down. */
.wrapper.da-faq-page {
    display: flow-root;
    overflow: clip;
}

.da-faq a:focus-visible,
.da-faq button:focus-visible,
.da-faq-enquiry-card a:focus-visible {
    outline: 2px solid var(--da-faq-red);
    outline-offset: 2px;
}

/* ── Hero ── */
.da-faq-page .da-faq-hero {
    height: 373px;
}

.da-faq-page .da-faq-hero:after {
    background:
        linear-gradient(to top, rgba(51, 51, 51, 0) 3.84%, rgba(0, 0, 0, 0.152) 76.79%),
        linear-gradient(to bottom, rgba(51, 51, 51, 0) 23.21%, rgba(0, 0, 0, 0.76) 103.84%);
}

.da-faq-page .da-faq-hero .hero_banner_one_header {
    align-items: center;
    gap: 16px;
    padding: 24px 20px;
}

.da-faq-page .da-faq-hero h1 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 72px;
    line-height: 90px;
    letter-spacing: -1.44px;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.da-faq-hero__subheading {
    max-width: 830px;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    line-height: 32px;
    font-weight: 400;
    color: #fff;
}

/* ── Layout ── */
/* overflow-anchor: the accordion script keeps the clicked question still itself; browser
   scroll anchoring correcting the same change as well would double the shift. */
.da-faq {
    overflow-anchor: none;
    display: flex;
    align-items: flex-start;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 58px 15px 40px;
}

.da-faq__aside {
    position: sticky;
    top: calc(var(--da-faq-header, 108px) + 24px);
    z-index: 1;
    flex: 0 0 276px;
}

.da-faq__main {
    flex: 1 1 0;
    min-width: 0;
}

/* ── Browse by topic ── */
.da-faq-nav {
    padding: 26px 0px;
    background: #fff;
    border: 2px solid var(--da-faq-border);
    border-radius: 20px;
}

.da-faq-nav__title {
    margin: 0 0 10px;
    padding: 0 16px 8px 24px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13px;
    line-height: 24px;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: #333;
}

.da-faq-nav__toggle {
    display: none;
}

.da-faq-nav__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.da-faq-nav__link {
    display: block;
    padding: 8px 16px 8px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    line-height: 19px;
    color: #333;
}

.da-faq-nav__link:hover,
.da-faq-nav__link:focus {
    color: var(--da-faq-red);
    text-decoration: none;
}

.da-faq-nav__link.is-active {
    font-weight: 500;
    color: var(--da-faq-red);
    box-shadow: inset 2px 0 0 var(--da-faq-red);
}

/* ── Topic sections ── */
.da-faq-category {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--da-faq-divider);
}

.da-faq-category,
.da-faq-item {
    scroll-margin-top: calc(var(--da-faq-header, 108px) + 24px);
}

.da-faq-category__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.da-faq-category__title {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 30px;
    line-height: 38px;
    color: #333;
}

/* Focused programmatically after a topic link is used; not interactive itself. */
.da-faq-category__title:focus {
    outline: none;
}

.da-faq-category__intro {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    line-height: 28px;
    font-weight: 400;
    color: var(--da-faq-muted);
}

.da-faq-category__items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Accordion item ── */
.da-faq-item {
    background: #fff;
    border: 1px solid var(--da-faq-border);
    border-radius: 8px;
    box-shadow: var(--da-faq-shadow);
}

.da-faq-item__heading {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

.da-faq-item__toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 24px;
    background: none;
    border: 0;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    color: var(--da-faq-text);
}

.da-faq-item__question {
    flex: 1 1 auto;
    min-width: 0;
}

.da-faq-item__icon {
    flex: 0 0 24px;
}

.da-faq-item__icon--open,
.da-faq-item.is-open .da-faq-item__icon--closed {
    display: none;
}

.da-faq-item.is-open .da-faq-item__icon--open {
    display: block;
}

/* Padding animates with the answer's height: snapping it would nudge the questions below
   by 8px in the opposite direction to the collapse. Line-height is left as the closed
   state's for the same reason. */
.da-faq-item__toggle {
    transition: padding-bottom 250ms ease;
}

.da-faq-item.is-open .da-faq-item__toggle {
    padding-bottom: 16px;
    font-weight: 600;
}

.da-faq-item.is-open .da-faq-item__toggle:after {
    content: '';
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 0;
    border-bottom: 1px solid var(--da-faq-divider);
}

.da-faq-item__panel {
    overflow: hidden;
    transition: height 250ms ease;
}

/* Bootstrap 3 sets [hidden] { display: none }, which would stop find-in-page searching
   closed answers. Only undone where hidden="until-found" is supported (class set in JS). */
.da-faq.supports-until-found .da-faq-item__panel[hidden="until-found"] {
    display: block;
}

.da-faq-item__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 24px;
}

.da-faq-item__answer {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: var(--da-faq-muted);
}

.da-faq-item__answer p,
.da-faq-item__answer ul,
.da-faq-item__answer ol {
    margin: 0 0 16px;
}

.da-faq-item__answer ul,
.da-faq-item__answer ol {
    padding-left: 20px;
}

.da-faq-item__answer > :last-child {
    margin-bottom: 0;
}

.da-faq-item__answer a {
    color: var(--da-faq-red);
    text-decoration: underline;
}

.da-faq-item__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    text-transform: uppercase;
    color: #b83426;
}

.da-faq-item__cta:hover,
.da-faq-item__cta:focus {
    color: #b83426;
    text-decoration: underline;
}

/* ── Still have a question? ── */
.da-faq-contact {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 40px;
    background: #f5f5f5;
    border-radius: 8px;
}

.da-faq-contact__text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 16px;
    color: var(--da-faq-text);
}

.da-faq-contact__title {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 31px;
    line-height: 1.4;
    color: var(--da-faq-text);
}

.da-faq-contact__copy {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
}

.da-faq-contact__button {
    flex: 0 0 auto;
    padding: 10px 16px;
    background: var(--da-faq-red);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    text-transform: uppercase;
    color: #fff;
}

.da-faq-contact__button:hover {
    background: #9e2720;
}

/* ── Tours ── */
.da-faq-tours__subheading {
    max-width: 640px;
    margin: 14px auto 32px;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    line-height: 30px;
    font-weight: 400;
    color: var(--da-faq-muted);
}

/* ── Enquiry card (sits in the tours .card-container) ── */
/* Height matches the tour cards beside it: the .card column stretches to the row and the
   35px bottom margin is the one .single_safari_card carries. */
/* Tour columns get their width from their content (and .tour-card's min-width at 520px and
   below), not from col-md-4, so the enquiry column is pinned to the same measured widths. */
.da-faq-enquiry-col {
    display: flex;
    flex: 0 0 390px;
    width: 390px;
    max-width: 390px;
}

@media (max-width: 520px) {
    .da-faq-tours__subheading {
        font-size: 16px;
        line-height: 26px;
    }

    .da-faq-enquiry-col {
        flex-basis: 360px;
        width: 360px;
        max-width: 360px;
    }
}

/* white-space: the tour row sets nowrap for its sideways scroll below desktop. */
.da-faq-enquiry-card {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 0 0 35px;
    padding: 32px 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(153, 153, 153, 0.6);
    text-align: center;
}

.da-faq-enquiry-card__avatar {
    width: 94px;
    height: 94px;
    border-radius: 50%;
    object-fit: cover;
}

.da-faq-enquiry-card__text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #333;
}

.da-faq-enquiry-card__title {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 30px;
    color: #333;
}

.da-faq-enquiry-card__copy {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    line-height: 28px;
    font-weight: 400;
}

.da-faq-enquiry-card__button {
    display: inline-flex;
    padding: 12px 20px;
    background: #b83426;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    text-transform: uppercase;
    color: #fff;
}

.da-faq-enquiry-card__button:hover,
.da-faq-enquiry-card__button:focus {
    background: #9e2720;
    color: #fff;
    text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
    .da-faq-item__panel,
    .da-faq-item__toggle {
        transition: none;
    }
}

@media (max-width: 1199px) {
    .da-faq {
        gap: 32px;
    }

    .da-faq__aside {
        flex-basis: 240px;
    }

    .da-faq-page .da-faq-hero h1 {
        font-size: 60px;
        line-height: 72px;
    }
}

/* Tablet and below: sidebar becomes a sticky "Browse by topic" dropdown. */
@media (max-width: 991px) {
    /* The stuck bar is a full-width white band (toggle plus padding) under the site header,
       so content scrolling underneath never shows around the dropdown. Jump targets land
       16px below the band. */
    .da-faq {
        --da-faq-bar-pad: 12px;
        --da-faq-toggle: 55px;
        --da-faq-bar: calc(var(--da-faq-bar-pad) * 2 + var(--da-faq-toggle));
        display: block;
        padding: 8px 24px 40px;
    }

    .da-faq__aside {
        top: var(--da-faq-header, 0px);
        margin: 0 -24px 28px;
        padding: var(--da-faq-bar-pad) 24px;
        background: #fff;
    }

    .da-faq-category,
    .da-faq-item {
        scroll-margin-top: calc(var(--da-faq-header, 0px) + var(--da-faq-bar) + 16px);
    }

    .da-faq-page .da-faq-hero h1 {
        font-size: 48px;
        line-height: 58px;
        letter-spacing: 0;
    }

    .da-faq-nav.is-enhanced {
        position: relative;
        padding: 0;
        background: none;
        border: 0;
        border-radius: 0;
    }

    .da-faq-nav.is-enhanced .da-faq-nav__title {
        display: none;
    }

    .da-faq-nav.is-enhanced .da-faq-nav__toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: var(--da-faq-toggle);
        padding: 0 16px;
        background: #fafafa;
        border: 1px solid var(--da-faq-border);
        border-radius: 6px;
        cursor: pointer;
        font-family: 'Montserrat', sans-serif;
        font-weight: 600;
        font-size: 14px;
        line-height: 24px;
        text-transform: uppercase;
        color: #333;
    }

    .da-faq-nav.is-open .da-faq-nav__toggle {
        border-radius: 6px 6px 0 0;
    }

    .da-faq-nav__toggle img {
        transition: transform 200ms ease;
    }

    .da-faq-nav.is-open .da-faq-nav__toggle img {
        transform: rotate(180deg);
    }

    .da-faq-nav.is-enhanced .da-faq-nav__list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - var(--da-faq-header, 0px) - var(--da-faq-bar-pad) - var(--da-faq-toggle) - 16px);
        max-height: calc(100dvh - var(--da-faq-header, 0px) - var(--da-faq-bar-pad) - var(--da-faq-toggle) - 16px);
        overflow-y: auto;
        padding: 15px 0;
        background: #fff;
        border-radius: 0 0 4px 4px;
        box-shadow: 0 8px 5px rgba(88, 88, 88, 0.15);
    }

    .da-faq-nav.is-enhanced.is-open .da-faq-nav__list {
        display: flex;
    }

    .da-faq-nav__link {
        padding: 8px 24px;
    }
}

@media (max-width: 767px) {
    .da-faq-page .da-faq-hero {
        height: 386px;
    }

    .da-faq-page .da-faq-hero:after {
        background:
            linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
            linear-gradient(to top, rgba(0, 0, 0, 0.2) 0%, rgba(102, 102, 102, 0) 100%),
            linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(102, 102, 102, 0) 100%);
    }

    .da-faq-page .da-faq-hero h1 {
        font-size: 39px;
        line-height: 1.3;
    }

    .da-faq-hero__subheading {
        font-size: 16px;
        line-height: 1.6;
    }

    .da-faq-category {
        gap: 24px;
    }

    .da-faq-category__title {
        font-size: 25px;
        line-height: 32px;
    }

    .da-faq-category__intro {
        font-size: 16px;
        line-height: 28px;
    }

    .da-faq-item__toggle {
        padding: 24px 16px;
    }

    .da-faq-item.is-open .da-faq-item__toggle:after {
        left: 16px;
        right: 16px;
    }

    .da-faq-item__body {
        padding: 24px 16px;
    }

    .da-faq-contact {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        padding: 24px;
    }

    .da-faq-contact__button {
        width: 100%;
    }
}
