@font-face {
    font-family: 'Vazir';
    src: url('/main/assets/fonts/Vazir.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* متغیرهای CSS برای یکپارچگی */
:root {
    --bg-primary: #1C2526;
    --bg-secondary: #2E3A3B;
    --text-primary: #F5F5F5;
    --text-secondary: #ADB5BD;
    --accent: #B8860B;
    --accent-hover: #DAA520;
    --border-radius: 10px;
    --shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* تنظیمات پایه */
* {
    box-sizing: border-box;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Vazir', sans-serif;
    overflow-x: hidden;
    margin: 0;
    padding-bottom: 60px; /* فضای منوی پایین در موبایل */
}

/* انیمیشن‌های کلیدی */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes sparkle {
    0% { text-shadow: 0 0 0 rgba(255, 255, 255, 0); }
    50% { text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(184, 134, 11, 0.5); }
    100% { text-shadow: 0 0 0 rgba(255, 255, 255, 0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* کلاس‌های انیمیشن */
.fade-in {
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    animation: fadeIn 0.5s ease forwards;
}

.fade-in-right {
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-right.visible {
    animation: fadeInRight 0.5s ease forwards;
    animation-delay: var(--delay, 0s);
}

.typewriter {
    display: inline-block;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: break-word;
    max-width: 100%;
}

.typewriter.typing {
    border-right: 2px solid var(--accent);
}

.typewriter.sparkle {
    animation: sparkle 0.5s ease;
}

/* بخش هدر (Hero) */
.hero {
    position: relative;
    text-align: center;
    padding: 20px;
    min-height: 716px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* بخش سوالات متداول */
.faq {
    padding: 60px 15px;
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
    border-radius: var(--border-radius);
}

.faq h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.faq h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 2px;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid transparent;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

.faq-question {
    background: linear-gradient(90deg, var(--bg-secondary), var(--bg-primary));
    color: var(--text-primary);
    padding: 20px 25px;
    border: none;
    width: 100%;
    text-align: right;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease, color 0.3s ease;
    letter-spacing: 0.5px;
}

.faq-question:hover {
    background: var(--accent);
    color: var(--text-primary);
}

.faq-question.active {
    background: var(--accent);
    border-bottom: 2px solid var(--accent-hover);
}

.faq-question i {
    font-size: 1.1rem;
    transition: transform 0.4s ease, color 0.4s ease;
    color: var(--text-secondary);
}

.faq-question.active i {
    transform: rotate(180deg);
    color: var(--text-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    background: var(--bg-primary);
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 1;
}

.faq-answer p {
    padding: 20px 25px;
    margin: 0;
    font-size: 1rem;
    color: #FFFFFF !important; /* متن سفید با اولویت بالا */
    line-height: 1.7;
    font-weight: 400;
    animation: slideIn 0.5s ease forwards;
    border-right: 3px solid var(--accent);
}

/* استایل دکمه نصب PWA */
.install-btn {
    margin-top: 20px;
    background: var(--accent);
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
}

.install-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* رسپانسیو */
@media (max-width: 768px) {
    .hero {
        padding: 15px;
        min-height: 500px;
    }

    .faq {
        padding: 40px 10px;
    }

    .faq h2 {
        font-size: 1.8rem;
    }

    .faq h2::after {
        width: 60px;
        height: 3px;
    }

    .faq-question {
        font-size: 1rem;
        padding: 15px 20px;
    }

    .faq-question i {
        font-size: 1rem;
    }

    .faq-answer p {
        font-size: 0.95rem;
        padding: 15px 20px;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 10px;
        min-height: 300px;
    }

    .faq {
        padding: 30px 5px;
    }

    .faq h2 {
        font-size: 1.6rem;
    }

    .faq h2::after {
        width: 50px;
        height: 2px;
    }

    .faq-question {
        font-size: 0.95rem;
        padding: 12px 15px;
    }

    .faq-question i {
        font-size: 0.9rem;
    }

    .faq-answer p {
        font-size: 0.9rem;
        padding: 12px 15px;
    }
}