/* =============================================
   FAQ PAGES (archive-faq.php, single-faq.php)
   Built on the warranty page styles (warranty.css is loaded too):
   hero, shapeys, cards, buttons and the CTA come from there.
   This file only adds what's unique to the FAQ.
   ============================================= */

/* =============================================
   HERO: search field + "?" badge
   ============================================= */
.faq-search {
    position: relative;
    max-width: 560px;
    margin-top: 6px;
}
.faq-search__icon {
    position: absolute;
    top: 50%;
    left: 22px;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    color: #00C6FF;
    pointer-events: none;
    z-index: 1;
}
.faq-search .faq-search__input {
    width: 100%;
    height: 62px;
    padding: 0 130px 0 56px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(24, 28, 42, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}
.faq-search .faq-search__input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}
.faq-search .faq-search__input:focus {
    outline: none;
    border-color: rgba(0, 198, 255, 0.65);
    box-shadow: 0 0 0 4px rgba(0, 198, 255, 0.15), 0 0 40px rgba(0, 198, 255, 0.25);
}
.faq-search__count {
    position: absolute;
    top: 50%;
    right: 22px;
    transform: translateY(-50%);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

/* Big glowing question mark in place of the guarantee badge */
.faq-hero__badge {
    display: flex;
    align-items: center;
    justify-content: center;
}
.faq-hero__mark {
    position: relative;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(120px, 16vw, 190px);
    line-height: 1;
    background: linear-gradient(160deg, #00C6FF 0%, #8B5CF6 50%, #EC4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 12px 40px rgba(139, 92, 246, 0.55));
    animation: war-badge-float 5.5s ease-in-out infinite;
}

/* =============================================
   CATEGORY FILTER (sits on the warranty docs bar)
   ============================================= */
.faq-filter__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    border-radius: 24px;
    padding: 20px 24px;
}
.faq-filter__pills {
    gap: 8px;
}
.faq-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 11.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.faq-pill span {
    min-width: 22px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 10px;
    letter-spacing: 0.04em;
    text-align: center;
}
.faq-pill:hover {
    border-color: rgba(0, 198, 255, 0.5);
    color: #fff;
    transform: translateY(-2px);
}
.faq-pill:focus {
    outline: none;
}
.faq-pill:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.35);
}
.faq-pill.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, #00C6FF 0%, #8B5CF6 100%);
    color: #fff;
    box-shadow: 0 10px 26px rgba(0, 198, 255, 0.3);
}
.faq-pill.is-active span {
    background: rgba(10, 10, 15, 0.25);
}

/* =============================================
   QUESTIONS (accordion cards)
   ============================================= */
.faq-list {
    padding-top: 70px;
}
.faq-list__inner {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    position: relative;
    background: linear-gradient(180deg, #181c2a 0%, #141627 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    overflow: hidden;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}
/* Gradient hairline, full width when open (same language as the warranty cards) */
.faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    right: 30px;
    height: 1.5px;
    background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.8) 25%, rgba(0, 198, 255, 0.8) 75%, transparent 100%);
    transform: scaleX(0.2);
    transform-origin: left center;
    opacity: 0.6;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}
.faq-item:hover {
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}
.faq-item:hover::before,
.faq-item[open]::before {
    transform: scaleX(1);
    opacity: 1;
}
.faq-item[open] {
    border-color: rgba(0, 198, 255, 0.3);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 0 40px rgba(0, 198, 255, 0.08);
}
.faq-item[hidden] {
    display: none;
}

.faq-item__q {
    display: grid;
    grid-template-columns: 54px 1fr 38px;
    gap: 18px;
    align-items: center;
    padding: 22px 26px;
    cursor: pointer;
    list-style: none;
}
.faq-item__q::-webkit-details-marker {
    display: none;
}
.faq-item__q:focus {
    outline: none;
}
.faq-item__q:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(0, 198, 255, 0.45);
    border-radius: 20px;
}
.faq-item__num {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 30px;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, #8B5CF6 0%, #00C6FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.faq-item__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 17px;
    line-height: 1.35;
    color: #fff;
}
.faq-item__toggle {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: transform 0.4s cubic-bezier(0.34, 1.3, 0.64, 1), border-color 0.3s ease, background 0.3s ease;
}
.faq-item__toggle::before,
.faq-item__toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 13px;
    height: 2px;
    margin: -1px 0 0 -6.5px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.35s ease;
}
.faq-item__toggle::after {
    transform: rotate(90deg);
}
.faq-item:hover .faq-item__toggle {
    border-color: rgba(0, 198, 255, 0.5);
}
.faq-item[open] .faq-item__toggle {
    transform: rotate(180deg);
    border-color: transparent;
    background: linear-gradient(135deg, #00C6FF 0%, #8B5CF6 100%);
}
.faq-item[open] .faq-item__toggle::after {
    transform: rotate(0deg);
}

.faq-item__a {
    padding: 0 26px 24px 98px;
}
.faq-item__answer {
    font-family: 'Inter', sans-serif;
    font-size: 15.5px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.78);
}
.faq-item__answer p {
    margin: 0 0 12px;
}
.faq-item__answer a {
    color: #00C6FF;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 198, 255, 0.35);
}
.faq-item__answer strong {
    color: #fff;
}
.faq-item__answer ul,
.faq-item__answer ol {
    padding-left: 20px;
    margin-bottom: 12px;
}
.faq-item__meta {
    gap: 8px 10px;
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.faq-tag {
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c4b5fd;
}
.faq-item__link {
    margin-left: auto;
    font-size: 11px;
}

/* Search match highlight (faq.js wraps matches in <mark>) */
.faq-item mark {
    padding: 0 2px;
    border-radius: 3px;
    background: rgba(255, 181, 0, 0.3);
    color: #fff;
}

/* Empty state: Donnie peeks over the card */
.faq-empty {
    position: relative;
    margin-top: 70px;
    padding: 54px 30px 40px;
    background: linear-gradient(180deg, #1a1f33 0%, #14172a 100%);
    border: 1px solid rgba(0, 198, 255, 0.18);
    border-radius: 24px;
}
.faq-empty[hidden] {
    display: none;
}
.faq-empty__donnie {
    position: absolute;
    top: -68px;
    left: 50%;
    width: 120px;
    height: 80px;
    transform: translateX(-50%);
    overflow: hidden;
}
.faq-empty__head {
    position: absolute;
    left: 50%;
    bottom: -40px;
    width: 104px;
    transform: translateX(-50%);
    animation: faq-peek 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.faq-empty__paw {
    position: absolute;
    bottom: -6px;
    width: 30px;
    animation: faq-peek-paw 0.7s 0.1s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.faq-empty__paw--left  { left: 8px; }
.faq-empty__paw--right { right: 8px; }
@keyframes faq-peek {
    from { transform: translate(-50%, 70px); }
    to   { transform: translate(-50%, 0); }
}
@keyframes faq-peek-paw {
    from { transform: translateY(40px); }
    to   { transform: translateY(0); }
}
.faq-empty__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 26px;
    color: #fff;
    margin: 0 0 8px;
}
.faq-empty__text {
    font-family: 'Inter', sans-serif;
    font-size: 15.5px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 auto 22px;
    max-width: 420px;
}

/* =============================================
   QUICK LINKS
   ============================================= */
.faq-links {
    position: relative;
    padding: 0 24px 90px;
}
.faq-links__grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.faq-link-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 28px 26px 24px;
    border-radius: 22px;
    background: linear-gradient(180deg, #181c2a 0%, #141627 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none !important;
    transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
.faq-link-card:hover {
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}
.faq-link-card strong {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 19px;
    color: #fff;
}
.faq-link-card > span:not(.war-link):not(.war-terms__icon) {
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 12px;
}
.faq-link-card .war-link {
    margin-top: auto;
}
.faq-link-card:hover .war-link svg {
    transform: translateX(4px);
}

/* =============================================
   SINGLE FAQ
   ============================================= */
.faq-hero--single {
    padding-bottom: 50px;
}
.faq-single__inner {
    grid-template-columns: 1fr !important;
    max-width: 980px;
}
.faq-back {
    margin-bottom: 22px;
}
.faq-single__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(32px, 4.8vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: #fff;
    margin: 0 0 22px;
}
.faq-single {
    padding-top: 10px;
}
.faq-single__grid {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}
.faq-single__answer .faq-item__answer {
    font-size: 17px;
}
.faq-related {
    padding: 28px 26px 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.faq-related__list {
    list-style: none;
    padding: 0;
    margin: 12px 0 18px;
}
.faq-related__list li {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.faq-related__list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82) !important;
    text-decoration: none !important;
    transition: color 0.25s ease;
}
.faq-related__list svg {
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    color: #00C6FF;
    transition: transform 0.3s ease;
}
.faq-related__list a:hover {
    color: #fff !important;
}
.faq-related__list a:hover svg {
    transform: translateX(4px);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (min-width: 992px) {
    .faq-single__grid {
        grid-template-columns: 1.6fr 1fr;
    }
}

@media (max-width: 899px) {
    .faq-search {
        margin-left: auto;
        margin-right: auto;
    }
    .faq-hero__badge {
        width: 160px;
    }
    .faq-hero__mark {
        font-size: 110px;
    }
    .faq-hero--single .war-hero__copy {
        text-align: left;
    }
    .faq-hero--single .war-hero__pills {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .faq-search .faq-search__input { height: 56px; padding-right: 20px; font-size: 15px; }
    .faq-search__count             { display: none; }
    .faq-filter__bar               { border-radius: 20px; }
    .faq-list                      { padding-top: 50px; }
    .faq-item__q                   { grid-template-columns: 1fr 34px; gap: 14px; padding: 18px; }
    .faq-item__num                 { display: none; }
    .faq-item__title               { font-size: 15.5px; }
    .faq-item__toggle              { width: 34px; height: 34px; }
    .faq-item__a                   { padding: 0 18px 20px; }
    .faq-item__link                { margin-left: 0; }
    .faq-links                     { padding: 0 16px 60px; }
    .faq-links__grid               { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .faq-hero__mark,
    .faq-empty__head,
    .faq-empty__paw { animation: none !important; }
}
