/* ============================================================
   faq-style.css - استایل صفحه سوالات متداول (نسخه تمیز)
   ============================================================ */

/* ============================================================
   HERO
   ============================================================ */
.faq-hero {
    position: relative;
    padding: 140px 0 80px;
    overflow: hidden;
    background: var(--bg-primary);
}

.faq-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(124, 77, 255, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 60%, rgba(83, 109, 254, 0.10) 0%, transparent 50%),
        var(--bg-primary);
}

.faq-hero-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(124, 77, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 77, 255, 0.035) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at 40% 50%, black 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 40% 50%, black 20%, transparent 75%);
    animation: gridMove 25s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* چیدمان دو ستونی */
.faq-hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 50px;
    align-items: center;
}

.faq-hero-text {
    max-width: 620px;
}

.faq-hero-text .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-glow);
    color: var(--accent);
    padding: 5px 18px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(124, 77, 255, 0.2);
    margin-bottom: 18px;
}

.faq-hero-text h1 {
    font-size: clamp(1.7rem, 3.8vw, 2.6rem);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 18px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.faq-hero-text h1 .highlight {
    color: var(--accent);
    position: relative;
}

.faq-hero-text h1 .highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    opacity: 0.35;
    border-radius: 10px;
}

.faq-hero-text > p {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 540px;
    margin-bottom: 28px;
    line-height: 1.85;
}

/* ===== SEARCH BOX ===== */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 60px;
    padding: 4px 4px 4px 20px;
    max-width: 540px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.search-box > i {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    min-width: 0;
}

.search-box input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.search-box .btn {
    border-radius: 40px;
    padding: 10px 26px;
    font-size: 0.82rem;
    flex-shrink: 0;
}

/* ===== ویژوال سمت راست ===== */
.faq-hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.hero-visual-ring {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 1px dashed var(--border-glass);
    animation: spinSlow 40s linear infinite;
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-visual-core {
    position: relative;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(124, 77, 255, 0.15);
}

.hero-visual-core i {
    font-size: 3.5rem;
    color: var(--accent);
    filter: drop-shadow(0 0 30px var(--accent-glow));
    animation: pulseIcon 3s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% {
        filter: drop-shadow(0 0 25px var(--accent-glow));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 45px var(--accent-glow));
        transform: scale(1.05);
    }
}

.hero-float-icon {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

.icon-1 {
    top: 0;
    right: 30px;
    animation: floatIcon 5s ease-in-out infinite;
}
.icon-2 {
    bottom: 20px;
    left: 20px;
    animation: floatIcon 6s ease-in-out infinite reverse;
}
.icon-3 {
    top: 50%;
    left: -10px;
    transform: translateY(-50%);
    animation: floatIconCenter 7s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes floatIconCenter {
    0%, 100% { transform: translateY(-50%); }
    50% { transform: translateY(calc(-50% - 12px)); }
}

/* ============================================================
   CATEGORIES
   ============================================================ */
.faq-categories {
    padding: 20px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

.categories-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.categories-scroll::-webkit-scrollbar {
    height: 4px;
}
.categories-scroll::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}
.categories-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.cat-btn {
    flex-shrink: 0;
    padding: 8px 22px;
    border-radius: 40px;
    border: 1px solid var(--border-glass);
    background: var(--bg-card);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    scroll-snap-align: start;
    white-space: nowrap;
}

.cat-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(124, 77, 255, 0.06);
}

.cat-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* ============================================================
   FAQ LIST
   ============================================================ */
.faq-list {
    padding: 50px 0 80px;
    background: var(--bg-primary);
}

.faq-section {
    margin-bottom: 48px;
}

.faq-section:last-of-type {
    margin-bottom: 0;
}

.faq-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-section-title i {
    color: var(--accent);
    font-size: 1rem;
}

.faq-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.faq-item:hover {
    border-color: rgba(124, 77, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.faq-item.active {
    border-color: var(--accent);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.faq-item.hidden {
    display: none;
}

/* ===== سوال (دکمه) ===== */
.faq-question {
    width: 100%;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.5;
    text-align: right;
    color: var(--text-primary);
    background: transparent;
    border: none;
    font-family: inherit;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--accent);
}

.faq-question > span {
    flex: 1;
}

.faq-question i {
    flex-shrink: 0;
    transition: transform 0.35s ease;
    color: var(--accent);
    font-size: 0.85rem;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* ===== پاسخ ===== */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 22px;
    color: var(--text-muted);
    line-height: 1.85;
    font-size: 0.92rem;
}

.faq-item.active .faq-answer {
    max-height: 600px;
    padding: 0 22px 20px;
}

.faq-answer a {
    color: var(--accent);
    font-weight: 600;
    transition: var(--transition);
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
    color: var(--accent);
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 0.9rem;
}

/* ============================================================
   CTA
   ============================================================ */
.faq-cta {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.faq-cta .cta-banner {
    position: relative;
    padding: 56px 36px;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border: none;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 24px 70px var(--accent-glow);
    transition: all 0.4s ease;
}

.faq-cta .cta-banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 90px var(--accent-glow);
}

.cta-bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}
.cta-bg-circle.c1 { top: -35%; right: -8%; width: 320px; height: 320px; }
.cta-bg-circle.c2 { bottom: -45%; left: -5%; width: 400px; height: 400px; }

.faq-cta .cta-banner h2 {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    margin-bottom: 12px;
    line-height: 1.35;
    letter-spacing: -0.3px;
}

.faq-cta .cta-banner p {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    max-width: 540px;
    margin: 0 auto 28px;
    line-height: 1.75;
}

.faq-cta .btn-group {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.faq-cta .btn {
    padding: 12px 30px;
    font-size: 0.88rem;
    border-radius: 60px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid transparent;
}

.faq-cta .btn-primary {
    background: #fff;
    color: var(--accent);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.faq-cta .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.faq-cta .btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.faq-cta .btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-3px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* تبلت */
@media (max-width: 992px) {
    .faq-hero {
        padding: 120px 0 60px;
    }

    .faq-hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .faq-hero-text {
        max-width: 100%;
        margin: 0 auto;
    }

    .faq-hero-text > p {
        margin-left: auto;
        margin-right: auto;
    }

    .search-box {
        margin-left: auto;
        margin-right: auto;
    }

    .faq-hero-visual {
        display: none;
    }

    .faq-cta .cta-banner {
        padding: 44px 26px;
    }
    .faq-cta .cta-banner h2 {
        font-size: 1.4rem;
    }
}

/* موبایل */
@media (max-width: 600px) {
    .faq-hero {
        padding: 100px 0 50px;
    }
    .faq-hero-text h1 {
        font-size: 1.5rem;
    }
    .faq-hero-text > p {
        font-size: 0.92rem;
    }

    .search-box {
        flex-wrap: wrap;
        background: transparent;
        border: none;
        padding: 0;
        gap: 10px;
        max-width: 100%;
    }
    .search-box > i {
        display: none;
    }
    .search-box input {
        background: var(--bg-card);
        border: 1px solid var(--border-glass);
        border-radius: 60px;
        padding: 10px 18px;
        width: 100%;
    }
    .search-box .btn {
        width: 100%;
        justify-content: center;
    }

    .faq-categories {
        padding: 14px 0;
    }
    .categories-scroll {
        gap: 6px;
    }
    .cat-btn {
        padding: 6px 14px;
        font-size: 0.72rem;
    }

    .faq-list {
        padding: 30px 0 60px;
    }
    .faq-section {
        margin-bottom: 32px;
    }
    .faq-section-title {
        font-size: 1.05rem;
    }
    .faq-question {
        padding: 14px 16px;
        font-size: 0.88rem;
    }
    .faq-answer {
        padding: 0 16px;
        font-size: 0.85rem;
    }
    .faq-item.active .faq-answer {
        padding: 0 16px 16px;
    }

    .faq-cta {
        padding: 50px 0;
    }
    .faq-cta .cta-banner {
        padding: 36px 20px;
    }
    .faq-cta .cta-banner h2 {
        font-size: 1.2rem;
    }
    .faq-cta .btn-group {
        flex-direction: column;
    }
    .faq-cta .btn {
        width: 100%;
        justify-content: center;
    }
}