/* Monkey Puzzle FAQ Engine — front end (FAQ redesign handoff).

   Everything is scoped under .mpn-faq with its own class names, so legacy CSS
   written for the old FAQ plugin cannot reach it. The brand font is inherited
   from the theme (Filson Pro); only weights and sizes are set here.

   The theme sets some heading rules with !important (font-weight on h2, for
   one), so the few !important declarations below are deliberate overrides. */

.mpn-faq {
    --mpn-ink: #1E3B42;
    --mpn-body: #3E5A60;
    --mpn-teal-text: #2C7684;
    --mpn-teal: #4797A8;        /* the site's primary teal (footer, links) */
    --mpn-heading: var(--mpn-teal); /* headings + category card names, as on the rest of the site */
    --mpn-purple: #8246AF;      /* the site's button purple */
    --mpn-purple-dark: #6C3A93;
    /* Filson Pro: 700 is the site's own heading weight. 800/900 read too heavy. */
    --mpn-w-bold: 700;
    --mpn-w-text: 400;
    --mpn-aqua: #E2F4F6;
    --mpn-card: #EFF9FA;
    --mpn-card-border: #C7E7EB;
    --mpn-acc-border: #DCE8EA;
    --mpn-divider: #E6EEEF;
    --mpn-row-open: #F6FBFC;
    --mpn-soft: #DDF1F0; /* hero + category header band: the site's pale blue */
    --mpn-placeholder: #7C8F93;
    --mpn-sticky-top: 24px;

    color: var(--mpn-ink);
    font-family: inherit;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-align: left;
}

.mpn-faq *,
.mpn-faq *::before,
.mpn-faq *::after { box-sizing: border-box; }

.mpn-faq [hidden] { display: none !important; }

.mpn-faq a { color: var(--mpn-teal-text); }
.mpn-faq a:hover,
.mpn-faq a:focus { color: var(--mpn-ink); }

.mpn-faq :focus-visible {
    outline: 3px solid var(--mpn-teal);
    outline-offset: 2px;
}

/* The FAQ hero / category header replaces the theme's own page title bar. */
.mpn-faq-view--own-header .fusion-page-title-bar,
.mpn-faq-view--own-header .avada-page-titlebar-wrapper { display: none; }

/* ---- Layout ---------------------------------------------------------- */

.mpn-faq .mpn-faq-wrap {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* Full-bleed colour bands that work whether the page content area is
   full-width or boxed: the colour is painted outwards with a huge spread
   shadow and clipped vertically, so nothing overflows sideways. */
.mpn-faq .mpn-faq-band {
    background: var(--mpn-band);
    box-shadow: 0 0 0 100vmax var(--mpn-band);
    clip-path: inset(0 -100vmax);
}
.mpn-faq .mpn-faq-band--soft  { --mpn-band: var(--mpn-soft); }
.mpn-faq .mpn-faq-band--teal  { --mpn-band: var(--mpn-teal); }

.mpn-faq .mpn-faq-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.mpn-faq .mpn-faq-section--browse  { padding-top: 56px; padding-bottom: 0; }
.mpn-faq .mpn-faq-section--popular { padding-top: 64px; padding-bottom: 72px; }
.mpn-faq .mpn-faq-section--results { padding-top: 40px; padding-bottom: 64px; gap: 20px; }

.mpn-faq .mpn-faq-section__head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mpn-faq .mpn-faq-section__title {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: var(--mpn-w-bold) !important;
    letter-spacing: -.01em;
    color: var(--mpn-heading);
}
.mpn-faq .mpn-faq-section__sub {
    margin: 0;
    font-size: 17px;
    line-height: 1.5;
    color: var(--mpn-body);
}

/* ---- Hero (hub) ------------------------------------------------------ */

.mpn-faq .mpn-faq-hero__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: center;
    padding-top: 48px;
    padding-bottom: 56px;
}
.mpn-faq .mpn-faq-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}
.mpn-faq .mpn-faq-eyebrow {
    font-weight: var(--mpn-w-bold);
    font-size: 14px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mpn-teal-text);
}
.mpn-faq .mpn-faq-hero__title {
    margin: 0;
    font-size: 56px;
    line-height: 1.02;
    font-weight: var(--mpn-w-bold) !important;
    letter-spacing: -.02em;
    color: var(--mpn-heading);
    text-wrap: balance;
}
.mpn-faq .mpn-faq-hero__intro {
    margin: 0;
    max-width: 480px;
    font-size: 18px;
    line-height: 1.5;
    color: var(--mpn-body);
    text-wrap: pretty;
}
.mpn-faq .mpn-faq-hero__media {
    aspect-ratio: 4 / 3;
    border-radius: 28px;
    overflow: hidden;
    background: var(--mpn-card-border);
}
.mpn-faq .mpn-faq-hero__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* ---- Search ---------------------------------------------------------- */

.mpn-faq .mpn-faq-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 0;
    padding: 6px 6px 6px 20px;
    background: #fff;
    border: 2px solid var(--mpn-teal);
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(58, 142, 156, .12);
}
.mpn-faq .mpn-faq-search:focus-within { border-color: var(--mpn-teal-text); }

/* Magnifier: ring + handle, drawn in CSS. */
.mpn-faq .mpn-faq-search__icon {
    position: relative;
    flex: none;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    border: 2.5px solid var(--mpn-teal);
    border-radius: 50%;
}
.mpn-faq .mpn-faq-search__icon::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: -5px;
    width: 7px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--mpn-teal);
    transform: rotate(45deg);
}

.mpn-faq .mpn-faq-search__input {
    flex: 1;
    min-width: 0;
    width: auto;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 17px;
    font-weight: var(--mpn-w-text);
    line-height: 1.3;
    color: var(--mpn-ink);
}
.mpn-faq .mpn-faq-search__input::placeholder { color: var(--mpn-placeholder); opacity: 1; }
.mpn-faq .mpn-faq-search__input:focus { outline: 0; box-shadow: none; border: 0; }

.mpn-faq .mpn-faq-search__clear {
    flex: none;
    height: 44px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--mpn-aqua);
    color: var(--mpn-teal-text);
    font: inherit;
    font-size: 14px;
    font-weight: var(--mpn-w-bold);
    line-height: 1;
    cursor: pointer;
}
.mpn-faq .mpn-faq-search__clear:hover { background: #D3EDF0; }

.mpn-faq .mpn-faq-search--compact {
    flex: 0 1 420px;
    min-width: 0;
    margin: 0;
    padding: 4px 4px 4px 18px;
    box-shadow: none;
}
.mpn-faq .mpn-faq-search--compact .mpn-faq-search__icon { width: 13px; height: 13px; }
.mpn-faq .mpn-faq-search--compact .mpn-faq-search__input { font-size: 16px; height: 40px; }
.mpn-faq .mpn-faq-search--compact .mpn-faq-search__clear { height: 40px; padding: 0 14px; }

/* ---- Category cards (hub) -------------------------------------------- */

.mpn-faq .mpn-faq-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}
.mpn-faq .mpn-faq-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 84px;
    padding: 18px 18px 18px 20px;
    border: 1px solid var(--mpn-card-border);
    border-radius: 18px;
    background: var(--mpn-card);
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.mpn-faq .mpn-faq-card:hover,
.mpn-faq .mpn-faq-card:focus-visible {
    background: var(--mpn-aqua);
    border-color: var(--mpn-teal);
}
.mpn-faq .mpn-faq-card__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.mpn-faq .mpn-faq-card__name {
    font-size: 19px;
    font-weight: var(--mpn-w-bold);
    line-height: 1.25;
    color: var(--mpn-heading);
}
.mpn-faq .mpn-faq-card__blurb {
    font-size: 14px;
    font-weight: var(--mpn-w-text);
    line-height: 1.4;
    color: var(--mpn-body);
}
.mpn-faq .mpn-faq-card__count {
    flex: none;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: var(--mpn-w-bold);
    line-height: 1.4;
    color: var(--mpn-teal-text);
}

/* ---- Accordion ------------------------------------------------------- */

.mpn-faq .mpn-faq-acc {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--mpn-acc-border);
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
}
.mpn-faq .mpn-faq-acc:empty { display: none; }

.mpn-faq .mpn-faq-acc__row {
    border-top: 1px solid var(--mpn-divider);
    background: #fff;
    transition: background-color .2s ease-out;
}
.mpn-faq .mpn-faq-acc__row:first-child { border-top: 0; }
.mpn-faq .mpn-faq-acc__row.is-open { background: var(--mpn-row-open); }

.mpn-faq .mpn-faq-acc__heading {
    margin: 0;
    padding: 0;
    font: inherit;
    line-height: inherit;
    letter-spacing: normal;
}
.mpn-faq .mpn-faq-acc__trigger {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-height: 64px;
    margin: 0;
    padding: 18px 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font: inherit;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    color: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.mpn-faq .mpn-faq-acc__trigger:hover { background: transparent; color: inherit; }
.mpn-faq .mpn-faq-acc__trigger:focus-visible { outline-offset: -3px; }

.mpn-faq .mpn-faq-acc__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mpn-faq .mpn-faq-acc__label {
    font-size: 12px;
    font-weight: var(--mpn-w-bold);
    line-height: 1.3;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mpn-teal-text);
}
.mpn-faq .mpn-faq-acc__q {
    font-size: 17px;
    font-weight: var(--mpn-w-bold);
    line-height: 1.35;
    color: var(--mpn-ink);
}

/* Chevron: 34px aqua circle holding an 8px corner; down when closed, up when open. */
.mpn-faq .mpn-faq-acc__chev {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--mpn-aqua);
}
.mpn-faq .mpn-faq-acc__chev::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2.5px solid var(--mpn-teal-text);
    border-bottom: 2.5px solid var(--mpn-teal-text);
    transform: translateY(-2px) rotate(45deg);
    transition: transform .2s ease-out;
}
.mpn-faq .mpn-faq-acc__row.is-open .mpn-faq-acc__chev::before {
    transform: translateY(2px) rotate(225deg);
}

/* Answers stay in the DOM (crawlers read them); the panel animates open by
   growing its single grid row from 0fr to 1fr. */
.mpn-faq .mpn-faq-acc__panel {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows .2s ease-out, visibility 0s linear .2s;
}
.mpn-faq .mpn-faq-acc__row.is-open .mpn-faq-acc__panel {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows .2s ease-out, visibility 0s;
}
.mpn-faq .mpn-faq-acc__inner {
    min-height: 0;
    overflow: hidden;
}
.mpn-faq .mpn-faq-acc__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 70px 22px 20px;
}
.mpn-faq .mpn-faq-acc__answer {
    font-size: 16px;
    line-height: 1.6;
    color: var(--mpn-body);
    text-wrap: pretty;
}
.mpn-faq .mpn-faq-acc__answer > :first-child { margin-top: 0; }
.mpn-faq .mpn-faq-acc__answer > :last-child  { margin-bottom: 0; }
.mpn-faq .mpn-faq-acc__answer p { margin: 0 0 12px; }
.mpn-faq .mpn-faq-acc__answer ul,
.mpn-faq .mpn-faq-acc__answer ol { margin: 0 0 12px; padding-left: 22px; }
.mpn-faq .mpn-faq-acc__answer img { max-width: 100%; height: auto; }
.mpn-faq .mpn-faq-acc__more {
    align-self: flex-start;
    font-size: 15px;
    font-weight: var(--mpn-w-bold);
}

/* ---- Search results -------------------------------------------------- */

.mpn-faq .mpn-faq-results__title {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    font-weight: var(--mpn-w-bold) !important;
    color: var(--mpn-heading);
}
.mpn-faq .mpn-faq-results__title--sm { font-size: 22px; }
.mpn-faq .mpn-faq-results__empty {
    margin: 0;
    font-size: 17px;
    color: var(--mpn-body);
}
.mpn-faq .mpn-faq-results__empty a { font-weight: var(--mpn-w-bold); }

/* ---- Category page: header band -------------------------------------- */

.mpn-faq .mpn-faq-head__inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 28px;
    padding-bottom: 36px;
}
.mpn-faq .mpn-faq-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 15px;
    font-weight: var(--mpn-w-bold);
    color: var(--mpn-body);
}
.mpn-faq .mpn-faq-crumbs a { text-decoration: none; }
.mpn-faq .mpn-faq-crumbs a:hover { text-decoration: underline; }
.mpn-faq .mpn-faq-crumbs__current { color: var(--mpn-ink); }

.mpn-faq .mpn-faq-head__row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    justify-content: space-between;
}
.mpn-faq .mpn-faq-head__titles {
    flex: none;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mpn-faq .mpn-faq-head__title {
    margin: 0;
    font-size: 44px;
    line-height: 1.05;
    font-weight: var(--mpn-w-bold) !important;
    letter-spacing: -.02em;
    color: var(--mpn-heading);
}
.mpn-faq .mpn-faq-head__count {
    font-size: 16px;
    font-weight: var(--mpn-w-bold);
    white-space: nowrap;
    color: var(--mpn-body);
}

/* ---- Category page: body --------------------------------------------- */

.mpn-faq .mpn-faq-body {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
    padding-top: 32px;
    padding-bottom: 72px;
}
.mpn-faq .mpn-faq-list {
    flex: 1 1 320px;
    min-width: 0;
}
.mpn-faq .mpn-faq-list > [data-mpn-results],
.mpn-faq .mpn-faq-list > [data-mpn-default] {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mpn-faq .mpn-faq-cats {
    flex: 0 0 220px;
    position: sticky;
    top: var(--mpn-sticky-top);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mpn-faq .mpn-faq-cats__label {
    padding: 0 14px 8px;
    font-size: 13px;
    font-weight: var(--mpn-w-bold);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mpn-body);
}
.mpn-faq .mpn-faq-cats__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mpn-faq .mpn-faq-cats__list > li {
    margin: 0;
    padding: 0;
    list-style: none;
}
.mpn-faq .mpn-faq-cats__list > li::before { content: none; }
.mpn-faq .mpn-faq-cats__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    background: transparent;
    font-size: 16px;
    font-weight: var(--mpn-w-bold);
    line-height: 1.3;
    color: var(--mpn-teal-text);
    text-decoration: none;
    transition: background-color .15s ease;
}
.mpn-faq .mpn-faq-cats__item:hover { background: var(--mpn-aqua); color: var(--mpn-teal-text); }
.mpn-faq .mpn-faq-cats__item.is-active,
.mpn-faq .mpn-faq-cats__item.is-active:hover {
    background: var(--mpn-teal);
    color: #fff;
}
.mpn-faq .mpn-faq-cats__count {
    font-size: 13px;
    font-weight: var(--mpn-w-bold);
    opacity: .8;
}

/* ---- Enquiry band ---------------------------------------------------- */

.mpn-faq .mpn-faq-enquire__row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding-top: 40px;
    padding-bottom: 40px;
}
.mpn-faq .mpn-faq-enquire__copy {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mpn-faq .mpn-faq-enquire__title {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    font-weight: var(--mpn-w-bold) !important;
    color: #fff;
    text-wrap: balance;
}
.mpn-faq .mpn-faq-enquire__text {
    margin: 0;
    font-size: 17px;
    color: #fff;
}
.mpn-faq .mpn-faq-enquire__btn,
.mpn-faq .mpn-faq-enquire__btn:hover,
.mpn-faq .mpn-faq-enquire__btn:focus {
    flex: none;
    padding: 16px 26px;
    border-radius: 999px;
    background: var(--mpn-purple);
    font-size: 17px;
    font-weight: var(--mpn-w-bold);
    line-height: 1.2;
    color: #fff;
    text-decoration: none;
    transition: background-color .15s ease;
}
.mpn-faq .mpn-faq-enquire__btn:hover,
.mpn-faq .mpn-faq-enquire__btn:focus { background: var(--mpn-purple-dark); }
.mpn-faq .mpn-faq-enquire__btn:focus-visible { outline-color: #fff; }

/* ---- Mobile ---------------------------------------------------------- */

@media (max-width: 767px) {
    .mpn-faq .mpn-faq-hero__title { font-size: 36px; line-height: 1.05; }

    .mpn-faq .mpn-faq-search--compact { flex: 1 1 100%; }

    /* Sidebar becomes a full-bleed, horizontally scrolling chip row. */
    .mpn-faq .mpn-faq-body { gap: 24px; }
    .mpn-faq .mpn-faq-cats {
        position: static;
        flex: 1 1 100%;
        min-width: 0;
        margin: 0 -24px;
    }
    .mpn-faq .mpn-faq-cats__label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .mpn-faq .mpn-faq-cats__list {
        flex-direction: row;
        gap: 8px;
        padding: 0 24px 4px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .mpn-faq .mpn-faq-cats__list::-webkit-scrollbar { display: none; }
    .mpn-faq .mpn-faq-cats__list > li { flex: none; }
    .mpn-faq .mpn-faq-cats__item {
        height: 44px;
        padding: 0 16px;
        border: 1px solid var(--mpn-card-border);
        border-radius: 999px;
        background: #fff;
        font-size: 15px;
        white-space: nowrap;
    }
    .mpn-faq .mpn-faq-cats__item.is-active { border-color: var(--mpn-teal); }
    .mpn-faq .mpn-faq-cats__count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .mpn-faq .mpn-faq-acc__panel,
    .mpn-faq .mpn-faq-acc__row.is-open .mpn-faq-acc__panel,
    .mpn-faq .mpn-faq-acc__chev::before,
    .mpn-faq .mpn-faq-acc__row,
    .mpn-faq .mpn-faq-card,
    .mpn-faq .mpn-faq-cats__item { transition: none; }
}
