/* ═══════════════════════════════════════════
   Charlie's Fried Chicken – FAQ / Guest Support
   ═══════════════════════════════════════════ */

.cfc-faq-page {
    --cfc-red: #ff0006;
    --cfc-dark-red: #b0001a;
    --cfc-cream: #f5f0eb;
    --cfc-black: #111111;
    --cfc-white: #ffffff;
    --cfc-grey: #6b6b6b;
    --cfc-line: #ececec;
    --cfc-red-tint: #fff4f4;
    --cfc-red-soft: #ffe3e4;
    --cfc-font-heading: Arial, 'Helvetica Neue', Helvetica, sans-serif;
    --cfc-font-body: Arial, 'Helvetica Neue', Helvetica, sans-serif;

    font-family: var(--cfc-font-body);
    color: var(--cfc-black);
    background: var(--cfc-white);
    padding: 0;
}

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

.cfc-faq__inner {
    max-width: 940px;
    margin: 0 auto;
    padding: clamp(2.25rem, 5vw, 3.5rem) 1.25rem clamp(4rem, 8vw, 7rem);
}

/* ─── Hero banner (full-bleed, same treatment as the menu page) ─── */
.cfc-faq-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    min-height: var(--faq-hero-h-desktop, 56vh);
    background-size: cover;
    background-position: center;
    background-color: #1a0606;
    color: var(--faq-hero-color, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.cfc-faq-hero--noimg {
    background-image:
        radial-gradient(120% 120% at 50% 0%, #ff2a30 0%, var(--cfc-red) 45%, var(--cfc-dark-red) 100%);
}

.cfc-faq-hero__overlay {
    position: absolute;
    inset: 0;
    background: var(--faq-hero-tint, #000);
    opacity: var(--faq-hero-tint-alpha, 0.45);
    z-index: 1;
    pointer-events: none;
}

.cfc-faq-hero--noimg .cfc-faq-hero__overlay {
    opacity: 0; /* the gradient already provides contrast */
}

.cfc-faq-hero__content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
    padding: clamp(3rem, 8vw, 6rem) 1.5rem;
}

.cfc-faq-hero__eyebrow,
.cfc-faq-hero__title,
.cfc-faq-hero__subtitle {
    color: var(--faq-hero-color, #fff) !important;
}

.cfc-faq-hero__eyebrow {
    display: inline-block;
    font-size: clamp(12px, 1.4vw, 15px);
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
    opacity: 0.92;
    line-height: 1.4;
    animation: cfcFaqHeroIn 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s both;
}

.cfc-faq-hero__title {
    font-family: var(--cfc-font-heading);
    font-size: var(--faq-hero-title-size, clamp(2.75rem, 8vw, 6rem));
    font-weight: 900;
    line-height: 0.92;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin: 0;
    overflow-wrap: anywhere;
    animation: cfcFaqHeroIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.18s both;
}

.cfc-faq-hero__subtitle {
    margin: 1.15rem auto 0;
    max-width: 620px;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-weight: 500;
    line-height: 1.5;
    opacity: 0.95;
    animation: cfcFaqHeroIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.34s both;
}

.cfc-faq-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.7rem;
    padding: 0.85rem 2rem;
    background: #fff;
    color: #111 !important;
    border-radius: 999px;
    font-family: var(--cfc-font-body);
    font-weight: 700;
    font-size: clamp(0.9rem, 1.4vw, 1rem);
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: transform 0.18s ease, filter 0.18s ease, background 0.18s ease, color 0.18s ease;
    animation: cfcFaqHeroIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.5s both;
}

.cfc-faq-hero__cta:hover {
    transform: translateY(-2px);
    background: var(--cfc-red);
    color: #fff !important;
}

.cfc-faq-hero__cta:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

@keyframes cfcFaqHeroIn {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: var(--faq-in-op, 1); transform: translateY(0); }
}

.cfc-faq-hero__eyebrow  { --faq-in-op: 0.92; }
.cfc-faq-hero__subtitle { --faq-in-op: 0.95; }

/* ─── Entrance animation for search + category cards ─── */
.cfc-faq-anim {
    animation: cfcFaqUp 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(0.12s + var(--faq-i, 0) * 0.09s);
}

@keyframes cfcFaqUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .cfc-faq-hero__eyebrow,
    .cfc-faq-hero__title,
    .cfc-faq-hero__subtitle,
    .cfc-faq-hero__cta,
    .cfc-faq-anim {
        animation: none !important;
    }
}

@media (max-width: 720px) {
    .cfc-faq-hero {
        min-height: var(--faq-hero-h-mobile, 360px);
    }
    /* Deliberately does NOT fall back to --faq-hero-title-size (the desktop
       override) any more: with the mobile ACF field left empty, a 60-88px
       desktop title landed verbatim on a 320px screen and shredded across three
       lines at line-height 0.92. Falls back to the site-wide 40px mobile hero
       standard instead. */
    .cfc-faq-hero__title {
        font-size: var(--faq-hero-title-size-mobile, 40px);
        font-weight: 900;
    }
}

/* ─── Search ─── */
.cfc-faq__search {
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.cfc-faq__search-label {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.65rem;
    color: var(--cfc-black);
}

.cfc-faq-page .cfc-faq__search-field {
    position: relative;
    display: block;
    width: 100%;
}

.cfc-faq-page .cfc-faq__search-icon {
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    color: var(--cfc-grey);
    pointer-events: none;
    z-index: 1;
}

.cfc-faq-page .cfc-faq__search-icon svg {
    width: 20px;
    height: 20px;
}

.cfc-faq-page .cfc-faq__search-input {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: auto;
    margin: 0;
    font-family: inherit;
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--cfc-black);
    background: var(--cfc-white);
    border: 1.5px solid var(--cfc-line);
    border-radius: 16px;
    padding: 1.15rem 1.25rem 1.15rem 3.1rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    appearance: none;
    -webkit-appearance: none;
}

.cfc-faq-page .cfc-faq__search-input::placeholder {
    color: #9a9a9a;
    opacity: 1;
}

.cfc-faq-page .cfc-faq__search-input:focus {
    outline: none;
    border-color: var(--cfc-red);
    box-shadow: 0 0 0 4px rgba(255, 0, 6, 0.1);
}

.cfc-faq-page .cfc-faq__search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.cfc-faq__noresults {
    margin: 1.25rem 0 0;
    font-weight: 600;
    color: var(--cfc-grey);
}

/* ─── Category list ─── */
.cfc-faq__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfc-faq-cat {
    background: var(--cfc-white);
    border: 1.5px solid var(--cfc-line);
    border-radius: 20px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cfc-faq-cat.is-open {
    border-color: rgba(255, 0, 6, 0.35);
    background: var(--cfc-red-tint);
    box-shadow: 0 10px 30px -18px rgba(255, 0, 6, 0.5);
}

.cfc-faq-cat__heading {
    margin: 0;
}

.cfc-faq-cat__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
    padding: clamp(1.25rem, 2.5vw, 1.85rem) clamp(1.35rem, 3vw, 2.15rem);
    font-family: inherit;
    color: inherit;
}

/* Kill the theme's default button hover/focus background on the toggles. */
.cfc-faq-page .cfc-faq-cat__toggle:hover,
.cfc-faq-page .cfc-faq-cat__toggle:focus,
.cfc-faq-page .cfc-faq-cat__toggle:active,
.cfc-faq-page .cfc-faq-item__q:hover,
.cfc-faq-page .cfc-faq-item__q:focus,
.cfc-faq-page .cfc-faq-item__q:active {
    background: none;
    box-shadow: none;
    outline: none;
}

.cfc-faq-cat__title {
    font-family: var(--cfc-font-heading);
    font-weight: 900;
    font-size: clamp(1.3rem, 2.7vw, 1.625rem);
    /* 1.15, not 1: at 320px the title column is ~183px, so a category like
       "Ordering & Collection" wraps to 2-3 lines at this size/900 and zero
       leading made ascenders and descenders collide between lines. */
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--cfc-black);
}

.cfc-faq-cat__chevron {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 0, 6, 0.4);
    color: var(--cfc-red);
    transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cfc-faq-cat__chevron svg {
    width: 20px;
    height: 20px;
    transform: rotate(-90deg); /* points right when collapsed */
    transition: transform 0.25s ease;
}

.cfc-faq-cat.is-open .cfc-faq-cat__chevron {
    background: var(--cfc-red);
    border-color: var(--cfc-red);
    color: var(--cfc-white);
}

.cfc-faq-cat.is-open .cfc-faq-cat__chevron svg {
    transform: rotate(0deg); /* points down when open */
}

/* Collapsible body — max-height clip so a collapsed category shows only its
   title (no first-question peek). Large enough to fit the biggest category. */
.cfc-faq-cat__body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

.cfc-faq-cat.is-open .cfc-faq-cat__body {
    max-height: 2000px;
}

.cfc-faq-cat__items {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0 clamp(1.35rem, 3vw, 2.15rem) clamp(1.35rem, 3vw, 2.15rem);
}

/* ─── Question item ─── */
.cfc-faq-item {
    background: var(--cfc-white);
    border: 1.5px solid var(--cfc-line);
    border-radius: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cfc-faq-item.is-open {
    border-color: rgba(255, 0, 6, 0.45);
    box-shadow: 0 8px 22px -16px rgba(0, 0, 0, 0.45);
}

.cfc-faq-item__q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.95rem;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
    padding: clamp(1rem, 2vw, 1.35rem) clamp(1rem, 2.2vw, 1.45rem);
    font-family: inherit;
    color: inherit;
}

.cfc-faq-item__icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--cfc-red-soft);
    color: var(--cfc-red);
    transition: background 0.2s ease, color 0.2s ease;
}

.cfc-faq-item__icon svg {
    width: 17px;
    height: 17px;
}

.cfc-faq-item__icon-minus { display: none; }

.cfc-faq-item.is-open .cfc-faq-item__icon {
    background: var(--cfc-red);
    color: var(--cfc-white);
}

.cfc-faq-item.is-open .cfc-faq-item__icon-plus { display: none; }
.cfc-faq-item.is-open .cfc-faq-item__icon-minus { display: block; }

.cfc-faq-item__q-text {
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.35;
    color: var(--cfc-black);
}

/* Answer reveal */
.cfc-faq-item__a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s ease;
}

.cfc-faq-item.is-open .cfc-faq-item__a {
    grid-template-rows: 1fr;
}

.cfc-faq-item__a-inner {
    overflow: hidden;
    min-height: 0;
    padding: 0 clamp(1rem, 2.4vw, 1.45rem);
    color: #3a3a3a;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    line-height: 1.6;
    text-align: left;
}

.cfc-faq-item.is-open .cfc-faq-item__a-inner {
    padding-bottom: clamp(1.1rem, 2.2vw, 1.45rem);
}

.cfc-faq-item__a-inner p { margin: 0 0 0.75rem; }
.cfc-faq-item__a-inner p:last-child { margin-bottom: 0; }

.cfc-faq-item__a-inner a {
    color: var(--cfc-red);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    word-break: break-word;
}

/* ─── Mobile tweaks ─── */
@media (max-width: 600px) {
    .cfc-faq-item__q { gap: 0.7rem; }
    .cfc-faq-item__a-inner {
        padding-left: clamp(0.9rem, 2.2vw, 1.2rem);
    }
    .cfc-faq-cat__chevron {
        width: 38px;
        height: 38px;
    }
}
