/* ============================================================
   FAQ PAGE — template-faq.php
   Content managed in Dashboard → Settings → FAQ.
   Clean, light accordion that follows the site brand.
   ============================================================ */

.faq-page-v2 {
    padding: 60px 0 90px;
    background-color: var(--ds-bg, var(--color-bg-secondary, #f8f7fa));
}

.faq-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
}

.faq-header {
    text-align: center;
    margin-bottom: 48px;
}

.faq-title {
    font-size: 36px;
    font-weight: 800 !important;
    color: var(--ds-text, var(--color-text, #2a2733)) !important;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.faq-subtitle {
    font-size: 17px;
    color: var(--ds-text-muted, var(--color-text-secondary, #666));
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto;
}

.faq-empty {
    text-align: center;
    color: var(--ds-text-muted, var(--color-text-secondary, #666));
    padding: 40px 0;
    font-size: 16px;
}

/* ---------- Accordion ---------- */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-accordion-item {
    background: #ffffff;
    border: 1px solid var(--ds-border, #e6e2ef);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(45, 35, 66, 0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.faq-accordion-item:hover {
    border-color: rgba(77, 63, 118, 0.35);
    box-shadow: 0 6px 20px rgba(45, 35, 66, 0.08);
}

.faq-accordion-item.active {
    border-color: var(--color-brand-primary, #4d3f76);
    box-shadow: 0 8px 24px rgba(77, 63, 118, 0.12);
}

/* Trigger */
.faq-trigger {
    width: 100%;
    padding: 20px 22px;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    text-align: left;
    outline: none;
}

.faq-question {
    font-size: 17px;
    font-weight: 700;
    color: var(--ds-text, var(--color-text-dark, #333)) !important;
    line-height: 1.45;
    flex: 1;
}

.faq-icon {
    position: relative;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 6px;
    background: var(--color-brand-primary, #4d3f76);
    transition: background 0.3s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: #ffffff;
    border-radius: 2px;
    transition: opacity 0.25s ease;
}

.faq-icon::before {
    top: 50%;
    left: 4px;
    right: 4px;
    height: 2px;
    transform: translateY(-50%);
}

.faq-icon::after {
    left: 50%;
    top: 4px;
    bottom: 4px;
    width: 2px;
    transform: translateX(-50%);
}

.faq-trigger:hover .faq-icon {
    background: var(--color-brand-primary-dark, #3a2f59);
}

/* Neutralise the site-wide `button:hover` (sheel-premium-bundle.css) that
   paints every button dark plum. FAQ rows get a light tint instead so the
   question text stays readable. */
.faq-trigger:hover {
    background-color: var(--ds-hover-tint, rgba(77, 63, 118, 0.06)) !important;
    color: inherit !important;
    transform: none !important;
    box-shadow: none !important;
}

[data-theme="dark"] .faq-trigger:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.active .faq-icon::after {
    opacity: 0;
}

.active .faq-icon {
    transform: rotate(180deg);
}

/* Panel */
.faq-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-panel-inner {
    padding: 2px 22px 22px;
    padding-top: 14px;
    border-top: 1px solid var(--ds-border, #eeeaf4);
    font-size: 15.5px;
    line-height: 1.85;
    color: var(--ds-text-muted, var(--color-text-secondary, #555));
}

.faq-panel-inner p {
    margin: 0 0 10px;
}

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

/* RTL */
[dir="rtl"] .faq-trigger {
    text-align: right;
}

/* Dark mode: the FAQ section keeps the light surface so title/subtitle and
   the answer text stay readable while the page background goes dark. */
[data-theme="dark"] .faq-page-v2 {
    background-color: var(--ds-bg-card, #ffffff) !important;
}

[data-theme="dark"] .faq-title {
    color: var(--ds-text, #2a2733) !important;
}

[data-theme="dark"] .faq-subtitle,
[data-theme="dark"] .faq-empty,
[data-theme="dark"] .faq-panel-inner {
    color: var(--ds-text-muted, #555555) !important;
}

[data-theme="dark"] .faq-accordion-item {
    border-color: var(--ds-border, #e6e2ef) !important;
}

@media (max-width: 640px) {
    .faq-page-v2 {
        padding: 36px 0 60px;
    }

    .faq-title {
        font-size: 26px;
    }

    .faq-subtitle {
        font-size: 15px;
    }

    .faq-question {
        font-size: 15.5px;
    }

    .faq-trigger {
        padding: 16px;
    }

    .faq-panel-inner {
        padding: 10px 16px 16px;
    }
}