/* =============================================
   FAQ PAGE — Theme-aware styles
   Dark (default): html without .theme-light
   Light mode:     html.theme-light
   ============================================= */

/* ── Page background (dark default) ── */
#faq-page-wrap {
    background-color: #020617;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

/* ── Full-page light theme background — covers html, body, wrapper and section ── */
html.theme-light,
html.theme-light body,
html.theme-light #theme-invert-wrap,
html.theme-light #faq-page-wrap {
    background-color: #f8faff !important; /* matches source HTML bg-slate-50 */
    transition: background-color 0.3s ease;
}

html.theme-light body,
html.theme-light #theme-invert-wrap {
    min-height: 100vh;
}

/* ── Page heading ── */
#faq-page-wrap h1,
.faq-page-title {
    color: #ffffff;
    letter-spacing: -0.02em;
}

html.theme-light #faq-page-wrap h1,
html.theme-light .faq-page-title {
    color: #0f172a !important;
}

/* ── Subtitle / buy now link ── */
.faq-subtitle {
    color: #a7b2c7;
}

#faq-page-wrap .faq-subtitle a {
    color: #818cf8;
    transition: color 0.2s ease;
}

html.theme-light #faq-page-wrap .faq-subtitle a {
    color: #4f46e5 !important;
}

/* ── Two-column FAQ grid ── */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
    width: 100%;
}

@media (min-width: 640px) {
    .faq-grid {
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .faq-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 2rem;
        align-items: start;
    }
}

.faq-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ── FAQ accordion items (dark default) ── */
.faq-item {
    background: linear-gradient(145deg, #0e1629 0%, #121f38 100%);
    border: 1px solid rgba(78, 163, 242, 0.18);
    border-radius: 0.875rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    animation: faqSlideIn 0.4s ease forwards;
}

.faq-item:hover {
    border-color: rgba(78, 163, 242, 0.35);
    box-shadow: 0 8px 28px rgba(14, 22, 41, 0.5);
    transform: translateY(-2px);
}

.faq-item.open {
    border-color: rgba(78, 163, 242, 0.45);
    background: linear-gradient(145deg, #101c33 0%, #152a4a 100%);
}

/* ── FAQ accordion items (light mode) ── */
html.theme-light .faq-item {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06) !important;
}

html.theme-light .faq-item:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.1) !important;
    border-color: #93c5fd !important;
}

html.theme-light .faq-item.open {
    background: #f8fafc !important;
    border-color: #60a5fa !important;
}

/* ── Question header / click cursor ── */
.faq-question-header,
.faq-question {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* ── Question heading (dark) ── */
.faq-item h3 {
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
}

@media (min-width: 640px) {
    .faq-item h3 {
        font-size: 1.05rem;
    }
}

/* ── Question heading (light) ── */
html.theme-light .faq-item h3 {
    color: #0f172a !important;
}

/* ── Toggle icon (+) ── */
.faq-toggle-icon {
    color: #4ea3f2;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(78, 163, 242, 0.12);
    transition: transform 0.3s ease, background 0.25s ease, color 0.25s ease;
    margin-left: 1rem;
}

.faq-item.open .faq-toggle-icon {
    transform: rotate(45deg);
    background: rgba(142, 99, 245, 0.2);
    color: #8e63f5;
}

html.theme-light .faq-toggle-icon {
    color: #2563eb !important;
    background: rgba(37, 99, 235, 0.1) !important;
}

html.theme-light .faq-item.open .faq-toggle-icon {
    color: #7c3aed !important;
    background: rgba(124, 58, 237, 0.12) !important;
}

/* ── Answer text (dark) ── */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    padding: 0 1.5rem !important;
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.65;
    border-top: 0px solid transparent;
    transition:
        max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease,
        padding 0.35s ease,
        border-color 0.3s ease,
        visibility 0.3s ease;
}

@media (min-width: 640px) {
    .faq-answer {
        font-size: 0.95rem;
    }
}

.faq-item.open .faq-answer {
    max-height: 1200px;
    opacity: 1;
    visibility: visible;
    padding-top: 0.75rem !important;
    padding-bottom: 1.25rem !important;
    border-top: 1px solid rgba(78, 163, 242, 0.15);
}

/* ── Answer text (light) ── */
html.theme-light .faq-answer {
    color: #334155 !important;
}

html.theme-light .faq-item.open .faq-answer {
    border-top-color: #e2e8f0 !important;
}

.faq-answer p {
    margin: 0 0 0.5rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    list-style: disc;
}

.faq-answer ul li {
    margin-bottom: 0.35rem;
    color: #94a3b8;
}

.faq-answer ul li::marker {
    color: #4ea3f2;
}

html.theme-light .faq-answer ul li {
    color: #475569 !important;
}

html.theme-light .faq-answer ul li::marker {
    color: #2563eb !important;
}

/* ── Contact card wrap (full width) ── */
.faq-contact-wrap {
    width: 100%;
}

/* ── "Any Question?" contact card (dark) ── */
.faq-contact-card {
    width: 100%;
    background: linear-gradient(160deg, #0a1022 0%, #0e1a35 50%, #121f38 100%);
    border: 1px solid rgba(78, 163, 242, 0.22);
    border-radius: 1rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    align-self: stretch;
}

/* ── Contact card (light) ── */
html.theme-light .faq-contact-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08) !important;
}

/* ── Question mark icon ── */
.faq-question-mark {
    color: #4ea3f2;
    font-size: 4.5rem;
    line-height: 1;
    font-weight: 700;
    display: block;
    text-shadow: 0 0 40px rgba(78, 163, 242, 0.35);
}

@media (min-width: 640px) {
    .faq-question-mark {
        font-size: 5.5rem;
    }
}

html.theme-light .faq-question-mark {
    color: #2563eb !important;
    text-shadow: 0 0 30px rgba(37, 99, 235, 0.2) !important;
}

/* ── "Any Question?" heading (dark) ── */
.faq-contact-card h2 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
}

@media (min-width: 640px) {
    .faq-contact-card h2 {
        font-size: 1.875rem;
    }
}

/* ── "Any Question?" heading (light) ── */
html.theme-light .faq-contact-card h2 {
    color: #0f172a !important;
}

/* ── Sub text ── */
.faq-contact-desc {
    color: #a7b2c7;
    font-size: 0.95rem;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

html.theme-light .faq-contact-desc {
    color: #475569 !important;
}

/* ── Input wrapper — MUST be position:relative for Send button ── */
.faq-input-wrap {
    position: relative;
    width: 100%;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

/* ── Search input (dark) ── */
.faq-input {
    background-color: #060b1d;
    border: 1px solid rgba(78, 163, 242, 0.25);
    color: #e6eaf2;
    border-radius: 9999px;
    padding: 0.9rem 6.5rem 0.9rem 1.25rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.9rem;
}

@media (min-width: 640px) {
    .faq-input {
        padding: 1rem 7rem 1rem 1.5rem;
        font-size: 1rem;
    }
}

.faq-input::placeholder {
    color: #64748b;
}

.faq-input:focus {
    border-color: #4ea3f2;
    box-shadow: 0 0 0 3px rgba(78, 163, 242, 0.2);
}

/* ── Search input (light) ── */
html.theme-light .faq-input {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

html.theme-light .faq-input::placeholder {
    color: #94a3b8 !important;
}

html.theme-light .faq-input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* ── Send button — absolutely positioned inside .faq-input-wrap ── */
.faq-send-btn {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #4ea3f2 0%, #8e63f5 100%);
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (min-width: 640px) {
    .faq-send-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}

.faq-send-btn:hover {
    opacity: 0.92;
    transform: translateY(-50%) scale(1.02);
}

/* ── Social icons (dark) ── */
.faq-social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.faq-social-icon {
    color: #a7b2c7;
    font-size: 1.1rem;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(78, 163, 242, 0.1);
    border: 1px solid rgba(78, 163, 242, 0.15);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.faq-social-icon:hover {
    color: #4ea3f2;
    background: rgba(78, 163, 242, 0.18);
    border-color: rgba(78, 163, 242, 0.35);
}

/* ── Social icons (light) ── */
html.theme-light .faq-social-icon {
    color: #475569 !important;
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

html.theme-light .faq-social-icon:hover {
    color: #2563eb !important;
    background: #eff6ff !important;
    border-color: #93c5fd !important;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #020617;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

html.theme-light ::-webkit-scrollbar-track {
    background: #f1f5f9;
}

html.theme-light ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

/* ── Slide-in animation ── */
@keyframes faqSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}