/*
 * 🩸 شريان الحياة - النظام البصري الأساسي (LifeVein Premium CSS System)
 * مصمم خصيصاً ليحاكي واجهات تطبيقات الهواتف المحمولة فائقة الأناقة والسرعة.
 * جميع التنسيقات تمت كتابتها بعناية لتحقيق تجربة مستخدم مذهلة وسلسة.
 */

/* ----------------------------------------------------
 * 🔤 تعريف الخطوط المحلية (Local Font Face Declarations)
 * ---------------------------------------------------- */

/* خط Cairo (العربي) */
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/cairo-400.woff2') format('woff2');
}

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

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

/* خط Outfit (الإنجليزي للأرقام والنصوص اللاتينية) */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/outfit-400.woff2') format('woff2');
}

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

/* ----------------------------------------------------
 * 🎨 1. متغيرات النظام البصري (Design Tokens)
 * ---------------------------------------------------- */
:root {
    /* لوحة الألوان */
    --color-primary: #e11d48;         /* لون الدم القرمزي */
    --color-primary-hover: #be123c;   /* قرمزي داكن عند التمرير */
    --color-primary-glow: rgba(225, 29, 72, 0.4);
    
    --color-bg-light: #f8fafc;        /* رمادي دافئ خفيف جداً للخلفية */
    --color-surface-light: #ffffff;   /* لون الأسطح والبطاقات */
    --color-border-light: #e2e8f0;    /* لون الحدود الخفيفة */
    --color-text-main: #0f172a;       /* لون النصوص الرئيسي */
    --color-text-muted: #64748b;      /* لون النصوص الثانوية */
    
    /* النظام الزجاجي (Glassmorphism) */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: 16px;
    --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.08);
    
    /* خطوط وتنسيقات */
    --font-arabic: 'Cairo', sans-serif;
    --border-radius-lg: 20px;
    --border-radius-md: 14px;
    --border-radius-sm: 8px;
    
    /* فترات الحركات */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----------------------------------------------------
 * 🚀 2. نظام التحميل المسبق الفخم (Premium Preloader)
 * ---------------------------------------------------- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0f172a; /* خلفية داكنة غامضة وفخمة عند البداية */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* حركة نبض قطرة الدم */
.blood-droplet-loader {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 0 15px var(--color-primary-glow));
    animation: heartBeat 1.4s ease-in-out infinite;
}

.blood-droplet-loader svg {
    width: 100%;
    height: 100%;
    fill: var(--color-primary);
}

/* شريط التحميل الدائري الفخم */
.loader-spinner {
    position: relative;
    width: 50px;
    height: 50px;
}

.loader-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

.preloader-text {
    font-family: var(--font-arabic);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 10px;
    animation: pulseText 1.5s ease-in-out infinite;
}

/* ----------------------------------------------------
 * 📱 3. شريط التنقل السفلي الفخم (Bottom App Bar)
 * ---------------------------------------------------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 999;
    transition: transform var(--transition-normal);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    text-decoration: none;
    font-family: var(--font-arabic);
    font-size: 0.75rem;
    font-weight: 700;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all var(--transition-fast);
    position: relative;
    padding: 6px 4px;
    flex: 1;
    text-align: center;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.2;
}

/* تأثير عند الضغط واللمس النشط */
.bottom-nav-item:active {
    transform: scale(0.92);
}

.bottom-nav-item.active {
    color: var(--color-primary);
}

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--color-primary);
}

/* الزر الدائري البارز في المنتصف (إضافة متبرع) */
.bottom-nav-center {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary), #be123c);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    box-shadow: 0 4px 16px var(--color-primary-glow);
    transform: translateY(-12px);
    border: 4px solid #ffffff;
    transition: all var(--transition-fast);
    z-index: 10;
    flex-shrink: 0;
}

.bottom-nav-center svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.5;
}

.bottom-nav-center:hover {
    transform: translateY(-14px);
    box-shadow: 0 6px 20px var(--color-primary-glow);
}

.bottom-nav-center:active {
    transform: translateY(-8px) scale(0.92);
}

/* ----------------------------------------------------
 * ↕️ 4. نظام النوافذ المنبثقة من الأسفل (Bottom Sheets)
 * ---------------------------------------------------- */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal);
}

.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: fixed;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    background-color: var(--color-surface-light);
    border-top-left-radius: var(--border-radius-lg);
    border-top-right-radius: var(--border-radius-lg);
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.15);
    z-index: 1001;
    padding: 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    transition: bottom var(--transition-normal);
    font-family: var(--font-arabic);
}

.bottom-sheet.active {
    bottom: 0;
}

/* المقبض العلوي لسحب النافذة */
.bottom-sheet-drag-handle {
    width: 40px;
    height: 5px;
    background-color: var(--color-border-light);
    border-radius: 3px;
    margin: 0 auto 20px auto;
    cursor: pointer;
}

/* ----------------------------------------------------
 * 🎞️ 5. الحركات والأنيميشن (Animations)
 * ---------------------------------------------------- */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseText {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* تهيئة الهيكل الأساسي للجسم والموقع */
body {
    background-color: var(--color-bg-light);
    color: var(--color-text-main);
    font-family: var(--font-arabic);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* لتفادي تداخل المحتوى مع شريط التنقل السفلي في شاشات الجوال */
main {
    padding-bottom: 110px;
    padding-top: 20px;
}

/* ----------------------------------------------------
 * 🔍 6. نظام محرك البحث التفاعلي (Search Hub Styling)
 * ---------------------------------------------------- */
.search-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* كارت تصفية وحقل البحث الرئيسي */
.search-header-card {
    background-color: var(--color-surface-light);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    border: 1px solid var(--color-border-light);
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.search-header-card h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-main);
    text-align: center;
}

.search-subtitle {
    margin: -10px 0 10px 0;
    font-size: 0.95rem;
    color: var(--color-primary);
    font-weight: 700;
    text-align: center;
}

/* شبكة الفلاتر التفاعلية */
.filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-item label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-crimson {
    color: var(--color-primary);
    width: 16px;
    height: 16px;
}

.custom-select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    padding: 0 12px;
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px;
}

.custom-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

/* حقل البحث بالاسم */
.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.custom-search-input {
    width: 100%;
    height: 52px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    padding: 0 16px;
    padding-right: 48px;
    font-family: var(--font-arabic);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
    outline: none;
    box-sizing: border-box;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.custom-search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
    background-color: #ffffff;
}

/* شريط حالة التوثيق وأمن البيانات */
.verification-status-bar {
    width: 100%;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
}

.status-badge svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.status-badge.unverified {
    background-color: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #b45309;
}

.status-badge.verified {
    background-color: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #047857;
}

.btn-reset-auth {
    background: none;
    border: none;
    color: #ef4444;
    padding: 4px;
    border-radius: 8px;
    cursor: pointer;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.btn-reset-auth:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

/* ----------------------------------------------------
 * 🎴 7. كروت نتائج المتبرعين (Donor App Cards)
 * ---------------------------------------------------- */
.results-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: 14px;
    padding: 0 4px;
}

.results-stats svg {
    width: 16px;
    height: 16px;
}

.donors-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* تصميم كارت المتبرع بلمسات الموبايل */
.donor-app-card {
    background-color: var(--color-surface-light);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.02);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.donor-app-card:active {
    transform: scale(0.98);
}

/* إذا كان المتبرع خارج البلاد */
.donor-app-card.abroad {
    border-color: rgba(226, 232, 240, 0.6);
    background-color: rgba(248, 250, 252, 0.6);
}

/* شارة فصيلة الدم الدائرية النابضة بالحياة */
.donor-blood-badge {
    width: 56px;
    height: 56px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--color-primary-glow);
}

.blood-type {
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    z-index: 2;
}

.pulse-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--color-primary);
    opacity: 0.3;
    animation: badgePulse 2s infinite;
    z-index: 1;
}

/* معلومات المتبرع */
.donor-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.donor-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-text-main);
}

.donor-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-meta {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background-color: var(--color-bg-light);
    padding: 4px 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tag-meta svg {
    width: 12px;
    height: 12px;
}

.active-tag {
    color: #047857;
    background-color: rgba(16, 185, 129, 0.08);
}

.abroad-tag {
    color: #1d4ed8;
    background-color: rgba(59, 130, 246, 0.08);
}

.text-abroad-muted {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
    padding: 8px 12px;
}

/* أزرار الاتصال والتواصل */
.donor-action {
    display: flex;
    gap: 8px;
}

.btn-action {
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    font-family: var(--font-arabic);
    font-size: 0.82rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.btn-action:active {
    transform: scale(0.92);
}

.btn-action.call {
    background-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-action.whatsapp {
    background-color: #22c55e;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.btn-action.verify-to-see {
    background-color: var(--color-bg-light);
    color: var(--color-text-main);
    border: 1px solid var(--color-border-light);
}

.btn-action.verify-to-see:hover {
    background-color: var(--color-border-light);
}

/* شاشة لا نتائج */
.no-results-card {
    text-align: center;
    background-color: var(--color-surface-light);
    border-radius: var(--border-radius-lg);
    padding: 40px 24px;
    border: 1px dashed var(--color-border-light);
    color: var(--color-text-muted);
}

.no-results-icon {
    width: 48px;
    height: 48px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.no-results-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text-main);
}

.no-results-card p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ----------------------------------------------------
 * 🔐 8. نظام الـ OTP الذكي الفريد (Smart iOS OTP UI)
 * ---------------------------------------------------- */
.otp-modal-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.otp-logo {
    width: 64px;
    height: 64px;
    background-color: rgba(225, 29, 72, 0.08);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(225, 29, 72, 0.05);
}

.icon-glow-shield {
    color: var(--color-primary);
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 8px var(--color-primary-glow));
}

.otp-modal-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-text-main);
}

.otp-desc {
    margin: 0 0 24px 0;
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    max-width: 340px;
}

/* تنبيهات النجاح والفشل داخل المودال */
.otp-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 18px;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: right;
}

.otp-alert.error {
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.otp-alert.success {
    background-color: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #15803d;
}

.otp-alert svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* حقول المدخلات */
.otp-form-group {
    width: 100%;
    text-align: right;
    margin-bottom: 20px;
}

.otp-form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    display: block;
}

/* مدخل رقم الهاتف المخصص */
.input-phone-container {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    height: 52px;
    background-color: var(--color-bg-light);
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-phone-container:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
    background-color: #ffffff;
}

.phone-country-code {
    padding: 0 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-muted);
    border-left: 1px solid var(--color-border-light);
    background-color: rgba(15, 23, 42, 0.02);
    height: 100%;
    display: flex;
    align-items: center;
}

.custom-phone-input {
    flex-grow: 1;
    border: none;
    background: none;
    height: 100%;
    padding: 0 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-main);
    outline: none;
}

/* شبكة صناديق OTP الستة الذكية (iOS Passcode style) */
.smart-otp-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    direction: ltr; /* اتجاه الكتابة من اليسار لليمين دائماً في الأرقام */
    margin: 16px 0;
}

.otp-box {
    width: 48px;
    height: 52px;
    border: 2px solid var(--color-border-light);
    border-radius: 12px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.otp-box:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
    background-color: #ffffff;
}

/* حركة التحميل والتأكيد الذكي */
.otp-box.loading-pulse {
    animation: boxPulse 0.8s infinite alternate;
    pointer-events: none;
    background-color: rgba(225, 29, 72, 0.02);
    border-color: var(--color-primary);
}

/* عداد تنازلي تفاعلي مع أيقونة */
.otp-countdown-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.timer-display svg {
    width: 14px;
    height: 14px;
    color: var(--color-primary);
}

.icon-pulse {
    animation: heartBeat 2s infinite;
}

.btn-resend {
    background: none;
    border: none;
    color: var(--color-primary);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background-color var(--transition-fast);
}

.btn-resend:hover:not(.disabled) {
    background-color: var(--color-primary-glow);
}

.btn-resend.disabled {
    color: var(--color-text-muted);
    opacity: 0.5;
    cursor: not-allowed;
}

/* الأزرار العملاقة */
.btn-primary-app {
    width: 100%;
    height: 52px;
    background-color: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius-md);
    font-family: var(--font-arabic);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px var(--color-primary-glow);
    transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.btn-primary-app:active {
    transform: scale(0.96);
    background-color: var(--color-primary-hover);
}

.btn-secondary-app {
    width: 100%;
    height: 48px;
    background: none;
    border: 1px solid var(--color-border-light);
    color: var(--color-text-main);
    border-radius: var(--border-radius-md);
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: background-color var(--transition-fast);
}

.btn-secondary-app:active {
    background-color: var(--color-bg-light);
}

.mt-4 { margin-top: 16px; }
.mt-2 { margin-top: 8px; }

/* ----------------------------------------------------
 * 🎞️ 9. المزيد من الحركات المتقدمة
 * ---------------------------------------------------- */
@keyframes badgePulse {
    0% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.15); opacity: 0.5; }
    100% { transform: scale(1); opacity: 0.3; }
}

@keyframes boxPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 var(--color-primary-glow); }
    100% { transform: scale(1.05); box-shadow: 0 0 10px 2px var(--color-primary-glow); }
}

/* تنسيق SweetAlert2 على ستايل التطبيقات الفاخرة */
.swal2-app-style {
    border-radius: 24px !important;
    padding: 24px !important;
    font-family: var(--font-arabic) !important;
}

.swal2-app-title {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: var(--color-text-main) !important;
    margin-top: 16px !important;
}

.swal2-app-button {
    font-family: var(--font-arabic) !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    border-radius: 14px !important;
    height: 48px !important;
    padding: 0 24px !important;
    box-shadow: 0 8px 20px var(--color-primary-glow) !important;
}

/* تنسيقات حقول إدخال الباحث الإضافية */
.required-field::after {
    content: " 🩸";
    color: var(--color-primary);
    font-size: 0.8rem;
    margin-right: 4px;
}

.input-with-icon-wrapper {
    position: relative;
    width: 100%;
}

.input-inline-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
    z-index: 5;
}

.padding-left-icon {
    padding-right: 44px !important; /* لإخلاء مساحة للأيقونة باليمين في الواجهة العربية */
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    height: 52px;
    background-color: var(--color-bg-light);
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-arabic);
    font-weight: 700;
    color: var(--color-text-main);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.padding-left-icon:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
    background-color: #ffffff;
}

.padding-left-icon-select {
    padding-right: 44px !important;
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    height: 52px;
    background-color: var(--color-bg-light);
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-arabic);
    font-weight: 700;
    color: var(--color-text-main);
    outline: none;
}

.otp-form-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.initial-search-state {
    padding: 60px 24px !important;
    border-color: rgba(225, 29, 72, 0.15) !important;
    background-color: rgba(225, 29, 72, 0.01) !important;
}

.blood-pulse-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(225, 29, 72, 0.08);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 8px 30px var(--color-primary-glow);
}

.icon-glow-heart {
    color: var(--color-primary);
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 10px var(--color-primary-glow));
    animation: heartBeat 1.8s infinite;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.12); }
    28% { transform: scale(1); }
    42% { transform: scale(1.12); }
    70% { transform: scale(1); }
}

/* ====================================================
   💎 10. تصميم الصفحة الرئيسية الاحترافية (Premium Landing UI)
   ==================================================== */
.landing-main-wrapper {
    width: 100%;
    margin: 0 auto;
    padding-bottom: 80px; /* لضمان ألا يغطي شريط التنقل السفلي المحتوى */
}

/* قسم البطل الرئيسي المضيء */
/* قسم البطل الرئيسي المضيء المستوحى من التصميم الكلاسيكي الأنيق */
.hero-landing-section {
    position: relative;
    width: 100%;
    padding: 90px 24px 90px 24px;
    
    /* مظهر الكلاسيك المطور: خلفية مكتبية مع غطاء قرمزي مظلم معتم */
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.78) 0%, rgba(136, 19, 55, 0.84) 100%), 
                url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=1200') no-repeat center/cover;
                
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-bg-glow {
    position: absolute;
    top: -20%;
    left: 30%;
    width: 300px;
    height: 300px;
    background-color: rgba(225, 29, 72, 0.05);
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    pointer-events: none;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* شارة الهيرو المتوهجة */
.hero-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    animation: badgePulse 1.5s infinite alternate;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: #ffffff; /* أبيض ناصع مثل الكلاسيك */
    line-height: 1.3;
    margin: 0 0 20px 0;
    font-family: var(--font-arabic);
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

.highlight-crimson {
    color: #fecdd3; /* وردي ناعم جداً للتأكيد على الفصيلة */
    position: relative;
    white-space: nowrap;
}

.hero-description {
    font-size: 1.15rem;
    color: #f1f5f9; /* فضي ناصع مريح للقراءة فوق الخلفية */
    line-height: 1.8;
    margin: 0 0 36px 0;
    max-width: 680px;
    font-weight: 600;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* أزرار الإجراء */
.hero-actions-flex {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 780px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* زر الانضمام كمتبرع - أبيض صلب بنص أسود */
.btn-hero-primary-classic {
    flex: 1;
    min-width: 250px;
    height: 58px;
    background-color: #ffffff;
    color: #0f172a;
    border: none;
    border-radius: 14px;
    font-family: var(--font-arabic);
    font-size: 1.05rem;
    font-weight: 900;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25),
                0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
}

.btn-hero-primary-classic:hover {
    background-color: #f8fafc;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.15),
                0 6px 15px rgba(0, 0, 0, 0.3);
}

.btn-hero-primary-classic:active {
    transform: scale(0.96) translateY(-1px);
}

/* زر البحث عن متبرع - شفاف بإطار أبيض ونص أبيض */
.btn-hero-secondary-classic {
    flex: 1;
    min-width: 250px;
    height: 58px;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 2.5px solid #ffffff;
    border-radius: 14px;
    font-family: var(--font-arabic);
    font-size: 1.05rem;
    font-weight: 900;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
}

.btn-hero-secondary-classic:hover {
    background-color: #ffffff;
    color: #0f172a;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.15),
                0 6px 15px rgba(0, 0, 0, 0.3);
}

.btn-hero-secondary-classic:active {
    transform: scale(0.96) translateY(-1px);
}

.btn-hero-tertiary {
    flex: 1;
    min-width: 220px;
    height: 56px;
    background-color: var(--color-surface-light);
    color: var(--color-text-main);
    border: 1px solid var(--color-border-light);
    border-radius: 16px;
    font-family: var(--font-arabic);
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.btn-hero-tertiary:active {
    transform: scale(0.96);
    background-color: var(--color-bg-light);
}

/* قسم كيفية العمل */
.how-it-works-landing {
    padding: 60px 24px 80px 24px;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
}

.steps-grid-landing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.step-card {
    background-color: var(--color-surface-light);
    border: 1px solid var(--color-border-light);
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.02);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px var(--color-primary-glow);
}

.step-card h3 {
    margin: 12px 0 10px 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-text-main);
}

.step-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    font-weight: 600;
}

/* شبكة الإحصائيات الفخمة */
.stats-grid-landing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 900px;
}

.stat-card-landing {
    background-color: var(--color-surface-light);
    border: 1px solid var(--color-border-light);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: right;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.02);
    transition: transform var(--transition-fast);
}

.stat-card-landing:hover {
    transform: translateY(-4px);
}

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background-color: rgba(225, 29, 72, 0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.stat-icon-wrapper svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

.stat-info h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--color-text-main);
    line-height: 1.2;
}

.stat-info p {
    margin: 4px 0 0 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

/* قسم المميزات والأمان */
.features-landing-section {
    padding: 60px 24px;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
}

.section-header-landing h2 {
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 0 12px 0;
    color: var(--color-text-main);
}

.section-header-landing p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
    font-weight: 600;
}

.features-grid-landing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card-landing {
    background-color: var(--color-surface-light);
    border: 1px solid var(--color-border-light);
    border-radius: 24px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--transition-fast);
}

.feature-card-landing:hover {
    transform: translateY(-4px);
}

.feature-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(225, 29, 72, 0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.feature-icon-circle svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
    filter: drop-shadow(0 0 6px var(--color-primary-glow));
}

.feature-card-landing h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-text-main);
}

.feature-card-landing p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    font-weight: 600;
}

/* قسم محرك البحث */
.search-engine-section-landing {
    padding: 40px 24px 80px 24px;
    background-color: rgba(15, 23, 42, 0.01);
    border-top: 1px solid var(--color-border-light);
    box-sizing: border-box;
}

.search-engine-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(225, 29, 72, 0.06);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.search-engine-badge svg {
    width: 14px;
    height: 14px;
}

.animate-beat {
    animation: heartBeat 2s infinite;
}

/* ====================================================
   📱 11. دعم الشاشات والتجاوب المطور (Responsive Design)
   ==================================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-landing-section {
        padding: 60px 16px 40px 16px;
    }
    
    .hero-actions-flex {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 40px;
    }
    
    .btn-hero-primary, .btn-hero-secondary, .btn-hero-tertiary {
        width: 100%;
        min-width: unset;
    }
    
    .stats-grid-landing {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .features-grid-landing {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .steps-grid-landing {
        grid-template-columns: 1fr;
        gap: 36px;
        margin-top: 50px;
    }
    
    .feature-card-landing {
        padding: 24px 20px;
    }
    
    .stat-card-landing {
        padding: 16px;
    }
}

/* ====================================================
   👑 12. الهيدر الموحد الفخم باللون القرمزي واللوجو الكلاسيكي (Crimson Brand Header Styles)
   ==================================================== */
.app-global-header-crimson {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 72px;
    
    /* خلفية متدرجة باللون القرمزي الملكي الداكن */
    background: linear-gradient(135deg, #b91c1c 0%, #881337 100%);
    
    /* خط سفلي لامع وظل ثلاثي الأبعاد */
    border-bottom: 3.5px solid #be123c;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12),
                0 1px 3px rgba(0, 0, 0, 0.08);
                
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 0; /* تم نقل البادينج لـ header-content-wrapper */
}

.header-content-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.header-branding-flex-crimson {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo-icon-3d {
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.svg-logo-heart-hand {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.header-branding-text-crimson {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.header-brand-main-crimson {
    font-size: 1.28rem;
    font-weight: 900;
    color: #ffffff;
    font-family: var(--font-arabic);
    line-height: 1.1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.header-brand-sub-crimson {
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffe4e6; /* لون وردي فاتح ناعم جداً ومريح للعين */
    font-family: var(--font-arabic);
    margin-top: 3px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* زر الهامبرجر من القرمزي الأبيض */
.hamburger-menu-btn {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.hamburger-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.hamburger-menu-btn:active {
    transform: scale(0.95);
}
.hamburger-menu-btn svg {
    width: 26px;
    height: 26px;
}

/* روابط التنقل المباشرة للكمبيوتر */
.header-desktop-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.desktop-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    font-family: var(--font-arabic);
    transition: all var(--transition-fast);
}

.desktop-nav-link svg {
    width: 16px;
    height: 16px;
}

.desktop-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.desktop-nav-link.active {
    background-color: #ffffff;
    color: #be123c;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 💻 التحكم في إظهار وإخفاء أشرطة التنقل على الكمبيوتر والموبايل */
@media (min-width: 769px) {
    .header-desktop-nav {
        display: flex !important;
    }
    .hamburger-menu-btn {
        display: none !important;
    }
    .bottom-nav {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .header-desktop-nav {
        display: none !important;
    }
    .hamburger-menu-btn {
        display: flex !important;
    }
    .bottom-nav {
        display: flex !important;
    }
}

/* 🧭 13. نظام القائمة الجانبية المنزلقة (Sliding Side Navigation Drawer) */
.side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 9999; /* أعلى أولية ممكنة ليكون فوق كل شيء */
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}

.side-drawer.open {
    visibility: visible;
    pointer-events: auto;
}

.drawer-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.side-drawer.open .drawer-overlay {
    opacity: 1;
}

.drawer-content {
    position: absolute;
    right: 0;
    top: 0;
    width: 300px;
    height: 100%;
    background: #ffffff;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(300px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-drawer.open .drawer-content {
    transform: translateX(0);
}

.drawer-header {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    padding: 24px 20px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid rgba(0, 0, 0, 0.05);
}

.drawer-logo-container {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.drawer-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffffff;
    font-family: var(--font-arabic);
}

.drawer-subtitle {
    font-size: 0.78rem;
    color: #ffe4e6;
    margin-top: 3px;
    font-family: var(--font-arabic);
}

.drawer-close-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.drawer-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.drawer-close-btn svg {
    width: 20px;
    height: 20px;
}

.drawer-links {
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    overflow-y: auto;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    color: #475569;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    font-family: var(--font-arabic);
    transition: all var(--transition-fast);
}

.drawer-link:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.drawer-link.active {
    background-color: rgba(225, 29, 72, 0.08);
    color: #be123c;
    border-right: 4px solid #be123c;
}

.drawer-link svg {
    width: 20px;
    height: 20px;
}

.drawer-footer {
    padding: 20px;
    border-top: 1px solid #f1f5f9;
    background-color: #f8fafc;
    text-align: center;
}

.drawer-footer p {
    font-weight: 800;
    color: #be123c;
    margin: 0;
    font-size: 0.9rem;
    font-family: var(--font-arabic);
}

.drawer-footer span {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 4px;
    display: block;
    font-family: var(--font-arabic);
}

/* تعديل المسافات العلوية للمين لمنع تداخل الهيدر اللاصق */
main {
    padding-top: 0px !important;
}

@media (max-width: 768px) {
    .app-global-header {
        padding: 0 16px;
        height: 68px;
        border-bottom-width: 3px;
    }
    
    .header-brand-main {
        font-size: 1.2rem;
    }
    
    .header-brand-sub {
        font-size: 0.75rem;
    }

    /* انهيار فلاتر البحث في الشاشات الصغيرة لتكون تحت بعضها */
    .filters-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

/* ==========================================================================
   Premium Pagination Navigation Styles
   ========================================================================== */
nav[role="navigation"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    direction: ltr; /* Ensure LTR for numbers and arrows */
    font-family: var(--font-arabic);
    flex-wrap: wrap;
}

nav[role="navigation"] > div {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

nav[role="navigation"] a,
nav[role="navigation"] button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    background-color: #f8fafc;
    color: #334155;
    font-weight: 800;
    font-size: 0.9rem;
    border: 1px solid #cbd5e1;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

nav[role="navigation"] a:hover,
nav[role="navigation"] button:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px var(--color-primary-glow);
    transform: translateY(-2px);
}

nav[role="navigation"] span[aria-current="page"] > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    background-color: var(--color-primary);
    color: #ffffff;
    font-weight: 900;
    font-size: 0.9rem;
    border: 1px solid var(--color-primary);
    box-shadow: 0 4px 12px var(--color-primary-glow);
}

nav[role="navigation"] span[aria-disabled="true"] > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    background-color: #f1f5f9;
    color: #94a3b8;
    font-weight: 800;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    cursor: not-allowed;
}

nav[role="navigation"] p {
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0;
}



