/* =============================================
   SPARSH — FAQ Page Styles
   ============================================= */

:root {
    --faq-bg: #0a0e1a;
    --faq-accent: #61B564;
    --faq-text: #ffffff;
    --faq-text-muted: rgba(255, 255, 255, 0.6);
    --faq-glass: rgba(255, 255, 255, 0.03);
    --faq-border: rgba(255, 255, 255, 0.08);
}

.faq-page {
    background: var(--faq-bg);
    color: var(--faq-text);
    overflow-x: hidden;
}


.faq-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.faq-container.small {
    max-width: 800px;
}

.faq-container.centered {
    text-align: center;
}

/* ---------- HERO SECTION ---------- */
.faq-hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 140px;
    position: relative;
}

.faq-heading {
    font-family: 'Inter', sans-serif;
    font-size: clamp(3rem, 7vw, 5rem);
    line-height: 1.1;
    margin-bottom: 24px;
    opacity: 0;
}

.faq-subtext {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    color: var(--faq-text-muted);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
}

/* ---------- SEARCH BAR ---------- */
.faq-search-section {
    padding: 40px 0;
    position: sticky;
    top: 100px;
    z-index: 100;
}

.search-bar-wrapper {
    background: var(--faq-glass);
    border: 1px solid var(--faq-border);
    border-radius: 50px;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    backdrop-filter: blur(15px);
    transition: all 0.4s ease;
    opacity: 0;
}

.search-bar-wrapper i {
    color: var(--faq-accent);
    font-size: 1.2rem;
}

.search-bar-wrapper input {
    background: none;
    border: none;
    color: #fff;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    outline: none;
}

.search-bar-wrapper:focus-within {
    border-color: var(--faq-accent);
    box-shadow: 0 0 30px rgba(97, 181, 100, 0.2);
}

/* ---------- CATEGORY NAVIGATION ---------- */
.faq-nav-section {
    padding: 40px 0;
}

.faq-nav-section .faq-container {
    max-width: 1400px;
    /* Increased to accommodate all 6 capsules in one line */
    width: 100%;
}

.category-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: nowrap;
    opacity: 0;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 24px;
}

@media (max-width: 1024px) {
    .category-nav {
        justify-content: flex-start;
    }
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    padding: 12px 24px;
    background: var(--faq-glass);
    border: 1px solid var(--faq-border);
    border-radius: 50px;
    color: var(--faq-text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-tab:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-tab.active {
    background: var(--faq-accent);
    color: #000;
    border-color: var(--faq-accent);
    font-weight: 600;
}

/* ---------- ACCORDION SECTION ---------- */
/* Matches Sleep Library "Commonly Asked Questions" card treatment exactly */

.faq-accordion-section {
    padding: 80px 0;
}

.faq-category-block {
    margin-bottom: 80px;
}

.category-title {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--faq-accent);
}

.accordion-group {
    display: flex;
    flex-direction: column;
}

html body.faq-page.content-page .accordion-item {
    margin: 0 0 16px 0 !important;
    padding: 0 28px !important;
    border: 1px solid var(--faq-border) !important;
    border-radius: 16px !important;
    background: var(--faq-glass) !important;
    overflow: hidden !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    opacity: 0;
}

html body.faq-page.content-page .accordion-item:hover {
    border-color: var(--faq-accent) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25) !important;
}

html body.faq-page.content-page .accordion-item.active {
    border-color: var(--faq-accent) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2) !important;
}

html body.faq-page.content-page .accordion-header {
    padding: 24px 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 1.05rem !important;
    color: #fff !important;
    line-height: 1.45 !important;
    background: transparent !important;
}

html body.faq-page.content-page .accordion-header:hover {
    color: var(--faq-accent) !important;
    background: transparent !important;
}

/* Chevron rotation handled by faqs.js */
html body.faq-page.content-page .accordion-header i {
    font-size: 0.8rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html body.faq-page.content-page .accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

html body.faq-page.content-page .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html body.faq-page.content-page .accordion-content p {
    padding: 0 0 24px !important;
    font-family: 'Inter', sans-serif !important;
    color: var(--faq-text-muted) !important;
    line-height: 1.7 !important;
    font-size: 0.95rem !important;
}

/* Light mode */
html body.light-mode.faq-page.content-page .accordion-item {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(26, 26, 46, 0.09) !important;
    box-shadow: 0 4px 20px rgba(26, 26, 46, 0.04) !important;
}

html body.light-mode.faq-page.content-page .accordion-item:hover,
html body.light-mode.faq-page.content-page .accordion-item.active {
    background: #ffffff !important;
    border-color: var(--faq-accent) !important;
    box-shadow: 0 16px 40px rgba(26, 26, 46, 0.08) !important;
}

html body.light-mode.faq-page.content-page .accordion-header {
    color: #1a1a2e !important;
}

html body.light-mode.faq-page.content-page .accordion-content p {
    color: rgba(26, 26, 46, 0.72) !important;
}

/* ---------- SUGGESTIONS SECTION ---------- */
.faq-suggestions-section {
    padding: 100px 0;
    background: transparent;
}

.suggestion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.suggestion-card {
    background: var(--faq-glass);
    border: 1px solid var(--faq-border);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    transition: all 0.4s ease;
    opacity: 0;
}

.suggestion-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--faq-accent);
}

.suggestion-card i {
    font-size: 2.5rem;
    color: var(--faq-accent);
    margin-bottom: 24px;
}

.suggestion-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.suggestion-link {
    display: inline-block;
    color: var(--faq-accent);
    text-decoration: none;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
}

.suggestion-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--faq-accent);
    transition: width 0.3s ease;
}

.suggestion-link:hover::after {
    width: 100%;
}

/* ---------- CTA SECTION ---------- */
.faq-cta-section {
    padding: 120px 0;
}

.cta-heading {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 20px;
}

.cta-subtext {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    color: var(--faq-text-muted);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-primary {
    padding: 16px 40px;
    background: var(--faq-accent);
    color: #000;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary {
    padding: 16px 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(97, 181, 100, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #fff;
    transform: translateY(-5px);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .faq-hero {
        min-height: 40vh;
        padding-top: 120px;
    }

    .category-nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .category-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-tab {
        white-space: nowrap;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .faq-search-section {
        top: 80px;
    }
}

/* Animation utilities handled by JS/GSAP */
.reveal-up {
    opacity: 0;
}
