/* استيراد خط عربي */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* المتغيرات العامة */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0ea5e9;
    --light: #f0f9ff;
    --dark: #0f172a;
}

/* التنسيقات الأساسية */
body {
    font-family: 'Tajawal', sans-serif;
    background-color: #f8fafc;
}

/* التدرج اللوني للقسم الرئيسي */
.hero-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

/* بطاقات الخدمات والأطباء */
.service-card, .doctor-card {
    transition: all 0.3s ease;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.service-card:hover, .doctor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* بطاقات خطوات الحجز */
.step-card {
    border-radius: 16px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.step-card:hover {
    background-color: #eff6ff;
}

/* نموذج الحجز */
.booking-form {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* روابط التنقل */
.nav-link {
    position: relative;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.nav-link:hover {
    background-color: #eff6ff;
    color: var(--primary);
}

.nav-link.active {
    background-color: #dbeafe;
    color: var(--primary);
    font-weight: 700;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* عناوين الأقسام */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: 0;
    width: 70px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* قسم الذكاء الاصطناعي */
.ai-section {
    background: linear-gradient(135deg, #1e3a8a 0%, var(--primary) 100%);
    border-radius: 24px;
    overflow: hidden;
}

/* روابط التذييل */
.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: white;
    transform: translateX(-5px);
}

/* أنماط الصفحات المتعددة */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* نظام الإشعارات */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background-color: #10b981;
}

.notification.error {
    background-color: #ef4444;
}

.notification.info {
    background-color: #3b82f6;
}

.notification.warning {
    background-color: #f59e0b;
}

/* ملخص الحجز */
.booking-summary {
    background-color: #f8fafc;
    border-radius: 16px;
    padding: 20px;
}

/* خيارات الوقت */
.time-slot {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-slot:hover {
    background-color: #eff6ff;
}

.time-slot.selected {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

.time-slot.unavailable {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* خيارات التخصص والطبيب */
.specialty-option.selected, .doctor-option.selected {
    border-color: #2563eb;
    background-color: #eff6ff;
}

/* أنماط النوافذ المنبثقة */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
}

.close-modal:hover {
    color: #374151;
}

/* شعار الطوارئ */
.emergency-banner {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* قسم العلامات التجارية */
.branding-section {
    background-color: #f8fafc;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
}

.brand-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-left: 10px;
}

.mawed-logo {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.brir-logo {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: white;
}

/* أنماط الشعار المخصص */
#hospital-logo img, #footer-logo img {
    max-width: 100%;
    max-height: 40px;
    object-fit: contain;
}

/* القائمة المنسدلة للجوال */
.nav-link-mobile {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.nav-link-mobile:hover, .nav-link-mobile.active {
    background-color: #eff6ff;
    color: var(--primary);
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .section-title::after {
        width: 50px;
        bottom: -10px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
    }
    
    .hero-gradient {
        padding: 2rem 1rem;
    }
    
    .service-card, .doctor-card {
        margin-bottom: 1rem;
    }
    
    .booking-form {
        margin: 1rem;
    }
    
    .step-card {
        margin-bottom: 1rem;
    }
    
    .time-slots {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    /* تحسينات للجوال */
    .hero-gradient .text-4xl {
        font-size: 2rem;
    }
    
    .hero-gradient .text-xl {
        font-size: 1rem;
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-links {
        text-align: center;
    }
    
    .doctor-card .flex {
        flex-direction: column;
        text-align: center;
    }
    
    .service-card .flex {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .time-slots {
        grid-template-columns: 1fr;
    }
    
    .booking-summary .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        text-align: right;
    }
}

/* تحسينات إضافية للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .text-3xl {
        font-size: 1.5rem;
    }
    
    .text-2xl {
        font-size: 1.25rem;
    }
    
    .px-8 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .py-4 {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* تحسينات للأطباء في الشاشات الصغيرة */
@media (max-width: 768px) {
    .doctor-card img {
        height: 200px !important;
    }
    
    .service-icon {
        margin: 0 auto 1rem auto;
    }
}

/* تحسينات للنماذج في الشاشات الصغيرة */
@media (max-width: 640px) {
    .step {
        margin-bottom: 1rem;
    }
    
    .step-content {
        padding: 1rem;
    }
    
    .booking-form {
        margin: 0.5rem;
    }
}