/*
Theme Name: ChatAgent Theme
Author: You & Gemini
Description: قالب اختصاصی، سریع و لوکال برای سایت ChatAgent.ir
Version: 1.0
*/

/* ==========================================================================
   ۱. تنظیمات پایه، فونت بومی و متغیرها
   ========================================================================== */
@font-face {
    font-family: 'Vazirmatn';
    src: url('./fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('./fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #4F46E5; 
    --text-color: #1F2937;
    --bg-color: #F9FAFB;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    direction: rtl;
    text-align: right;
}

/* ==========================================================================
   ۲. ساختار اصلی هدر (تضمین نمایش کامل در دسکتاپ)
   ========================================================================== */
header {
    background-color: var(--white);
    padding: 15px 5%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo { 
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 45px;
    width: auto;
    display: block;
}

/* بسته‌بندی کلی سمت چپ هدر: منو + ابزارها + دکمه همبرگری */
.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* بخش جمع‌شونده در موبایل: منوی اصلی + دکمه‌های ورود/عضویت */
.collapsible-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* منوی لینک‌های اصلی سایت در دسکتاپ */
.main-nav {
    display: flex;
    align-items: center;
}

/* دکمه‌های ورود و عضویت */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* جستجو و سبد خرید: همیشه ثابت، بیرون از کشوی موبایل */
.header-tools {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.menu-links > li {
    position: relative;
    padding: 15px 0;
}

.menu-links > li > a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.menu-links > li:hover > a {
    color: var(--primary-color);
}

/* آیکون فلش منوی کشویی */
.chevron {
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    margin-bottom: 4px;
    transition: transform 0.3s;
}

.menu-links > li:hover .chevron {
    transform: rotate(-135deg);
    margin-bottom: -2px;
}

/* باکس زیرمنوی کشویی */
.submenu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    min-width: 230px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #E5E7EB;
    list-style: none;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.menu-links > li:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    margin-bottom: 4px;
}

.submenu li:last-child {
    margin-bottom: 0;
}

.submenu a {
    color: #4B5563;
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.2s;
}

.submenu a:hover {
    background-color: #F3F4F6;
    color: var(--primary-color);
    padding-right: 20px;
}

/* ==========================================================================
   ۳. استایل ابزارها و دکمه‌های هدر
   ========================================================================== */
.btn-login {
    color: #4B5563;
    background-color: transparent;
    border: 1.5px solid #D1D5DB;
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-login:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.04);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: 0.3s;
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-secondary {
    background-color: #E5E7EB;
    color: #374151;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: 0.3s;
}

.btn-secondary:hover {
    background-color: #D1D5DB;
}

.btn-logout {
    color: #EF4444;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    padding: 10px 15px;
    transition: 0.3s;
}

.btn-logout:hover {
    opacity: 0.8;
}

/* باکس جستجوی کشویی */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-toggle, .cart-toggle {
    background: none;
    border: none;
    color: #4B5563;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.search-toggle:hover, .cart-toggle:hover {
    color: var(--primary-color);
    background-color: #F3F4F6;
}

.search-box-form {
    width: 0;
    overflow: hidden;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}

.search-input {
    width: 180px;
    border: 1.5px solid #D1D5DB;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    outline: none;
    margin-right: 8px;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-wrapper.active .search-box-form {
    width: 190px;
}

.search-wrapper.active .search-toggle {
    color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.08);
}

/* ==========================================================================
   ۴. بخش هیرو لندینگ پیج (گرادینت نوری متمرکز فقط زیر نوشته‌ها)
   ========================================================================== */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 40px;
    background-color: transparent;
} 

.hero-content {
    max-width: 800px;
    margin-bottom: 50px;
    padding: 35px 45px;
    border-radius: 24px;
    /* اعمال گرادینت دایره‌ای ملایم فقط و فقط پشت کادر متن‌ها */
    background: radial-gradient(circle, rgba(79, 70, 229, 0.07) 0%, rgba(255, 255, 255, 0) 75%);
}

.hero-content h1 {
    font-size: 46px;
    line-height: 1.4;
    margin-bottom: 20px;
    color: #111827;
    font-weight: bold;
}

.hero-content p {
    font-size: 19px;
    color: #4B5563;
    margin-bottom: 35px;
    line-height: 1.7;
}

.btn-primary-large {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 14px 36px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: 0.3s;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.15);
}

.btn-primary-large:hover {
    opacity: 0.9;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.25);
}

.hero-buttons {
    display: flex;
    justify-content: center;
}

/* بخش چت‌بات پایینی هیرو */
.hero-chat-mockup {
    width: 100%;
    display: flex;
    justify-content: center;
}

.chat-window {
    width: 100%;
    max-width: 440px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.02);
    border: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background-color: var(--white);
    padding: 16px 20px;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #F3F4F6;
}

.agent-name {
    font-size: 15px;
    color: #111827;
    margin-bottom: 2px;
    font-weight: bold;
}

.agent-status {
    font-size: 12px;
    color: #6B7280;
    display: block;
}

.online-badge {
    width: 10px;
    height: 10px;
    background-color: #10B981;
    border-radius: 50%;
}

.chat-body {
    padding: 24px;
    background-color: #F9FAFB;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.message {
    max-width: 90%;
    padding: 12px 18px;
    font-size: 14px;
    line-height: 1.6;
}

.msg-bot {
    background-color: var(--white);
    color: var(--text-color);
    border-radius: 16px 16px 0 16px;
    align-self: flex-start;
    border: 1px solid #E5E7EB;
    width: fit-content;
    text-align: right;
}

.chat-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.chip {
    background-color: #EEF2F6;
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: bold;
    border: 1px solid #E0E7FF;
}

.chat-footer {
    padding: 16px 20px;
    border-top: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
}

.mock-input {
    color: #9CA3AF;
    font-size: 13.5px;
}

.mock-send-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    transform: scaleX(-1);
}

/* ==========================================================================
   ۵. استایل بخش‌های بدنه لندینگ پیج (ویژگی‌ها، قیمت، دعوت به اقدام)
   ========================================================================== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 32px;
    color: #111827;
    margin-bottom: 12px;
    font-weight: bold;
}

.section-title p {
    font-size: 16px;
    color: #6B7280;
}

.features-section {
    padding: 80px 20px;
    background-color: var(--white);
}

.features-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.feature-card {
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 35px 25px;
    flex: 1;
    min-width: 280px;
    max-width: 360px;
    transition: 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    color: #111827;
    margin-bottom: 12px;
    font-weight: bold;
}

.feature-card p {
    font-size: 14.5px;
    color: #4B5563;
    line-height: 1.6;
}

.integrations-section {
    padding: 80px 20px;
    background-color: #F9FAFB;
}

.integrations-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.int-tag {
    background-color: var(--white);
    border: 1px solid #E5E7EB;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 15px;
    color: #374151;
    box-shadow: 0 2px 5px rgba(0,0,0,0.01);
}

.pricing-section {
    padding: 80px 20px;
    background-color: var(--white);
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
    align-items: center;
}

.price-card {
    background-color: var(--white);
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    padding: 40px 30px;
    flex: 1;
    min-width: 300px;
    max-width: 380px;
    position: relative;
    text-align: center;
}

.price-card.featured {
    border: 2px solid var(--primary-color);
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.08);
    padding: 50px 30px;
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.price-card h3 { font-size: 20px; margin-bottom: 15px; font-weight: bold; }
.price-amount { font-size: 28px; font-weight: bold; color: var(--primary-color); margin-bottom: 10px; }
.price-desc { font-size: 13.5px; color: #6B7280; margin-bottom: 30px; }
.price-features { list-style: none; padding: 0; margin-bottom: 35px; text-align: right; display: inline-block; }
.price-features li { font-size: 14.5px; color: #4B5563; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.price-features li::before { content: "✓"; color: #10B981; font-weight: bold; }

.btn-pricing, .btn-pricing-featured {
    display: block;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14.5px;
    transition: 0.3s;
}

.btn-pricing { background-color: #F3F4F6; color: #374151; }
.btn-pricing:hover { background-color: #E5E7EB; }
.btn-pricing-featured { background-color: var(--primary-color); color: var(--white); }
.btn-pricing-featured:hover { opacity: 0.9; }

.cta-section {
    background: linear-gradient(135deg, #4F46E5 0%, #312E81 100%);
    color: var(--white);
    text-align: center;
    padding: 80px 20px;
}

.cta-section h2 { font-size: 32px; font-weight: bold; margin-bottom: 15px; }
.cta-section p { font-size: 17px; opacity: 0.9; margin-bottom: 35px; }

/* ==========================================================================
   ۶. استایل بخش سوالات متداول (آکاردئون خالص بدون JS)
   ========================================================================== */
.faq-section {
    padding: 80px 20px;
    background-color: #F9FAFB;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background-color: var(--white);
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item[open] {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.05);
}

.faq-question {
    padding: 20px 24px;
    font-size: 16px;
    font-weight: bold;
    color: #111827;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    list-style: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-chevron {
    width: 12px;
    height: 12px;
    border-bottom: 2px solid #6B7280;
    border-left: 2px solid #6B7280;
    transform: rotate(-45deg);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.faq-item[open] .faq-question {
    color: var(--primary-color);
}

.faq-item[open] .faq-chevron {
    transform: rotate(135deg);
    border-color: var(--primary-color);
}

.faq-answer {
    padding: 0 24px 20px;
    color: #4B5563;
    font-size: 15px;
    line-height: 1.8;
    text-align: justify;
    border-top: 1px solid #F3F4F6;
    background-color: #FCFDFE;
}

.faq-answer p {
    margin: 0;
    padding-top: 15px;
}

/* ==========================================================================
   ۷. استایل فوتر و انتهای صفحه
   ========================================================================== */
footer {
    text-align: center;
    padding: 20px;
    background-color: #111827;
    color: var(--white);
    margin-top: 50px;
}

.main-footer {
    background-color: #0F172A;
    color: #94A3B8;
    padding: 70px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    border-bottom: 1px solid #334155;
    padding-bottom: 40px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col.brand-col { flex: 2; max-width: 450px; }
.footer-col h4 { color: var(--white); font-size: 16px; font-weight: bold; margin-bottom: 25px; }
.footer-col p { font-size: 14px; line-height: 1.7; text-align: justify; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: #94A3B8; text-decoration: none; font-size: 14px; transition: 0.2s; }
.footer-col ul li a:hover { color: var(--white); padding-right: 5px; }

.footer-bottom {
    max-width: 1200px;
    margin: 20px auto 0;
    text-align: center;
    font-size: 13px;
    color: #64748B;
}

/* ==========================================================================
   ۸. تنظیمات ریسپانسیو و منوی همبرگری (فقط برای نمایشگرهای زیر 768px)
   ========================================================================== */
.menu-toggle-btn {
    display: none; /* حتماً در دسکتاپ مخفی است */
    background: none;
    border: none;
    color: #374151;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: 0.2s;
}

.menu-toggle-btn:hover {
    background-color: #F3F4F6;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    /* دکمه همبرگری در موبایل فعال می‌شود */
    .menu-toggle-btn {
        display: block;
    }

    /* فقط منو و ورود/عضویت به کشوی تمام‌صفحه تبدیل می‌شوند؛
       جستجو و سبد خرید (header-tools) همیشه کنار همبرگری باقی می‌مانند */
    .collapsible-menu {
        display: none; /* پیش‌فرض مخفی تا زمان کلیک */
        position: absolute;
        top: 75px;
        left: 0;
        right: 0;
        background-color: #FFFFFF;
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        gap: 20px;
        border-bottom: 2px solid #E5E7EB;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
        z-index: 9999;
    }

    /* فعال شدن منوی کشویی موبایل با امضای کلاس جاوااسکریپت */
    .collapsible-menu.mobile-open {
        display: flex;
    }

    /* منوی اصلی داخل حالت موبایل به‌صورت ستونی نمایش داده می‌شود */
    .menu-links {
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    .menu-links > li {
        padding: 0;
        width: 100%;
    }

    .menu-links > li > a {
        padding: 12px 8px;
        width: 100%;
    }

    /* دکمه‌های ورود/عضویت زیر منوی اصلی، با یک خط جداکننده */
    .auth-buttons {
        width: 100%;
        flex-direction: column;
        gap: 16px;
        padding-top: 16px;
        border-top: 1px solid #F3F4F6;
    }

    /* تمام‌عرض شدن دکمه‌های ورود و عضویت در موبایل (فقط داخل کشو) */
    .auth-buttons .btn-login,
    .auth-buttons .btn-primary,
    .auth-buttons .btn-secondary,
    .auth-buttons .btn-logout {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
        padding: 12px;
    }

    /* بهینه‌سازی سایز متن هیرو در موبایل */
    .hero-content h1 {
        font-size: 32px;
    }
    .hero-content p {
        font-size: 16px;
    }
}

/* ==========================================================================
   ۹. بخش گام‌های «چطور کار می‌کند»
   ========================================================================== */
.steps-section {
    padding: 80px 20px;
    background-color: var(--white);
}

.steps-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.step-card {
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 35px 25px;
    flex: 1;
    min-width: 260px;
    max-width: 340px;
    text-align: center;
}

.step-number {
    width: 44px;
    height: 44px;
    line-height: 44px;
    margin: 0 auto 18px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-weight: bold;
    font-size: 18px;
}

.step-card h3 {
    font-size: 17px;
    color: #111827;
    margin-bottom: 10px;
    font-weight: bold;
}

.step-card p {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.7;
}

/* ==========================================================================
   ۱۰. بخش نظرات مشتریان
   ========================================================================== */
.testimonials-section {
    padding: 80px 20px;
    background-color: #F9FAFB;
}

.testimonials-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.testimonial-card {
    background-color: var(--white);
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 30px 25px;
    flex: 1;
    min-width: 280px;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-text {
    font-size: 14.5px;
    color: #374151;
    line-height: 1.8;
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #F3F4F6;
    padding-top: 15px;
}

.author-name {
    font-weight: bold;
    font-size: 14px;
    color: #111827;
}

.author-role {
    font-size: 12.5px;
    color: #6B7280;
    margin-top: 3px;
}
/* ==========================================================================
   ۱۱. قرارگیری وسط منوی اصلی فقط در حالت دسکتاپ (بالای ۷۶۸ پیکسل)
   ========================================================================== */
@media (min-width: 769px) {
    .header-container {
        position: relative;
    }

    .main-nav {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
}

