/**
 * Corporate Zaddy — FAQ Page Styles
 * File: assets/css/templates/page-faq.css
 *
 * Dynamic color tokens (--p, --p-rgb, --g, --g-rgb) injected by
 * cz_faq_dynamic_styles() in inc/dynamic-styles.php.
 *
 * Mobile-first: base rules target small screens, refined upward at
 * 480px / 640px / 768px / 1024px.
 */

.cz-faq {
    font-family: 'DM Sans', system-ui, sans-serif;
    color: #1a2233;
    background: #fff;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}
.cz-faq .cz-wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 clamp(16px, 4.5vw, 40px); }
.cz-faq *, .cz-faq *::before, .cz-faq *::after { box-sizing: border-box; }
.cz-faq a:focus-visible,
.cz-faq button:focus-visible,
.cz-faq input:focus-visible {
    outline: 2.5px solid var(--p);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ── Hero ── */
.fq-hero {
    position: relative;
    padding: 44px 0 32px;
    background:
        radial-gradient(ellipse 60% 60% at 85% 0%, rgba(var(--g-rgb), .10), transparent 60%),
        radial-gradient(ellipse 50% 50% at 10% 100%, rgba(var(--p-rgb), .06), transparent 60%),
        #f9f8f5;
    text-align: center;
}
.fq-hero-in { max-width: 720px; margin: 0 auto; }
.fq-eyebrow {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--p);
    background: rgba(var(--p-rgb), .08);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
}
.fq-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.7rem, 7vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: #0c1524;
    margin-bottom: 12px;
    overflow-wrap: break-word;
}
.fq-subtitle {
    font-size: .95rem;
    line-height: 1.6;
    color: #5b6478;
    max-width: 56ch;
    margin: 0 auto 22px;
    padding: 0 4px;
}
.fq-search { position: relative; max-width: 440px; margin: 0 auto; }
.fq-search-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #9aa2b3; width: 17px; height: 17px; pointer-events: none; }
.fq-search input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border-radius: 12px;
    border: 1.5px solid #e4e1d8;
    background: #fff;
    font-size: 16px; /* 16px minimum prevents iOS Safari zoom-on-focus */
    font-family: inherit;
    box-shadow: 0 2px 10px rgba(12,21,36,.05);
    transition: border-color .2s, box-shadow .2s;
}
.fq-search input:focus {
    outline: none;
    border-color: var(--p);
    box-shadow: 0 0 0 4px rgba(var(--p-rgb), .12);
}

/* ── List ── */
.fq-list-sec { padding: 36px 0; }
.fq-list-wrap { max-width: 760px; }
.fq-empty, .fq-empty-state {
    text-align: center;
    color: #7b8497;
    font-size: .92rem;
    padding: 20px 12px;
}
.fq-group + .fq-group { margin-top: 32px; }
.fq-cat-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0c1524;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1.5px solid #ede9df;
}
.fq-accordion { display: flex; flex-direction: column; gap: 8px; }
.fq-item {
    border: 1.5px solid #ece9e0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.fq-item:hover { border-color: rgba(var(--p-rgb), .22); }
.fq-item.is-open { border-color: rgba(var(--p-rgb), .3); box-shadow: 0 6px 20px rgba(12,21,36,.06); }
.fq-q {
    width: 100%;
    min-height: 48px; /* comfortable tap target */
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.4;
    color: #16202f;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.fq-q span { padding-top: 2px; overflow-wrap: break-word; word-break: break-word; }
.fq-q-ico { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: #8891a3; transition: transform .3s ease, color .2s; }
.fq-item.is-open .fq-q-ico { transform: rotate(180deg); color: var(--p); }
.fq-a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .3s ease;
}
.fq-item.is-open .fq-a { grid-template-rows: 1fr; }
.fq-a-in { overflow: hidden; }
.fq-a-in > div { padding: 0 16px 16px; color: #545e70; font-size: .88rem; line-height: 1.7; overflow-wrap: break-word; word-break: break-word; }
.fq-a-in p { margin: 0 0 .8em; }
.fq-a-in p:last-child { margin-bottom: 0; }
.fq-a-in a { color: var(--p); text-decoration: underline; text-underline-offset: 2px; }

/* ── CTA banner ── */
.fq-cta {
    background: linear-gradient(135deg, #0f2d5c, #0a1e40);
    padding: 40px 0;
    text-align: center;
}
.fq-cta-in { max-width: 620px; margin: 0 auto; }
.fq-cta-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.4rem, 6vw, 2.2rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    overflow-wrap: break-word;
}
.fq-cta-text { color: rgba(255,255,255,.72); font-size: .92rem; line-height: 1.6; margin-bottom: 22px; padding: 0 8px; }
.fq-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 320px;
    background: var(--g);
    color: #16202f;
    font-weight: 700;
    font-size: .9rem;
    padding: 14px 22px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(var(--g-rgb), .3);
    transition: transform .2s, box-shadow .2s;
}
.fq-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(var(--g-rgb), .4); }
.fq-cta-btn:active { transform: translateY(0) scale(.98); }

/* ── Small phones and up (480px+) ── */
@media (min-width: 480px) {
    .fq-cta-btn { width: auto; }
}

/* ── Larger phones / small tablets (640px+) ── */
@media (min-width: 640px) {
    .fq-hero { padding: 56px 0 40px; }
    .fq-eyebrow { font-size: .74rem; padding: 6px 16px; margin-bottom: 18px; }
    .fq-title { margin-bottom: 14px; }
    .fq-subtitle { font-size: 1rem; margin-bottom: 26px; padding: 0; }
    .fq-search input { padding: 13px 16px 13px 44px; }
    .fq-search-ico { left: 16px; width: 18px; height: 18px; }

    .fq-list-sec { padding: 52px 0; }
    .fq-group + .fq-group { margin-top: 36px; }
    .fq-cat-title { font-size: 1.4rem; margin-bottom: 16px; }
    .fq-accordion { gap: 10px; }
    .fq-item { border-radius: 14px; }
    .fq-q { align-items: center; padding: 17px 20px; font-size: .96rem; }
    .fq-q span { padding-top: 0; }
    .fq-q-ico { width: 20px; height: 20px; margin-top: 0; }
    .fq-a-in > div { padding: 0 20px 20px; font-size: .92rem; }

    .fq-cta { padding: 56px 0; }
    .fq-cta-text { padding: 0; }
}

/* ── Tablets (768px+) ── */
@media (min-width: 768px) {
    .fq-hero { padding: 72px 0 48px; }
    .fq-list-sec { padding: 64px 0; }
    .fq-cat-title { font-size: 1.5rem; }
    .fq-q { padding: 18px 22px; font-size: .98rem; }
    .fq-a-in > div { padding: 0 22px 22px; font-size: .93rem; }
    .fq-cta { padding: 68px 0; }
}

/* ── Desktop (1024px+) ── */
@media (min-width: 1024px) {
    .fq-hero { padding: 96px 0 64px; }
    .fq-list-sec { padding: 76px 0; }
    .fq-cta { padding: 76px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .fq-item, .fq-q-ico, .fq-a, .fq-cta-btn { transition: none; }
}
