/*
 * ITIL certification hub, Fold 6: FAQ (light paper). Loads after the shared style/itil-v1/fold-faq.css and cert-hub/page.css.
 * Spec: direction.md "FOLD 6" and fold-faq.json (layout_desktop, layout_mobile, motion). Only overrides live here:
 * the shared FAQ file is unchanged, so the home FAQ output stays identical.
 *
 * One-screen budget at 1366x768 (header 122px, 646px visible, fold padding 45px + 45px):
 *   list = 8 x 46px rows + 7 x 5px gaps + 150px answer room = 553px (content block <= 556px, 93px free).
 *   The side column (eyebrow 24 + H2 3 x 52 + lead 4 x 27 + ask row 58, with gaps) is about 390px, so the list sets the height.
 *   A row cannot be 46px with the shared 8px summary padding and 34px chevron (53px), hence the two 1200px+ rules below.
 * Below 1200px the shared one-column order applies (head, list, ask row) and the fold flows.
 * Nothing below 16px. The only pink element is the ask button.
 */

/* ---------- Density (the list min-height calc in the shared file reads these) ---------- */
main.itil-v1[data-page="certification"] .v1-faq__grid--cert { --faq-row: 46px; --faq-gap: 5px; --faq-ans: 150px; }

@media (min-width: 1200px) {
    main.itil-v1[data-page="certification"] #faq .v1-faq__q { padding-block: 5px; }
    main.itil-v1[data-page="certification"] #faq .v1-faq__chev { width: 32px; height: 32px; }
    main.itil-v1[data-page="certification"] #faq .v1-faq__q-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__side { gap: 18px; }
}

/* Question and answer type: 17px, questions weight 600 (spec), answers 17px / 1.55 (1.6 on phones, shared rule). */
main.itil-v1[data-page="certification"] #faq .v1-faq__q { font-size: 17px; font-weight: 600; line-height: 1.35; }
main.itil-v1[data-page="certification"] #faq .v1-faq__a { font-size: 17px; }

/* ---------- Ask row: the pink button and the quiet phone link, on the drifting orb ---------- */
main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__ask-wrap { isolation: isolate; }
main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__ask-row { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__btn { min-height: 52px; padding-inline: 24px; gap: 10px; }
main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__btn .v1-i { width: 20px; height: 20px; flex: none; transition: transform var(--t-fast) var(--ease-out); }
main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__phone { font-size: 16px; font-weight: 600; }
main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__phone .v1-i { transition: transform var(--t-fast) var(--ease-out); }
@media (hover: hover) {
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__btn:hover .v1-i { transform: translateX(3px); }
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__phone:hover .v1-i { transform: rotate(-12deg); }
}

/* ---------- A soft aurora wash behind the list (decorative; no effect on height) ---------- */
main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__grid { position: relative; isolation: isolate; }
main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__list { position: relative; }
main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__list::before {
    content: ""; position: absolute; z-index: -1; inset: -36px -48px -36px 18%; pointer-events: none;
    background:
        radial-gradient(48% 42% at 82% 12%, rgba(56, 214, 245, .16), transparent 70%),
        radial-gradient(52% 46% at 30% 88%, rgba(240, 72, 155, .12), transparent 72%),
        radial-gradient(60% 55% at 60% 50%, rgba(124, 92, 255, .12), transparent 74%);
    filter: blur(6px);
}

/* ---------- Motion: the cards rise 12px, 40ms apart (data-stagger); hidden only under html.v1-motion ---------- */
main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__list[data-stagger] { --stagger: 40ms; }
html.v1-motion main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__list[data-stagger].is-in:not(.is-done) > * { animation-name: cert-faq-rise; }
@keyframes cert-faq-rise { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }

/* ---------- Tablet and phone (below 1200px the shared one-column order applies) ---------- */
@media (max-width: 1199.98px) {
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__ask-row { margin-top: 0; }
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__list::before { inset: -24px -16px; }
}
@media (max-width: 767.98px) {
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__h2 { font-size: clamp(30px, 8vw, 32px); }
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__lead { max-width: none; }
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__list::before { display: none; }
}
@media (max-width: 599.98px) {
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__ask-row { flex-direction: column; align-items: stretch; gap: 4px; }
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__btn { width: 100%; justify-content: center; }
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__phone { justify-content: center; min-height: 48px; }
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__orb { left: -40px; bottom: -40px; width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__list > * { animation: none !important; }
    main.itil-v1[data-page="certification"] .v1-faq--cert :is(.v1-faq__btn, .v1-faq__phone) .v1-i { transition: none; }
}
@media print {
    main.itil-v1[data-page="certification"] .v1-faq--cert .v1-faq__list::before { display: none; }
}
