/* ======================================== Terms ======================================== */
/* ==================== LEGAL PAGE LAYOUT ==================== */
.legal-wrapper {
    background: #f8fbfa;
    padding: 60px 0 100px;
    min-height: 100vh;
}

.legal-header {
    text-align: center;
    margin-bottom: 50px;
}

.legal-header h1 {
    font-size: 2.5rem;
    color: #0f2b3d;
    font-weight: 800;
    margin-bottom: 10px;
}

.legal-header p {
    font-size: 0.9rem;
    color: #7a96a0;
}

.legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
}

/* ==================== SIDEBAR ==================== */
.sidebar-sticky {
    position: sticky;
    top: 100px;
    background: white;
    padding: 25px 20px;
    border-radius: 20px;
    border: 1px solid #eef2f6;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.03);
}

.sidebar-sticky h4 {
    color: #0f2b3d;
    margin-bottom: 20px;
    font-size: 1.1rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #f4f9f7;
}

.legal-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-nav li {
    margin-bottom: 5px;
}

.legal-nav a {
    display: block;
    padding: 10px 12px;
    color: #4a6f7c;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.legal-nav a:hover, .legal-nav a.active {
    background: #e5f4ee;
    color: #1e6f5c;
    font-weight: 700;
}

/* ==================== MAIN CONTENT ==================== */
.legal-content {
    background: white;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid #eef2f6;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.02);
}

.legal-intro {
    background: #f4f9f7;
    padding: 20px;
    border-radius: 12px;
    border-right: 4px solid #1e6f5c;
    margin-bottom: 40px;
}

.legal-intro p {
    margin: 0;
    color: #2c4b5a;
    line-height: 1.8;
}

.legal-section {
    margin-bottom: 40px;
    scroll-margin-top: 100px;
}

.legal-section h2 {
    font-size: 1.3rem;
    color: #0f2b3d;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f6;
}

.legal-section p {
    color: #4a6f7c;
    line-height: 1.9;
    font-size: 0.95rem;
    margin-bottom: 15px;
    text-align: justify;
}

.legal-section ul {
    padding-right: 20px;
    margin-bottom: 15px;
}

.legal-section li {
    color: #4a6f7c;
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.legal-section li::marker {
    color: #1e6f5c;
}

/* باکس‌های هشدار */
.legal-alert {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.legal-alert.warning {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    color: #e65100;
}

.legal-alert i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.legal-alert strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1rem;
}

.legal-alert p {
    margin: 0;
    color: #e65100;
    font-size: 0.9rem;
}

/* بخش پایانی */
.legal-footer-contact {
    background: #0f2b3d;
    color: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    margin-top: 50px;
}

.legal-footer-contact p {
    margin: 0;
    color: #d0e5dd;
    line-height: 1.8;
    font-size: 0.95rem;
}

.legal-footer-contact strong {
    color: white;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }
    .sidebar-sticky {
        position: static;
        margin-bottom: 20px;
    }
    .legal-content {
        padding: 25px 20px;
    }
}

/* ======================================== Privacy ======================================== */
/* ==================== LEGAL / PRIVACY PAGE LAYOUT ==================== */
.legal-wrapper {
    background: #f8fbfa;
    padding: 60px 0 100px;
    min-height: 100vh;
}

.legal-header {
    text-align: center;
    margin-bottom: 50px;
}

.legal-header h1 {
    font-size: 2.5rem;
    color: #0f2b3d;
    font-weight: 800;
    margin-bottom: 10px;
}

.legal-header p {
    font-size: 0.9rem;
    color: #7a96a0;
}

/* ==================== LAYOUT (DESKTOP) ==================== */
.legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr; /* منو سمت راست، محتوا سمت چپ */
    gap: 40px;
    align-items: start;
}

/* ==================== SIDEBAR ==================== */
.sidebar-sticky {
    position: sticky;
    top: 100px; /* فاصله از هدر هنگام اسکرول */
    background: white;
    padding: 25px 20px;
    border-radius: 20px;
    border: 1px solid #eef2f6;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.03);
}

.sidebar-sticky h4 {
    color: #0f2b3d;
    margin-bottom: 20px;
    font-size: 1.1rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #f4f9f7;
}

.legal-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-nav li {
    margin-bottom: 5px;
}

.legal-nav a {
    display: block;
    padding: 10px 12px;
    color: #4a6f7c;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.legal-nav a:hover, .legal-nav a.active {
    background: #e5f4ee;
    color: #1e6f5c;
    font-weight: 700;
}

/* ==================== MAIN CONTENT ==================== */
.legal-content {
    background: white;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid #eef2f6;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.02);
}

.legal-intro {
    background: #f4f9f7;
    padding: 20px;
    border-radius: 12px;
    border-right: 4px solid #1e6f5c;
    margin-bottom: 40px;
}

.legal-intro p {
    margin: 0;
    color: #2c4b5a;
    line-height: 1.8;
}

.legal-section {
    margin-bottom: 40px;
    scroll-margin-top: 100px; /* جلوگیری از رفتن متن زیر هدر موقع کلیک روی لینک */
}

.legal-section h2 {
    font-size: 1.3rem;
    color: #0f2b3d;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f6;
}

.legal-section p {
    color: #4a6f7c;
    line-height: 1.9;
    font-size: 0.95rem;
    margin-bottom: 15px;
    text-align: justify;
}

.legal-section ul {
    padding-right: 20px;
    margin-bottom: 15px;
}

.legal-section li {
    color: #4a6f7c;
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.legal-section li::marker {
    color: #1e6f5c;
}

/* بخش پایانی */
.legal-footer-contact {
    background: #0f2b3d;
    color: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    margin-top: 50px;
}

.legal-footer-contact p {
    margin: 0;
    color: #d0e5dd;
    line-height: 1.8;
    font-size: 0.95rem;
}

.legal-footer-contact strong {
    color: white;
}

/* ==================== RESPONSIVE (MOBILE & TABLET) ==================== */
@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr; /* تبدیل به یک ستونه */
    }
    
    .sidebar-sticky {
        position: static; /* منو از حالت چسبان خارج می‌شود */
        margin-bottom: 20px;
    }
    
    .legal-content {
        padding: 25px 20px;
    }
}

@media (max-width: 600px) {
    .legal-header h1 {
        font-size: 1.8rem;
    }
    
    .legal-content {
        padding: 20px 15px;
        border-radius: 16px;
    }
    
    .legal-section h2 {
        font-size: 1.15rem;
    }
    
    .legal-section p, .legal-section li {
        font-size: 0.9rem;
        text-align: right; /* در موبایل justify خیلی کشیده می‌شود، راست‌چین بهتر است */
    }
}

/* ======================================== Help ======================================== */
/* ==================== HELP PAGE LAYOUT ==================== */
.help-wrapper {
    background: #f8fbfa;
    padding: 60px 0 100px;
    min-height: 100vh;
}

.help-header {
    text-align: center;
    margin-bottom: 60px;
}

.help-header h1 {
    font-size: 2.5rem;
    color: #0f2b3d;
    font-weight: 800;
    margin-bottom: 15px;
}

.help-header p {
    font-size: 1.1rem;
    color: #7a96a0;
}

.help-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    align-items: start;
}

/* ==================== SIDEBAR NAVIGATION ==================== */
.sidebar-sticky {
    position: sticky;
    top: 100px;
    background: white;
    padding: 25px 20px;
    border-radius: 20px;
    border: 1px solid #eef2f6;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.03);
}

.sidebar-sticky h4 {
    color: #0f2b3d;
    margin-bottom: 20px;
    font-size: 1.1rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #f4f9f7;
}

.help-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-nav li {
    margin-bottom: 8px;
}

.help-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #4a6f7c;
    text-decoration: none;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.help-nav a:hover, .help-nav a.active {
    background: #e5f4ee;
    color: #1e6f5c;
}

.help-nav a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* ==================== MAIN CONTENT ==================== */
.help-content {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.help-section {
    background: white;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid #eef2f6;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.02);
    scroll-margin-top: 100px; /* فاصله از هدر وقتی با # اسکرول می‌شود */
}

.section-title-area {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.sec-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.help-section h2 {
    font-size: 1.6rem;
    color: #0f2b3d;
    margin: 0;
}

.section-desc {
    color: #7a96a0;
    font-size: 1rem;
    margin-bottom: 30px;
}

/* ==================== STEPS & MOCKUPS ==================== */
.steps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.step-card {
    background: #f8fbfa;
    padding: 25px;
    border-radius: 16px;
    border: 1px dashed #cbdde0;
    position: relative;
}

.step-number {
    position: absolute;
    top: -15px;
    right: 20px;
    width: 30px;
    height: 30px;
    background: #1e6f5c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(30,111,92,0.3);
}

.step-card h3 {
    font-size: 1.1rem;
    color: #0f2b3d;
    margin-bottom: 10px;
    margin-top: 5px;
}

.step-card p {
    font-size: 0.9rem;
    color: #4a6f7c;
    line-height: 1.7;
}

/* ماکاپ‌های شبیه ساز رابط کاربری */
.mockup-box {
    margin-top: 15px;
    background: white;
    border: 1px solid #eef2f6;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.mock-input {
    background: #f4f9f7;
    border: 1px solid #cbdde0;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #7a96a0;
    margin-bottom: 8px;
}

.mock-btn {
    background: #1e6f5c;
    color: white;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
}

.mock-btn-highlight {
    background: #ff8c42;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(255,140,66,0.3);
}

/* راهنمای گام به گام (متنی) */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.g-step {
    display: flex;
    gap: 15px;
    background: #f8fbfa;
    padding: 15px;
    border-radius: 12px;
    align-items: flex-start;
}

.g-num {
    background: #e5f4ee;
    color: #1e6f5c;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.g-text {
    font-size: 0.95rem;
    color: #2c4b5a;
    line-height: 1.7;
    margin-top: 3px;
}

.g-text strong {
    color: #0f2b3d;
}

/* ماکاپ فرم */
.ui-mockup {
    background: #f9fdfb;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    overflow: hidden;
    max-width: 400px;
}
.mock-form-header {
    background: #e5f4ee;
    color: #1e6f5c;
    padding: 12px 20px;
    font-weight: bold;
    font-size: 0.9rem;
    border-bottom: 1px solid #cbdde0;
}
.mock-form-body {
    padding: 20px;
}
.mock-row {
    margin-bottom: 15px;
}
.mock-row label {
    display: block;
    font-size: 0.8rem;
    color: #4a6f7c;
    margin-bottom: 5px;
    font-weight: 600;
}
.mock-select {
    background: white;
    border: 1px solid #cbdde0;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
}
.mock-cursor {
    width: 2px;
    height: 15px;
    background: #1e6f5c;
    margin-left: 2px; /* فاصله کمی از عدد */
    animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* کد بلاک */
.sub-title {
    color: #0f2b3d;
    margin: 20px 0 10px;
}
.code-block {
    background: #0f2b3d;
    border-radius: 12px;
    padding: 20px;
    overflow-x: auto;
}
.code-block pre {
    margin: 0;
    color: #a2bcc4;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

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

/* تبلت و موبایل‌های بزرگ (عرض کمتر از ۹۰۰ پیکسل) */
@media (max-width: 900px) {
    .help-wrapper {
        padding: 40px 0 60px; /* کاهش فاصله کلی صفحه */
    }
    
    .help-header h1 {
        font-size: 2rem;
    }
    
    .help-layout {
        grid-template-columns: 1fr; /* تبدیل به یک ستونه */
        gap: 25px;
    }
    
    .sidebar-sticky {
        position: static; /* خارج کردن منو از حالت چسبان */
        margin-bottom: 10px;
    }
    
    .help-section {
        padding: 25px; /* کاهش پدینگ کارت‌های راهنما */
    }
    
    .steps-grid {
        grid-template-columns: 1fr; /* کارت‌های شروع زیر هم قرار بگیرند */
    }
}

/* موبایل‌های معمولی و کوچک (عرض کمتر از ۶۰۰ پیکسل) */
@media (max-width: 600px) {
    .help-wrapper {
        padding: 30px 0 40px;
        overflow-x: hidden; /* جلوگیری از اسکرول افقی کل صفحه */
    }
    
    .help-header {
        margin-bottom: 30px;
        padding: 0 15px; /* فاصله از لبه‌های صفحه */
    }
    
    .help-header h1 {
        font-size: 1.6rem;
    }
    
    .help-header p {
        font-size: 0.95rem;
    }

    .help-layout {
        grid-template-columns: 1fr;
        /* این دو خط بسیار مهم هستند تا گرید از صفحه بیرون نزند */
        min-width: 0; 
        width: 100%;
    }

    .help-content {
        min-width: 0; /* جلوگیری از سرریز شدن محتوا در گرید */
        width: 100%;
    }

    .help-section {
        padding: 20px 15px;
        border-radius: 16px;
        overflow: hidden; /* جلوگیری از بیرون زدن محتوای داخلی */
    }

    .help-section h2 {
        font-size: 1.3rem;
    }
    
    .sec-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        border-radius: 10px;
    }

    .section-title-area {
        gap: 10px;
    }

    /* ==================== FIX TEXT OVERFLOW ==================== */
    .section-desc, .g-text, .step-card p {
        /* این دستور باعث می‌شود کلمات یا لینک‌های طولانی به خط بعد بروند */
        word-break: break-word; 
        overflow-wrap: anywhere;
    }

    .g-text code {
        word-break: break-all; /* برای لینک‌های داخل تگ code */
    }
    /* ========================================================= */

    .step-card {
        padding: 15px;
    }
    
    .g-step {
        padding: 12px;
        gap: 10px;
    }

    .g-num {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .g-text {
        font-size: 0.85rem;
    }

    /* ریسپانسیو کردن ماکاپ فرم تلگرام */
    .ui-mockup {
        max-width: 100%; 
    }
    
    .mock-form-header {
        padding: 10px 15px;
    }
    
    .mock-form-body {
        padding: 15px;
    }

    /* کد بلاک وب‌هوک */
    .code-block {
        max-width: 100%; /* محدود کردن عرض کد بلاک */
        padding: 15px;
        border-radius: 8px;
        overflow-x: auto; /* فقط خود کد بلاک اسکرول بخورد، نه کل صفحه */
    }
    
    .code-block pre {
        font-size: 0.8rem;
    }
}

/* ======================================== Faq ======================================== */
/* ==================== FAQ LAYOUT ==================== */
.faq-wrapper {
    background: #f8fbfa;
    padding: 60px 0 100px;
    min-height: 100vh;
}

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

.faq-header h1 {
    font-size: 2.5rem;
    color: #0f2b3d;
    font-weight: 800;
    margin-bottom: 15px;
}

.faq-header p {
    font-size: 1.1rem;
    color: #7a96a0;
    margin-bottom: 30px;
}

/* باکس جستجو */
.faq-search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.faq-search-box i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a96a0;
    font-size: 1.2rem;
}

.faq-search-box input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border-radius: 50px;
    border: 1.5px solid #cbdde0;
    font-family: inherit;
    font-size: 1rem;
    background: white;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.faq-search-box input:focus {
    outline: none;
    border-color: #1e6f5c;
    box-shadow: 0 10px 30px -5px rgba(30,111,92,0.15);
}

/* ==================== LAYOUT ==================== */
.faq-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 60px;
}

/* ==================== SIDEBAR ==================== */
.sidebar-sticky {
    position: sticky;
    top: 100px;
    background: white;
    padding: 25px 20px;
    border-radius: 20px;
    border: 1px solid #eef2f6;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.03);
}

.sidebar-sticky h4 {
    color: #0f2b3d;
    margin-bottom: 20px;
    font-size: 1.1rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #f4f9f7;
}

.faq-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-nav li {
    margin-bottom: 8px;
}

.faq-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #4a6f7c;
    text-decoration: none;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.faq-nav a:hover, .faq-nav a.active {
    background: #e5f4ee;
    color: #1e6f5c;
}

.faq-nav a i {
    width: 20px;
    text-align: center;
}

/* ==================== ACCORDION CONTENT ==================== */
.faq-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.faq-category-title {
    font-size: 1.4rem;
    color: #0f2b3d;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eef2f6;
    scroll-margin-top: 100px;
}

.faq-category-title i {
    color: #1e6f5c;
}

/* آکاردئون ها */
.faq-item {
    background: white;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: 0.3s;
}

.faq-item[open] {
    border-color: #cbdde0;
    box-shadow: 0 10px 25px -10px rgba(0,0,0,0.05);
}

.faq-item summary {
    padding: 20px 25px;
    font-weight: 700;
    color: #2c4b5a;
    font-size: 1.05rem;
    cursor: pointer;
    list-style: none; /* حذف فلش پیش‌فرض */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

.faq-item summary::-webkit-details-marker {
    display: none; /* حذف فلش در سافاری */
}

.faq-item summary::after {
    content: '\f078'; /* آیکون chevron-down */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.8rem;
    color: #7a96a0;
    transition: transform 0.3s ease;
}

.faq-item[open] summary {
    color: #1e6f5c;
    background: #f9fdfb;
    border-bottom: 1px solid #eef2f6;
}

.faq-item[open] summary::after {
    transform: rotate(180deg);
    color: #1e6f5c;
}

.faq-answer {
    padding: 20px 25px;
    color: #4a6f7c;
    font-size: 0.95rem;
    line-height: 1.8;
    background: white;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== CTA ==================== */
.faq-cta {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid #eef2f6;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.03);
}

.faq-cta h3 {
    font-size: 1.5rem;
    color: #0f2b3d;
    margin-bottom: 10px;
}

.faq-cta p {
    color: #7a96a0;
    margin-bottom: 20px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .faq-layout {
        grid-template-columns: 1fr;
    }
    .sidebar-sticky {
        position: static;
        margin-bottom: 20px;
    }
}
