/* ============================================================
   ToyDirect — FAQ Page (reference UI)
   ============================================================ */

/* ============================================================
   HERO SECTION
   ============================================================ */
.faq-hero {
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, #fff8f8 0%, #fff0f0 45%, #fff5f5 100%);
    /*background: #ffffff;*/
    padding: 136px 28px 48px;
    overflow: hidden;
}

.faq-hero::before,
.faq-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
    opacity: .45;
}
.faq-hero::before {
    width: 380px; height: 380px;
    background: #ffd4d4;
    top: -80px; right: 12%;
}
.faq-hero::after {
    width: 260px; height: 260px;
    background: #ffe8d4;
    bottom: 30px; right: 32%;
}

.faq-hero-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 28px;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ---- Hero text ---- */
.faq-hero-text {
    padding: 20px 0 40px;
}

.faq-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px 7px 13px;
    background: rgba(232, 73, 84, 0.08);
    color: #e84954;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 100px;
    margin-bottom: 18px;
}
.faq-hero-label svg {
    width: 14px; height: 14px;
}

.faq-hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(38px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: #1a202c;
    margin: 0 0 18px;
}
.faq-hero-title-red {
    color: #e84954;
    position: relative;
    display: inline-block;
}
.faq-hero-title-red::after {
    content: '';
    position: absolute;
    left: 0; bottom: 4px;
    width: 100%; height: 4px;
    background: #e84954;
    border-radius: 4px;
    opacity: .85;
}

.faq-hero-desc {
    font-size: 16px;
    line-height: 1.7;
    color: #64748b;
    max-width: 440px;
    margin: 0 0 30px;
}

/* ---- Search box ---- */
.faq-search {
    position: relative;
    max-width: 420px;
}
.faq-search-icon {
    position: absolute;
    left: 18px; top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}
.faq-search input {
    width: 100%;
    padding: 15px 18px 15px 48px;
    border-radius: 100px;
    border: 1px solid #f1d5d5;
    background: #fff;
    box-shadow: 0 8px 26px rgba(232, 73, 84, 0.08);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    color: #1a202c;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.faq-search input::placeholder { color: #94a3b8; }
.faq-search input:focus {
    border-color: #e84954;
    box-shadow: 0 8px 28px rgba(232, 73, 84, 0.14);
}

/* ---- Hero visual ---- */
.faq-hero-visual {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    min-height: 380px;
}
.faq-hero-visual img {
    width: 100%;
    max-width: 520px;
    height: auto;
    object-fit: contain;
    display: block;
}


/* ============================================================
   FAQ BODY
   ============================================================ */
.faq-body {
    position: relative;
    z-index: 2;
    background: #fff;
    padding: 56px 28px 80px;
}

.faq-body-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 44px;
    align-items: start;
}

/* ---- Left sidebar ---- */
.faq-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.faq-sidebar-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 10px;
}

/* Categories */
.faq-categories {
    background: #fff;
    border: 1px solid #f1e7e7;
    border-radius: 18px;
    padding: 18px 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
}

.faq-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
    border: 1px solid transparent;
    margin-bottom: 6px;
}
.faq-cat:last-child { margin-bottom: 0; }
.faq-cat:hover {
    background: #fff5f5;
    color: #1a202c;
}
.faq-cat.active {
    background: #fff;
    border-color: #e84954;
    color: #e84954;
    box-shadow: 0 4px 14px rgba(232, 73, 84, 0.08);
}

.faq-cat-ico {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: #f8f9fb;
    color: #64748b;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background .2s ease, color .2s ease;
}
.faq-cat-ico svg { width: 18px; height: 18px; }

/* Category color accents */
.faq-cat.cat-red   .faq-cat-ico { background: #fff0f1; color: #e84954; }
.faq-cat.cat-orange .faq-cat-ico { background: #fff7ed; color: #f59e0b; }
.faq-cat.cat-blue  .faq-cat-ico { background: #eff6ff; color: #3b82f6; }
.faq-cat.cat-green .faq-cat-ico { background: #f0fdf4; color: #22c55e; }

.faq-cat.active.cat-red   { border-color: #e84954; color: #e84954; box-shadow: 0 4px 14px rgba(232, 73, 84, 0.1); }
.faq-cat.active.cat-orange { border-color: #f59e0b; color: #f59e0b; box-shadow: 0 4px 14px rgba(245, 158, 11, 0.1); }
.faq-cat.active.cat-blue  { border-color: #3b82f6; color: #3b82f6; box-shadow: 0 4px 14px rgba(59, 130, 246, 0.1); }
.faq-cat.active.cat-green { border-color: #22c55e; color: #22c55e; box-shadow: 0 4px 14px rgba(34, 197, 94, 0.1); }

.faq-cat-name { flex: 1; }

.faq-cat-count {
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    flex-shrink: 0;
    transition: color .2s ease;
}
.faq-cat.cat-red   .faq-cat-count { color: #e84954; }
.faq-cat.cat-orange .faq-cat-count { color: #f59e0b; }
.faq-cat.cat-blue  .faq-cat-count { color: #3b82f6; }
.faq-cat.cat-green .faq-cat-count { color: #22c55e; }

.faq-cat.active.cat-red   .faq-cat-count { color: #e84954; }
.faq-cat.active.cat-orange .faq-cat-count { color: #f59e0b; }
.faq-cat.active.cat-blue  .faq-cat-count { color: #3b82f6; }
.faq-cat.active.cat-green .faq-cat-count { color: #22c55e; }

/* Help card */
.faq-help-card {
    position: relative;
    background: #fff;
    border: 1px solid #f1e7e7;
    border-radius: 18px;
    padding: 24px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
}
.faq-help-card h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px;
}
.faq-help-card p {
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
    margin: 0 0 16px;
}
.faq-help-card .btn-primary {
    padding: 10px 20px;
    font-size: 13px;
}
.faq-help-card .btn-primary svg { width: 14px; height: 14px; }

.faq-help-map {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 100px;
    background:
        radial-gradient(circle, #e84954 1.2px, transparent 1.3px),
        radial-gradient(circle, #e84954 1.2px, transparent 1.3px),
        radial-gradient(circle, #e84954 1.2px, transparent 1.3px),
        radial-gradient(circle, #e84954 1.2px, transparent 1.3px);
    background-size: 30px 24px, 26px 22px, 34px 28px, 22px 18px;
    background-position: 0 0, 10px 8px, 18px 4px, 6px 14px;
    opacity: .12;
    pointer-events: none;
    mask-image: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}


/* ---- Right: FAQ cards ---- */
.faq-content { min-width: 0; }

.faq-card {
    background: #fff;
    border: 1px solid #f3eef0;
    border-radius: 24px;
    margin-bottom: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: box-shadow .25s ease, border-color .25s ease;
}
.faq-card:hover { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05); }

.faq-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    cursor: pointer;
    user-select: none;
    transition: background .2s ease;
}
.faq-card-header:hover { background: #fffbfb; }

.faq-card-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.faq-card-ico {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: #fff0f1;
    color: #e84954;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.faq-card-ico svg { width: 22px; height: 22px; }

.faq-card.cat-orange .faq-card-ico { background: #fff7ed; color: #f59e0b; }
.faq-card.cat-blue  .faq-card-ico { background: #eff6ff; color: #3b82f6; }
.faq-card.cat-green .faq-card-ico { background: #f0fdf4; color: #22c55e; }

.faq-card-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.faq-card-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.faq-card-count {
    font-size: 13px;
    font-weight: 700;
    color: #e84954;
    padding: 4px 0;
    border-radius: 100px;
}

.faq-card.cat-orange .faq-card-count { color: #f59e0b; }
.faq-card.cat-blue  .faq-card-count { color: #3b82f6; }
.faq-card.cat-green .faq-card-count { color: #22c55e; }

.faq-card-arrow {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    color: #94a3b8;
    display: flex; align-items: center; justify-content: center;
    transition: transform .3s ease, border-color .2s ease, color .2s ease, background .2s ease;
}
.faq-card-arrow svg { width: 16px; height: 16px; }

.faq-card.open .faq-card-arrow { transform: rotate(180deg); }
.faq-card.cat-red.open   .faq-card-arrow { border-color: #e84954; color: #e84954; background: #fff0f1; }
.faq-card.cat-orange.open .faq-card-arrow { border-color: #f59e0b; color: #f59e0b; background: #fff7ed; }
.faq-card.cat-blue.open  .faq-card-arrow { border-color: #3b82f6; color: #3b82f6; background: #eff6ff; }
.faq-card.cat-green.open .faq-card-arrow { border-color: #22c55e; color: #22c55e; background: #f0fdf4; }

.faq-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
}
.faq-card.open .faq-card-body {
    max-height: 2000px; /* enough for all questions */
}

/* Accordion item inside card */
.faq-item {
    border-top: 1px solid #f3f0f0;
}

.faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #e84954;
    line-height: 1.5;
    transition: color .2s ease, background .2s ease;
}
.faq-q:hover { background: #fffbfb; }

.faq-q-text { flex: 1; }

.faq-ico {
    position: relative;
    width: 22px; height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.6px solid #e84954;
    transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.faq-ico::before,
.faq-ico::after {
    content: '';
    position: absolute;
    background: #e84954;
    border-radius: 2px;
    transition: background .25s ease, transform .25s ease, opacity .25s ease;
}
.faq-ico::before { top: 50%; left: 50%; width: 10px; height: 2px; transform: translate(-50%,-50%); }
.faq-ico::after  { top: 50%; left: 50%; width: 2px;  height: 10px; transform: translate(-50%,-50%); }

.faq-item.open .faq-ico {
    border-color: #e84954;
    background: #e84954;
    transform: rotate(180deg);
}
.faq-item.open .faq-ico::before { background: #fff; }
.faq-item.open .faq-ico::after { background: #fff; transform: translate(-50%,-50%) scaleY(0); opacity: 0; }

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
}
.faq-a-inner {
    padding: 0 24px 20px;
    font-size: 15px;
    line-height: 1.75;
    color: #64748b;
}
.faq-a-inner p { margin: 0 0 10px; }
.faq-a-inner p:last-child { margin-bottom: 0; }
.faq-a-inner strong { color: #1a202c; font-weight: 600; }
.faq-a-inner a { color: #e84954; font-weight: 600; text-decoration: none; }
.faq-a-inner a:hover { text-decoration: underline; }

/* View all button */
.faq-view-all {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #fff;
    border: none;
    border-top: 1px solid #f3f0f0;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    transition: color .2s ease, background .2s ease;
}
.faq-view-all:hover { background: #fffbfb; color: #e84954; }
.faq-view-all svg {
    transition: transform .3s ease;
    color: #94a3b8;
}
.faq-view-all[aria-expanded="true"] svg { transform: rotate(180deg); color: #e84954; }


/* ============================================================
   FEATURES STRIP
   ============================================================ */
.faq-features {
    position: relative;
    z-index: 2;
    background: #fff8f8;
    padding: 52px 28px 80px;
}

.faq-features-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.faq-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 0;
    background: transparent;
}

.faq-feature-ico {
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.faq-feature-ico svg { width: 23px; height: 23px; }
.ico-red    { background: #e84954; }
.ico-orange { background: #f59e0b; }
.ico-blue   { background: #3b82f6; }
.ico-green  { background: #22c55e; }

.faq-feature-text h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 5px;
}
.faq-feature-text p {
    font-size: 13.5px;
    line-height: 1.55;
    color: #64748b;
    margin: 0;
}


/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
    .faq-hero-inner { grid-template-columns: 1fr; text-align: center; gap: 10px; }
    .faq-hero-text { padding: 0 0 10px; }
    .faq-hero-desc { margin-left: auto; margin-right: auto; }
    .faq-search { margin-left: auto; margin-right: auto; }
    .faq-hero-visual { min-height: 280px; order: -1; }
    .faq-hero-visual img { max-width: 360px; }

    .faq-body-inner { grid-template-columns: 1fr; gap: 28px; }
    .faq-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .faq-help-map { display: none; }
}

@media (max-width: 640px) {
    .faq-hero { padding: 120px 20px 36px; }
    .faq-hero-title { font-size: 34px; }
    .faq-hero-visual img { max-width: 280px; }

    .faq-body { padding: 36px 20px 56px; }
    .faq-sidebar { grid-template-columns: 1fr; }
    .faq-categories { padding: 14px 12px; }
    .faq-cat { padding: 10px; font-size: 13.5px; }

    .faq-card-header { padding: 16px 18px; }
    .faq-card-header h2 { font-size: 16px; }
    .faq-card-count { font-size: 12px; }
    .faq-card-ico { width: 38px; height: 38px; }
    .faq-card-ico svg { width: 19px; height: 19px; }

    .faq-q { padding: 16px 18px; font-size: 14px; }
    .faq-a-inner { padding: 0 18px 18px; }

    .faq-features { padding: 36px 20px 56px; }
    .faq-features-inner { grid-template-columns: 1fr 1fr; gap: 20px; }
    .faq-feature-ico { width: 42px; height: 42px; }
    .faq-feature-ico svg { width: 20px; height: 20px; }
    .faq-feature-text h4 { font-size: 14px; }
    .faq-feature-text p { font-size: 12.5px; }
}

@media (max-width: 420px) {
    .faq-features-inner { grid-template-columns: 1fr; }
    .faq-card-header-right { display: none; }
}


/* ============================================================
   ANIMATION SYSTEM
   - Hero: auto CSS keyframes on load (no JS dependency)
   - Scroll reveals: IntersectionObserver toggles .in
   - Accordion answer: fade-up when opened
   ============================================================ */

/* ---- Hero keyframes ---- */
@keyframes faqRise {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: none; }
}
@keyframes faqZoom {
    from { opacity: 0; transform: scale(.9) translateY(24px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes faqFloat {
    from { transform: translateY(0); }
    to   { transform: translateY(-14px); }
}
@keyframes faqBlob1 {
    from { transform: translate(0, 0); }
    to   { transform: translate(-34px, 22px); }
}
@keyframes faqBlob2 {
    from { transform: translate(0, 0); }
    to   { transform: translate(26px, -20px); }
}

/* Hero entrance — staggered, auto-plays on load */
.faq-hero .faq-anim {
    opacity: 0;
    animation: faqRise .72s cubic-bezier(.22, 1, .36, 1) both;
}
.faq-hero .faq-anim.d1 { animation-delay: .06s; }
.faq-hero .faq-anim.d2 { animation-delay: .15s; }
.faq-hero .faq-anim.d3 { animation-delay: .24s; }
.faq-hero .faq-anim.d4 { animation-delay: .33s; }

/* Hero illustration: zoom-in on load, then gentle continuous float */
.faq-hero-visual {
    opacity: 0;
    animation: faqZoom .9s cubic-bezier(.22, 1, .36, 1) .18s both;
}
.faq-hero-visual img {
    animation: faqFloat 6s ease-in-out 1.1s infinite alternate;
}

/* Decorative blurred blobs drift slowly */
.faq-hero::before { animation: faqBlob1 15s ease-in-out infinite alternate; }
.faq-hero::after  { animation: faqBlob2 18s ease-in-out infinite alternate; }

/* ---- Scroll reveals (JS adds .in) ---- */
.faq-reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .65s cubic-bezier(.22, 1, .36, 1),
                transform .65s cubic-bezier(.22, 1, .36, 1);
    will-change: opacity, transform;
}
.faq-reveal.in { opacity: 1; transform: none; }

.faq-reveal.d1 { transition-delay: .08s; }
.faq-reveal.d2 { transition-delay: .16s; }
.faq-reveal.d3 { transition-delay: .24s; }
.faq-reveal.d4 { transition-delay: .32s; }

/* ---- Accordion answer fade-in ---- */
.faq-a-inner {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .4s ease .06s, transform .4s ease .06s;
}
.faq-item.open .faq-a-inner {
    opacity: 1;
    transform: none;
}

/* ---- Accessibility: respect reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
    .faq-hero .faq-anim,
    .faq-hero-visual,
    .faq-reveal {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
    .faq-hero-visual img { animation: none !important; }
    .faq-a-inner { opacity: 1; transform: none; transition: none; }
    .faq-hero::before, .faq-hero::after { animation: none !important; }
}
