/* ============================================================
   فونت‌های IRANSansXFaNum (اعداد فارسی)
   ============================================================ */
@font-face {
    font-family: 'IRANSansXFaNum';
    src: url('../fonts/Farsi numerals/IRANSansXFaNum-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSansXFaNum';
    src: url('../fonts/Farsi numerals/IRANSansXFaNum-UltraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSansXFaNum';
    src: url('../fonts/Farsi numerals/IRANSansXFaNum-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSansXFaNum';
    src: url('../fonts/Farsi numerals/IRANSansXFaNum-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSansXFaNum';
    src: url('../fonts/Farsi numerals/IRANSansXFaNum-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSansXFaNum';
    src: url('../fonts/Farsi numerals/IRANSansXFaNum-DemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSansXFaNum';
    src: url('../fonts/Farsi numerals/IRANSansXFaNum-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSansXFaNum';
    src: url('../fonts/Farsi numerals/IRANSansXFaNum-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSansXFaNum';
    src: url('../fonts/Farsi numerals/IRANSansXFaNum-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   متغیرها و تنظیمات پایه
   ============================================================ */
:root {
    --primary: #2c76c0;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --bg: #f6f8fc;
    --card-bg: #ffffff;
    --border: #e9edf4;
    --text: #1e293b;
    --text-muted: #64748b;
    --shadow: 0 12px 30px rgba(0,0,0,0.06);
    --radius: 20px;
    --font-main: 'IRANSansXFaNum', 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-code: 'JetBrains Mono', 'Fira Code', monospace;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    padding-top: 85px;
    line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
mb-0 { margin: 0 !important; }

/* ============================================================
   کدها و مونوفونت‌ها
   ============================================================ */
code,
pre,
.endpoint-box,
.param-table .param-type,
.example-box pre {
    font-family: var(--font-code);
    font-size: 0.9rem;
    font-weight: 400;
}
code {
    font-size: 0.9rem !important;
    font-weight: bold;
}

/* ============================================================
   نوار ناوبری (شیشه‌ای)
   ============================================================ */
.nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
ul.nav {
    display: flex;
    flex-direction: column;
    margin-top: 0.25rem;
    gap: 0.5rem;
}
ul.navbar-nav {
    gap: 1rem;
}
.navbar-glass {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 0.5rem 1.5rem;
}
.navbar-glass .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}
.navbar-glass .navbar-brand i {
    margin-left: 8px;
    color: var(--primary);
}
.navbar-glass .nav-link {
    font-weight: 500;
    color: var(--text-muted) !important;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    transition: 0.2s;
}
.navbar-glass .nav-link:hover {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary) !important;
}
.badge-api {
    background: var(--primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

/* ============================================================
   نوار کناری (سایدبار)
   ============================================================ */
.sidebar {
    position: sticky;
    top: 85px;
    height: calc(100vh - 90px);
    overflow-y: auto;
    background: var(--card-bg);
    border-left: 1px solid var(--border);
    padding: 1.2rem 0.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.sidebar .nav-link {
    color: var(--text-muted);
    font-weight: bold;
    font-size: 1rem;
    padding: 0.65rem 1rem;
    border-radius: 6px;
    transition: 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar .nav-link i {
    width: 20px;
    font-size: 0.9rem;
    color: var(--primary-light);
}
.sidebar .nav-link:hover {
    background: #f1f4fe;
    color: var(--primary);
}
.sidebar .nav-link.active {
    background: var(--primary);
    color: #fff;
}
.sidebar .nav-link.active i {
    color: #fff;
}
.sidebar .nav .nav {
    padding-right: 1.8rem;
}
.sidebar .nav .nav .nav-link {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
    font-weight: bold;
}
.sidebar .nav .nav .nav-link i {
    font-size: 0.6rem;
    color: #94a3b8;
}

/* ============================================================
   محتوای اصلی
   ============================================================ */
.section-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem 2rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.5);
    transition: 0.2s;
}
.section-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
}
.basic-address {
    font-size: 1rem;
    display: flex;
    width: 100%;
    justify-content: space-between;
}
.w-full {
    width: 100%;
}
.text-left {
    text-align: left;
}
.text-right {
    text-align: right;
}
.justify-between {
    display: flex;
    justify-content: space-between;
}
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-title i {
    color: var(--primary);
    font-size: 2rem;
}
.lead {
    font-size: 1rem !important;
}
.subtitle {
    font-size: 0.9rem !important;
}
.method-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.method-title .badge-method {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: #e2e8f0;
    color: #1e293b;
    letter-spacing: 0.3px;
}
.badge-get {
    background: #0b8a4e !important;
    color: #fff !important;
}
.endpoint-box {
    background: #f1f4fe;
    border-radius: 6px;
    padding: 0.8rem 1.2rem;
    font-family: var(--font-code);
    font-size: 0.9rem;
    direction: ltr;
    text-align: left;
    border: 1px solid #dce3f0;
    margin: 0.5rem 0 1.2rem 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.endpoint-box .method-badge {
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.param-table {
    font-size: 0.9rem;
    border-collapse: separate;
    border-spacing: 0 4px;
}
.param-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text);
    border: none;
    padding: 0.7rem 1rem;
}
.param-table td {
    border: none;
    padding: 0.7rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f4fe;
}
.param-table .param-name {
    font-weight: bold;
    color: var(--primary-dark);
}
.param-table .param-type {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: #7c3aed;
    font-weight: bold;
}
.param-required {
    background: #fee2e2;
    color: #b91c1c;
    padding: 0.7rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}
.param-optional {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
}
.example-box {
    background: #1e293b;
    border-radius: 6px;
    padding: 1.2rem 1.5rem;
    margin-top: 0.8rem;
    overflow-x: auto;
}
.example-box pre {
    margin: 0;
    background: transparent;
    color: #e2e8f0;
    font-size: 0.85rem;
    font-family: var(--font-code);
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
}
.example-box .label {
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}
.alert-note {
    background: #f0f7ff;
    border-right: 4px solid var(--primary);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    color: #1e293b;
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* ============================================================
   اسکرول‌بار سایدبار
   ============================================================ */
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #d1d9e6; border-radius: 10px; }

/* ============================================================
   پاسخگویی (Responsive)
   ============================================================ */
@media (max-width: 992px) {
    .sidebar {
        position: relative;
        top: 0;
        height: auto;
        margin-bottom: 2rem;
        border-left: 0;
        border-bottom: 1px solid var(--border);
        border-radius: 16px;
    }
}
@media (max-width: 576px) {
    .section-card { padding: 1.2rem; }
    .endpoint-box { font-size: 0.75rem; padding: 0.6rem 1rem; }
    .method-title { font-size: 1.1rem; }
}
pre code { background: transparent; }
code { width: 100%; }