/* ============================================
   تعریف فونت وزیرمتن (Vazirmatn) - لوکال
   ============================================ */

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/Vazirmatn-SemiBold.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 800;
    src: url('../fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-display: swap;
}

/* ============================================
   تنظیمات پایه
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    min-height: 100vh;
}

/* نمایش اعداد به صورت فارسی */
body, .card, .table, input, button, span, div, p, h1, h2, h3, h4, h5, h6,
.form-control, .form-select, .alert, .btn, .school-card {
    font-feature-settings: "ss02";
    font-variant-numeric: tabular-nums;
}

/* ============================================
   نوار بالای صفحه
   ============================================ */

.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.top-nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-brand:hover {
    color: #2563eb;
}

/* ============================================
   کارت اصلی
   ============================================ */

.main-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 32px;
    margin-top: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.main-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

/* ============================================
   دکمه جستجو
   ============================================ */

.btn-search {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 10px 24px;
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.3);
    color: white;
}

/* ============================================
   کارت مدرسه
   ============================================ */

.school-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.school-card:hover {
    transform: translateX(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #2563eb;
}

.school-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.school-info {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.school-info i {
    width: 20px;
    color: #2563eb;
}

/* ============================================
   نقشه
   ============================================ */

.map-container {
    height: 380px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.leaflet-container {
    font-family: 'Vazirmatn', sans-serif;
    border-radius: 20px;
}

.leaflet-popup-content {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    text-align: right;
}

/* ============================================
   فرم‌ها
   ============================================ */

.form-control, .form-select {
    font-family: 'Vazirmatn', sans-serif;
    border-radius: 14px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    background: white;
    transition: all 0.2s ease;
    direction: rtl;
}

.form-control:focus, .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* ============================================
   هشدارها
   ============================================ */

.alert {
    border-radius: 16px;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-warning {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    color: #9a3412;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

/* ============================================
   فوتر
   ============================================ */

.footer {
    background: white;
    border-top: 1px solid #e2e8f0;
    margin-top: 60px;
    padding: 24px 0;
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
}

/* ============================================
   دکمه‌های کمکی
   ============================================ */

.btn-outline-glass {
    background: transparent;
    border: 2px solid rgba(37, 99, 235, 0.3);
    border-radius: 50px;
    padding: 8px 20px;
    color: #2563eb;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-glass:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* ============================================
   ریسپانسیو
   ============================================ */

@media (max-width: 768px) {
    .main-card {
        padding: 20px;
    }
    .map-container {
        height: 280px;
    }
    .btn-search {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    .school-name {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .main-card {
        padding: 16px;
    }
    .form-control, .form-select {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

/* ============================================
   انیمیشن‌ها
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* ============================================
   اسکرول بار
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border-radius: 10px;
}

/* ============================================
   کلاس‌های کمکی
   ============================================ */

.text-gradient {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center {
    text-align: center;
}

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }