/* ========================================
   CavClinics - How It Works and FAQ
   (includes/help-content.php). Public pages and the patient side, on the
   guest theme: navy, white, gold used sparingly.
   ======================================== */

body.help-page {
    --hp-navy: var(--gt-navy, #2D457A);
    --hp-navy-dark: var(--gt-navy-dark, #22365F);
    --hp-ink: var(--gt-ink, #091226);
    --hp-gold: var(--gt-gold, #DBBA6D);
    --hp-gold-deep: var(--gt-gold-deep, #9C7A2C);
    --hp-sky: var(--gt-sky, #C3E0FF);
    --hp-mist: var(--gt-mist, #F4F7FB);
    --hp-tint: var(--gt-tint, #EBF0F8);
    --hp-line: var(--gt-line, #E1E7F0);
    --hp-card-line: #a9b8cf;
    --hp-muted: var(--gt-muted, #586277);
    --hp-shadow: 0 1px 2px rgba(9, 18, 38, 0.06), 0 12px 28px -14px rgba(9, 18, 38, 0.28);
    --hp-ease: var(--gt-ease, cubic-bezier(0.22, 1, 0.36, 1));
    background: var(--hp-mist);
}

/* ---- Hero --------------------------------------------------------------- */
.help-hero {
    position: relative;
    overflow: hidden;
    padding: 150px 0 76px;
    background: linear-gradient(135deg, var(--hp-navy) 0%, #1b2d55 100%);
    color: #fff;
    text-align: center;
}
.help-hero::before,
.help-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.help-hero::before {
    width: 520px;
    height: 520px;
    top: -260px;
    right: -140px;
    background: radial-gradient(circle, rgba(195, 224, 255, 0.18), transparent 70%);
}
.help-hero::after {
    width: 380px;
    height: 380px;
    bottom: -220px;
    left: -120px;
    background: radial-gradient(circle, rgba(219, 186, 109, 0.16), transparent 70%);
}
.help-hero .container { position: relative; z-index: 1; }
.help-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(219, 186, 109, 0.55);
    border-radius: 999px;
    background: rgba(219, 186, 109, 0.12);
    color: #f4dfa4;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
body.help-page .help-hero h1 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(2rem, 4.6vw, 3.1rem);
    line-height: 1.15;
}
/* The wordmark on navy: "Cav" in white, "Clinics" stays gold. */
body.guest-theme.help-page .help-hero .gt-script .gt-cav { color: #fff; }
body.guest-theme.help-page .help-hero .gt-script .gt-clinics { color: var(--hp-gold); }
body.help-page .help-hero p {
    max-width: 640px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
    line-height: 1.7;
}

/* Who the guide is for */
.help-switch {
    display: inline-flex;
    gap: 6px;
    margin-top: 30px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
}
.help-switch button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s var(--hp-ease), color 0.25s var(--hp-ease), box-shadow 0.25s var(--hp-ease);
}
.help-switch button:hover { background: rgba(255, 255, 255, 0.12); }
.help-switch button.is-active {
    background: #fff;
    color: var(--hp-navy);
    box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5);
}

/* ---- Body ----------------------------------------------------------------- */
.help-body { padding: 64px 0 92px; }
.help-panel[hidden] { display: none; }
.help-panel.is-active { animation: help-fade-in 0.45s var(--hp-ease); }
@keyframes help-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
.help-panel-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
body.help-page .help-panel-head h2 { margin: 0 0 6px; color: var(--hp-ink); font-size: clamp(1.6rem, 3vw, 2.1rem); }
body.help-page .help-panel-head p { margin: 0; color: var(--hp-muted); font-size: 1.02rem; }

/* Steps: a numbered line down the left, a card for each step */
.help-steps { max-width: 900px; margin: 0 auto; padding: 0; list-style: none; }
.help-step {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 22px;
    padding-bottom: 22px;
}
.help-step:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 60px;
    bottom: 0;
    left: 27px;
    width: 2px;
    background: linear-gradient(var(--hp-card-line), var(--hp-line));
}
.help-step-marker { display: flex; justify-content: center; }
.help-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--hp-navy);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 0 0 5px #fff, 0 0 0 7px rgba(219, 186, 109, 0.75), 0 12px 24px -12px rgba(9, 18, 38, 0.5);
}
.help-step-card {
    padding: 24px 28px;
    border: 2px solid var(--hp-card-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--hp-shadow);
    transition: transform 0.35s var(--hp-ease), box-shadow 0.35s var(--hp-ease), border-color 0.35s var(--hp-ease);
}
.help-step-card:hover {
    transform: translateY(-2px);
    border-color: var(--hp-gold);
    box-shadow: 0 0 0 1px rgba(219, 186, 109, 0.4), 0 22px 44px -22px rgba(156, 122, 44, 0.45);
}
.help-step-top { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.help-step-icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--hp-tint);
    color: var(--hp-navy);
    font-size: 19px;
}
.help-step-kicker {
    display: block;
    color: var(--hp-gold-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
body.help-page .help-step-card h3 { margin: 2px 0 0; color: var(--hp-ink); font-size: 1.22rem; }
body.help-page .help-step-card > p { margin: 0; color: #334155; font-size: 1rem; line-height: 1.75; }

.help-flow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.help-flow-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 7px;
    border: 1px solid var(--hp-line);
    border-radius: 999px;
    background: var(--hp-mist);
    color: var(--hp-ink);
    font-size: 14px;
    font-weight: 600;
}
.help-flow-step b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--hp-navy);
    color: #fff;
    font-size: 12px;
}

.help-docs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    margin: 16px 0 0;
    padding: 16px 18px;
    border: 1px dashed var(--hp-card-line);
    border-radius: 14px;
    background: #fbfcfe;
    list-style: none;
}
.help-docs li { display: flex; align-items: flex-start; gap: 9px; color: #334155; font-size: 14.5px; line-height: 1.5; }
.help-docs i { margin-top: 3px; color: var(--hp-navy); }

.help-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.help-plan {
    display: flex;
    flex-direction: column;
    padding: 18px;
    border: 1.5px solid var(--hp-line);
    border-radius: 16px;
    background: #fbfcfe;
}
.help-plan.is-featured { border-color: var(--hp-navy); background: #fff; box-shadow: 0 14px 30px -18px rgba(45, 69, 122, 0.55); }
.help-plan-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--hp-line); }
.help-plan-head strong { color: var(--hp-ink); font-size: 1.05rem; }
.help-plan-head span { color: var(--hp-muted); font-size: 13px; }
.help-plan-head b { color: var(--hp-navy); font-size: 1.45rem; }
.help-plan ul { margin: 0; padding: 0; list-style: none; }
.help-plan li { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 7px; color: #334155; font-size: 13.5px; line-height: 1.45; }
.help-plan li i { margin-top: 3px; color: #16a34a; font-size: 11px; }

.help-notes { margin: 16px 0 0; padding: 0; list-style: none; }
.help-notes li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
    padding: 11px 14px;
    border-radius: 12px;
    background: #f1f5ff;
    color: #334155;
    font-size: 14.5px;
    line-height: 1.55;
}
.help-notes i { margin-top: 3px; color: var(--hp-navy); }

body.help-page .help-step-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    color: var(--hp-navy);
    font-weight: 700;
    text-decoration: none;
}
body.help-page .help-step-link i { transition: transform 0.25s var(--hp-ease); }
body.help-page .help-step-link:hover i { transform: translateX(4px); }

/* Closing call to action */
.help-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 900px;
    margin: 36px auto 0;
    padding: 28px 32px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--hp-navy) 0%, #1b2d55 100%);
    box-shadow: 0 24px 48px -26px rgba(9, 18, 38, 0.6);
}
body.help-page .help-cta h2 { margin: 0 0 4px; color: #fff; font-size: 1.4rem; }
body.help-page .help-cta p { margin: 0; color: rgba(255, 255, 255, 0.82); }
.help-cta-actions, .help-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
body.help-page .help-cta .btn-primary { background: #fff; border-color: #fff; color: var(--hp-navy); }
body.help-page .help-btn-ghost {
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    background: transparent;
    color: #fff;
}
body.help-page .help-btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
body.help-page :is(.help-cta, .help-contact) .btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* ---- FAQ ------------------------------------------------------------------ */
.help-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 620px;
    margin: 30px auto 0;
}
.help-search > i { position: absolute; left: 22px; color: var(--hp-muted); font-size: 17px; pointer-events: none; }
body.help-page .help-search input {
    width: 100%;
    height: 58px;
    padding: 0 54px 0 54px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: #fff;
    color: var(--hp-ink);
    font-size: 16px;
    box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.55);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
body.help-page .help-search input:focus { border-color: var(--hp-gold); box-shadow: 0 0 0 4px rgba(219, 186, 109, 0.3), 0 18px 40px -20px rgba(0, 0, 0, 0.55); }
body.help-page .help-search input::-webkit-search-cancel-button { display: none; }
.help-search-clear {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--hp-tint);
    color: var(--hp-navy);
    cursor: pointer;
}
.help-search-clear[hidden] { display: none; }

.help-faq-layout { max-width: 920px; }
.help-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 14px; }
.help-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1.5px solid var(--hp-card-line);
    border-radius: 999px;
    background: #fff;
    color: var(--hp-ink);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.help-chip i { color: var(--hp-navy); }
.help-chip span {
    min-width: 24px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--hp-tint);
    color: var(--hp-navy);
    font-size: 12px;
    text-align: center;
}
.help-chip:hover { border-color: var(--hp-navy); }
.help-chip.is-active { border-color: var(--hp-navy); background: var(--hp-navy); color: #fff; }
.help-chip.is-active i { color: #fff; }
.help-chip.is-active span { background: rgba(255, 255, 255, 0.2); color: #fff; }
body.help-page .help-faq-count { min-height: 22px; margin: 0 0 18px; color: var(--hp-muted); font-size: 14px; text-align: center; }

.help-faq-group { margin-bottom: 34px; scroll-margin-top: 110px; }
.help-faq-group[hidden] { display: none; }
body.help-page .help-faq-group h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; color: var(--hp-ink); font-size: 1.3rem; }
.help-faq-group-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--hp-navy);
    color: #fff;
    font-size: 16px;
}
.help-faq-list { display: grid; gap: 10px; }
.help-faq-item {
    border: 2px solid var(--hp-card-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(9, 18, 38, 0.05);
    scroll-margin-top: 110px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.help-faq-item[hidden] { display: none; }
.help-faq-item:hover { border-color: var(--hp-navy); }
.help-faq-item[open] { border-color: var(--hp-navy); box-shadow: var(--hp-shadow); }
.help-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    color: var(--hp-ink);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.45;
    list-style: none;
    cursor: pointer;
}
.help-faq-item summary::-webkit-details-marker { display: none; }
.help-faq-item summary i {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--hp-tint);
    color: var(--hp-navy);
    font-size: 13px;
    transition: transform 0.3s var(--hp-ease), background 0.3s ease, color 0.3s ease;
}
.help-faq-item[open] summary i { transform: rotate(45deg); background: var(--hp-navy); color: #fff; }
.help-faq-answer { padding: 0 22px 20px; }
body.help-page .help-faq-answer p {
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid var(--hp-line);
    color: #334155;
    font-size: 15.5px;
    line-height: 1.8;
}
.help-faq-item mark { padding: 0 2px; border-radius: 4px; background: #fdecc0; color: inherit; }

.help-faq-empty {
    margin: 10px 0 34px;
    padding: 40px 24px;
    border: 2px dashed var(--hp-card-line);
    border-radius: 18px;
    background: #fff;
    text-align: center;
}
.help-faq-empty[hidden] { display: none; }
.help-faq-empty > i { color: var(--hp-card-line); font-size: 30px; }
body.help-page .help-faq-empty h3 { margin: 12px 0 6px; color: var(--hp-ink); }
body.help-page .help-faq-empty p { margin: 0; color: var(--hp-muted); }

.help-contact {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
    padding: 26px 30px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--hp-navy) 0%, #1b2d55 100%);
    box-shadow: 0 24px 48px -26px rgba(9, 18, 38, 0.6);
}
.help-contact-icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(219, 186, 109, 0.18);
    color: #f4dfa4;
    font-size: 22px;
}
.help-contact-body { flex: 1; min-width: 0; }
body.help-page .help-contact h2 { margin: 0 0 4px; color: #fff; font-size: 1.3rem; }
body.help-page .help-contact p { margin: 0; color: rgba(255, 255, 255, 0.82); line-height: 1.6; }
body.help-page .help-contact .btn-primary { background: #fff; border-color: #fff; color: var(--hp-navy); }

@media (prefers-reduced-motion: reduce) {
    .help-panel.is-active { animation: none; }
    .help-step-card, .help-step-card:hover { transform: none; transition: none; }
}

/* ---- Tablets and phones -------------------------------------------------- */
@media (max-width: 900px) {
    .help-plans { grid-template-columns: 1fr; }
    .help-cta, .help-contact { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
    .help-hero { padding: 120px 0 56px; }
    body.help-page .help-hero p { font-size: 1rem; padding: 0 6px; }
    .help-switch { display: flex; width: 100%; max-width: 380px; margin-left: auto; margin-right: auto; }
    .help-switch button { flex: 1; justify-content: center; padding: 11px 10px; font-size: 14px; }
    .help-body { padding: 44px 0 70px; }
    .help-step { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
    .help-step:not(:last-child)::before { top: 46px; left: 19px; }
    .help-step-number { width: 40px; height: 40px; font-size: 16px; box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgba(219, 186, 109, 0.75); }
    .help-step-card { padding: 18px; border-radius: 16px; }
    .help-step-top { gap: 12px; }
    .help-step-icon { width: 40px; height: 40px; font-size: 16px; }
    .help-docs { grid-template-columns: 1fr; }
    .help-cta, .help-contact { padding: 22px; }
    .help-cta-actions, .help-contact-actions { width: 100%; }
    body.help-page :is(.help-cta, .help-contact) .btn { flex: 1 1 100%; justify-content: center; }
    .help-chips { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
    .help-chips::-webkit-scrollbar { display: none; }
    .help-chip { flex: none; }
    .help-faq-item summary { padding: 16px; font-size: 0.98rem; }
    .help-faq-answer { padding: 0 16px 16px; }
    body.help-page .help-search input { height: 52px; font-size: 15px; }
}
