/* ==========================================================================
   FAQs v2 (/faqs)
   View: resources/views/user/faqs/faqs.blade.php
   Colours and font come ONLY from gateway-theme.css variables.
   Gold text only on navy; on white/ice use --gw-gold-dark. No grey text.
   ========================================================================== */

.fq {
    font-family: var(--gw-font);
    color: var(--gw-slate);
    background: var(--gw-ice);
    overflow-x: clip;
}
.fq [hidden] { display: none !important; }

.fq h1,
.fq h2 {
    font-family: var(--gw-font);
    color: var(--gw-navy);
    -webkit-text-fill-color: var(--gw-navy);
    background: none;
    margin: 0;
}

.fq-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

/* ---------- Hero (navy) ---------- */
.fq-hero {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(600px 300px at 88% 10%, rgba(var(--gw-gold-rgb), .16), transparent 70%),
        radial-gradient(520px 320px at 0% 100%, rgba(var(--gw-navy-light-rgb), .9), transparent 70%),
        var(--gw-navy);
    padding: 26px 0 44px;
    overflow: hidden;
}
.fq-hero::after {
    /* faint dotted grid, purely decorative */
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(var(--gw-ice-rgb), .08) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, transparent, var(--gw-navy) 30%, transparent);
            mask-image: linear-gradient(180deg, transparent, var(--gw-navy) 30%, transparent);
}

.fq-hero__top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 26px;
}

.fq-back {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(var(--gw-ice-rgb), .22);
    background: rgba(var(--gw-ice-rgb), .06);
    color: var(--gw-white);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.fq-back:hover { border-color: var(--gw-gold); color: var(--gw-gold); }

.fq .fq-crumbs {
    gap: 8px;
    margin: 0;
    padding: 0;
    font-size: 13px;
    background: none;
    color: rgba(var(--gw-ice-rgb), .8);
}
.fq .fq-crumbs a { color: rgba(var(--gw-ice-rgb), .85); text-decoration: none; }
.fq .fq-crumbs a:hover { color: var(--gw-white); }
.fq .fq-crumbs i { font-size: 14px; color: rgba(var(--gw-ice-rgb), .6); }
.fq .fq-crumbs .breadcrumb-active { color: var(--gw-gold); font-weight: 600; }

.fq-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gw-gold);
}
.fq-kicker::before {
    content: "";
    width: 22px;
    height: 3px;
    border-radius: 3px;
    background: var(--gw-gold-shine);
}

.fq .fq-title {
    margin: 0 0 12px;
    max-width: 760px;
    font-size: clamp(32px, 5.4vw, 60px);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -.025em;
    text-align: left;
    color: var(--gw-white);
    -webkit-text-fill-color: var(--gw-white);
}
.fq .fq-title span {
    color: var(--gw-gold);
    -webkit-text-fill-color: var(--gw-gold);
    background: none;
}

.fq-sub {
    margin: 0 0 26px;
    max-width: 520px;
    font-size: clamp(15px, 1.6vw, 18px);
    color: rgba(var(--gw-ice-rgb), .88);
}

/* Search */
.fq-search {
    position: relative;
    max-width: 640px;
}
.fq-search__icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    color: var(--gw-navy);
    pointer-events: none;
}
.fq .fq-search__input {
    display: block;
    width: 100%;
    height: 60px;
    padding: 0 56px 0 52px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--gw-white);
    color: var(--gw-navy);
    font-family: var(--gw-font);
    font-size: 16px; /* 16px stops iOS zoom */
    font-weight: 500;
    box-shadow: 0 14px 34px rgba(var(--gw-navy-rgb), .35);
    -webkit-appearance: none;
            appearance: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.fq .fq-search__input::placeholder { color: var(--gw-slate); opacity: .8; }
.fq .fq-search__input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.fq .fq-search__input:focus {
    outline: none;
    border-color: var(--gw-gold);
    box-shadow: 0 0 0 5px rgba(var(--gw-gold-rgb), .28), 0 14px 34px rgba(var(--gw-navy-rgb), .35);
}
.fq-search__clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--gw-ice);
    color: var(--gw-navy);
    cursor: pointer;
    transition: background-color .2s ease;
}
.fq-search__clear:hover { background: rgba(var(--gw-gold-rgb), .35); }

/* Popular search chips */
.fq-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}
.fq-quick__label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(var(--gw-ice-rgb), .8);
    margin-right: 2px;
}
.fq-quick__chip {
    min-height: 36px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(var(--gw-ice-rgb), .25);
    background: rgba(var(--gw-ice-rgb), .06);
    color: var(--gw-white);
    font-family: var(--gw-font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.fq-quick__chip:hover {
    border-color: var(--gw-gold);
    color: var(--gw-gold);
    transform: translateY(-1px);
}

/* ---------- Body ---------- */
.fq-body { padding: 40px 0 72px; }

.fq-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

.fq-count {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--gw-slate);
}

.fq-error {
    padding: 22px;
    border-radius: 18px;
    background: var(--gw-white);
    color: var(--gw-slate);
}

/* ---------- Accordion ---------- */
.fq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fq-item {
    background: var(--gw-white);
    border: 1px solid rgba(var(--gw-navy-rgb), .08);
    border-radius: 18px;
    box-shadow: 0 2px 10px rgba(var(--gw-navy-rgb), .04);
    scroll-margin-top: 110px;
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.fq-item:hover {
    border-color: rgba(var(--gw-gold-rgb), .7);
    box-shadow: 0 10px 26px rgba(var(--gw-navy-rgb), .08);
}
.fq-item.is-open {
    border-color: var(--gw-gold);
    box-shadow: 0 14px 34px rgba(var(--gw-navy-rgb), .1);
}

.fq .fq-q { font-size: inherit; line-height: inherit; }

.fq-q__btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 20px 22px;
    border: 0;
    border-radius: 18px;
    background: none;
    text-align: left;
    font-family: var(--gw-font);
    cursor: pointer;
}

.fq-q__num {
    flex: 0 0 auto;
    min-width: 34px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--gw-gold-dark);
    font-variant-numeric: tabular-nums;
}

.fq-q__text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--gw-navy);
    -webkit-text-fill-color: var(--gw-navy);
    overflow-wrap: anywhere;
}

.fq-hl {
    padding: 0 2px;
    border-radius: 4px;
    background: rgba(var(--gw-gold-rgb), .55);
    color: var(--gw-navy);
    -webkit-text-fill-color: var(--gw-navy);
}

/* plus that turns into a minus */
.fq-q__icon {
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gw-ice);
    transition: background .25s ease, transform .3s ease, box-shadow .25s ease;
}
.fq-q__icon::before,
.fq-q__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--gw-navy);
    transform: translate(-50%, -50%);
    transition: transform .3s ease;
}
.fq-q__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.fq-q__btn:hover .fq-q__icon { background: rgba(var(--gw-gold-rgb), .35); }
.fq-item.is-open .fq-q__icon {
    background: var(--gw-gold-shine);
    box-shadow: var(--gw-gold-glow);
    transform: rotate(180deg);
}
.fq-item.is-open .fq-q__icon::after { transform: translate(-50%, -50%) rotate(0deg); }

/* Answer: smooth height via grid rows; visibility hides it from tab order + screen readers when closed.
   Without JS (.fq-js missing) every answer stays open. */
.fq-a__clip { overflow: hidden; min-height: 0; }
.fq-a__body {
    padding: 0 22px 22px 72px;
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--gw-slate);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.fq-js .fq-a {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows .35s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .35s;
}
.fq-js .fq-item.is-open .fq-a {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows .35s cubic-bezier(.2, .7, .2, 1), visibility 0s linear 0s;
}
.fq-js .fq-a__body {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .25s ease, transform .3s ease;
}
.fq-js .fq-item.is-open .fq-a__body {
    opacity: 1;
    transform: none;
    transition-delay: .06s;
}

/* ---------- Empty state ---------- */
.fq-empty {
    padding: 44px 24px;
    border-radius: 22px;
    border: 2px dashed rgba(var(--gw-navy-rgb), .15);
    background: var(--gw-white);
    text-align: center;
}
.fq-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--gw-ice);
    color: var(--gw-navy);
    font-size: 28px;
}
.fq .fq-empty__title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.fq-empty__text { margin: 0 0 20px; color: var(--gw-slate); }
.fq-empty__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* ---------- Buttons ---------- */
.fq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 12px 24px;
    border-radius: 999px;
    border: 2px solid transparent;
    font-family: var(--gw-font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.fq-btn--gold {
    background: var(--gw-gold-shine);
    color: var(--gw-navy);
    -webkit-text-fill-color: var(--gw-navy);
    box-shadow: var(--gw-gold-glow);
}
.fq-btn--gold:hover {
    color: var(--gw-navy);
    transform: translateY(-2px);
    box-shadow: var(--gw-gold-glow), 0 10px 24px rgba(var(--gw-gold-rgb), .4);
}
.fq-btn--ghost {
    background: var(--gw-white);
    border-color: rgba(var(--gw-navy-rgb), .2);
    color: var(--gw-navy);
}
.fq-btn--ghost:hover { border-color: var(--gw-navy); color: var(--gw-navy); }
.fq-btn--line {
    background: transparent;
    border-color: rgba(var(--gw-ice-rgb), .35);
    color: var(--gw-white);
    -webkit-text-fill-color: var(--gw-white);
}
.fq-btn--line:hover { border-color: var(--gw-gold); color: var(--gw-gold); -webkit-text-fill-color: var(--gw-gold); }

/* ---------- Expert CTA (navy card) ---------- */
.fq-side {
    position: sticky;
    top: 104px;
}
.fq-cta {
    position: relative;
    overflow: hidden;
    padding: 30px 26px 26px;
    border-radius: 24px;
    background:
        radial-gradient(280px 200px at 100% 0%, rgba(var(--gw-gold-rgb), .22), transparent 70%),
        linear-gradient(160deg, var(--gw-navy-light) 0%, var(--gw-navy) 70%);
    color: rgba(var(--gw-ice-rgb), .9);
    box-shadow: 0 22px 44px rgba(var(--gw-navy-rgb), .25);
}
.fq-cta__badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--gw-gold-shine);
    color: var(--gw-navy);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.fq .fq-cta__title {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: var(--gw-white);
    -webkit-text-fill-color: var(--gw-white);
}
.fq .fq-cta__title span {
    display: block;
    color: var(--gw-gold);
    -webkit-text-fill-color: var(--gw-gold);
}
.fq-cta__text {
    margin: 0 0 22px;
    font-size: 15px;
    color: rgba(var(--gw-ice-rgb), .88);
}
.fq-cta__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fq-cta__actions .fq-btn { width: 100%; }
.fq-cta__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 14px;
    color: rgba(var(--gw-ice-rgb), .6);
}
.fq-cta__links a {
    color: var(--gw-white);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(var(--gw-gold-rgb), .7);
    text-underline-offset: 4px;
}
.fq-cta__links a:hover { color: var(--gw-gold); }
.fq-cta__done { text-align: center; padding: 12px 0; }
.fq-cta__done img { margin-bottom: 14px; }

/* ---------- Focus ---------- */
.fq-back:focus-visible,
.fq-quick__chip:focus-visible,
.fq-search__clear:focus-visible,
.fq-btn:focus-visible,
.fq-cta__links a:focus-visible,
.fq .fq-crumbs a:focus-visible {
    outline: 3px solid var(--gw-gold);
    outline-offset: 3px;
}
.fq-q__btn:focus-visible {
    outline: 3px solid var(--gw-navy);
    outline-offset: -3px;
    box-shadow: inset 0 0 0 6px rgba(var(--gw-gold-rgb), .45);
}
.fq-empty .fq-btn:focus-visible { outline-color: var(--gw-navy); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .fq-grid { grid-template-columns: minmax(0, 1fr); }
    .fq-side { position: static; }
    .fq-cta__actions { flex-direction: row; }
    .fq-cta__actions .fq-btn { flex: 1 1 0; }
}

@media (max-width: 575px) {
    .fq-hero { padding: 18px 0 32px; }
    .fq-hero__top { margin-bottom: 20px; }
    .fq .fq-search__input { height: 54px; padding-left: 46px; }
    .fq-search__icon { left: 18px; }
    .fq-body { padding: 26px 0 52px; }
    .fq-q__btn { gap: 12px; padding: 16px; }
    .fq-q__num { min-width: 22px; font-size: 12px; }
    .fq-q__text { font-size: 15.5px; }
    .fq-q__icon { width: 30px; height: 30px; }
    .fq-a__body { padding: 0 16px 18px; font-size: 15px; }
    .fq-cta { padding: 24px 18px 20px; }
    .fq .fq-cta__title { font-size: 23px; }
    .fq-cta__actions { flex-direction: column; }
    .fq-empty { padding: 32px 16px; }
    .fq-empty__actions .fq-btn { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .fq *,
    .fq *::before,
    .fq *::after {
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
        animation: none !important;
    }
    .fq-btn--gold:hover,
    .fq-quick__chip:hover { transform: none; }
}
