/* ==========================================================================
   🏥 Nova Specialized Hospital - Master Stylesheet (المظهر الكلي الموحد)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

:root {
    --teal-dark: #1b6374;
    --teal-light: #4fa1b3;
    --green: #61a92d;
    --bg-light: #f4f8f9;
    --text-dark: #2c3e50;
    --border-color: #d1e3e6;
}

/* إعادة تهيئة وإعدادات عامة */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Tajawal', sans-serif; 
    text-decoration: none; 
    list-style: none;
}

body { 
    background-color: var(--bg-light); 
    color: var(--text-dark); 
    direction: rtl; 
    text-align: right; 
}

/* --------------------------------------------------------------------------
   Header & Navigation (القائمة العلوية والهيدر)
   -------------------------------------------------------------------------- */
header { 
    background: white; 
    padding: 15px 8%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.02); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}

header .logo { 
    font-size: 22px; 
    font-weight: 700; 
    color: var(--teal-dark); 
}

header .logo span { 
    color: var(--green); 
}

header nav { 
    display: flex; 
    align-items: center; 
    gap: 25px; 
}

header nav a { 
    color: var(--text-dark); 
    font-weight: 500; 
    transition: 0.3s; 
}

header nav a.active, header nav a:hover { 
    color: var(--teal-dark); 
    font-weight: 700; 
}

/* زر بوابة الدخول الفخم في الهيدر */
.login-btn-header { 
    background: var(--teal-dark); 
    color: white !important; 
    padding: 10px 24px; 
    border-radius: 50px; 
    font-weight: 700; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    box-shadow: 0 4px 10px rgba(27, 99, 116, 0.15); 
}

.login-btn-header:hover {
    background: #134955;
}

/* --------------------------------------------------------------------------
   Buttons (الأزرار والتحكم الحركي)
   -------------------------------------------------------------------------- */
.btn { 
    padding: 12px 28px; 
    border-radius: 50px; 
    font-weight: 700; 
    display: inline-block; 
    transition: 0.3s; 
    border: none; 
    cursor: pointer; 
    font-size: 14px; 
    text-align: center; 
}

.btn-teal { 
    background: var(--teal-dark); 
    color: white; 
}

.btn-teal:hover { 
    background: #134955; 
}

.btn-outline { 
    border: 2px solid var(--teal-dark); 
    color: var(--teal-dark); 
    background: transparent; 
}

.btn-outline:hover { 
    background: var(--teal-dark); 
    color: white; 
}

/* زر معالجة وتوليد ميزة الـ Gemini AI */
.btn-ai { 
    background: linear-gradient(135deg, #8a2be2, #4a00e0); 
    color: white; 
    border-radius: 12px; 
    padding: 8px 15px; 
    font-size: 12px; 
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(138, 43, 226, 0.2);
    transition: 0.3s;
}

.btn-ai:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgba(138, 43, 226, 0.3);
}

/* --------------------------------------------------------------------------
   Hero Section (البانر الرئيسي المتناسق)
   -------------------------------------------------------------------------- */
.hero { 
    background: linear-gradient(135deg, #eef7f9 0%, #ffffff 100%); 
    padding: 50px 8%; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 40px; 
    min-height: 520px; 
}

.hero-content { 
    max-width: 600px; 
}

.hero-content p.subtitle { 
    color: var(--green); 
    font-weight: 700; 
    font-size: 16px; 
    margin-bottom: 12px; 
}

.hero-content h1 { 
    font-size: 42px; 
    color: var(--teal-dark); 
    line-height: 1.3; 
    margin-bottom: 20px; 
    font-weight: 700; 
}

.hero-content h1 span { 
    color: var(--green); 
}

.hero-content p.desc { 
    color: #64748b; 
    font-size: 16px; 
    line-height: 1.7; 
    margin-bottom: 30px; 
}

.hero-btns { 
    display: flex; 
    gap: 15px; 
    margin-bottom: 35px; 
}

/* الإحصائيات أسفل البانر */
.stats-grid { 
    display: flex; 
    gap: 40px; 
    border-top: 1px solid var(--border-color); 
    padding-top: 25px; 
}

.stat-box h3 { 
    font-size: 28px; 
    color: var(--teal-dark); 
    font-weight: 700; 
}

.stat-box p { 
    color: #64748b; 
    font-size: 14px; 
}

.hero-image img { 
    width: 440px; 
    border-radius: 30px; 
    box-shadow: 0 20px 40px rgba(27, 99, 116, 0.06); 
}

/* --------------------------------------------------------------------------
   Clinics & Categories Grid (شبكة العيادات القابلة للضغط والتفاعل)
   -------------------------------------------------------------------------- */
.section-title { 
    text-align: center; 
    margin: 60px 0 35px; 
}

.section-title h2 { 
    color: var(--teal-dark); 
    font-size: 28px; 
    margin-bottom: 10px; 
    font-weight: 700; 
}

.section-title p {
    color: #8492a6;
    font-size: 15px;
}

.categories-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 20px; 
    padding: 0 8%; 
    margin-bottom: 40px; 
}

/* جعل بطاقات العيادات تظهر كروابط تفاعلية أنيقة وعريضة */
.categories-grid a.category-card { 
    display: block; 
    color: inherit; 
    cursor: pointer; 
    background: white; 
    padding: 30px 20px; 
    border-radius: 20px; 
    text-align: center; 
    border: 1px solid #e9f2f3; 
    transition: 0.3s; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.01); 
}

.categories-grid a.category-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 30px rgba(27, 99, 116, 0.08); 
    border-color: var(--teal-light); 
}

.categories-grid a.category-card .icon { 
    font-size: 45px; 
    margin-bottom: 15px; 
    display: block; 
}

.categories-grid a.category-card h4 { 
    font-weight: 700; 
    font-size: 16px; 
    color: var(--teal-dark); 
}

/* --------------------------------------------------------------------------
   Layout Cards & Containers (الحاويات والبطاقات الإدارية)
   -------------------------------------------------------------------------- */
.container { 
    max-width: 1200px; 
    margin: 40px auto; 
    padding: 0 20px; 
}

.main-card { 
    background: white; 
    padding: 35px; 
    border-radius: 24px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.02); 
    border: 1px solid #e9f2f3; 
    margin-bottom: 35px; 
}

.card-title { 
    font-size: 20px; 
    color: var(--teal-dark); 
    margin-bottom: 25px; 
    border-right: 5px solid var(--green); 
    padding-right: 15px; 
    font-weight: 700; 
}

/* --------------------------------------------------------------------------
   Forms & Controls (عناصر إدخال النماذج والبيانات)
   -------------------------------------------------------------------------- */
.form-control { 
    margin-bottom: 20px; 
}

label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 700; 
    font-size: 14px; 
    color: #4a5568; 
}

input, select, textarea { 
    width: 100%; 
    padding: 12px 18px; 
    border: 1px solid #cbd5e1; 
    border-radius: 12px; 
    outline: none; 
    font-size: 14px; 
    text-align: right; 
    background: #fff; 
    transition: 0.3s; 
}

input:focus, select:focus, textarea:focus { 
    border-color: var(--teal-dark); 
    box-shadow: 0 0 0 4px rgba(27, 99, 116, 0.06);
}

/* --------------------------------------------------------------------------
   Tables Dashboard (جداول عرض وقراءة البيانات الحركية)
   -------------------------------------------------------------------------- */
table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 15px; 
    background: white; 
    border-radius: 12px; 
    overflow: hidden; 
}

th, td { 
    padding: 16px; 
    text-align: right; 
    border-bottom: 1px solid #e2e8f0; 
    font-size: 14px; 
}

th { 
    background: #f8fafc; 
    color: var(--teal-dark); 
    font-weight: 700; 
}

tr:hover { 
    background: #f8fafc; 
}

/* --------------------------------------------------------------------------
   Badges, Alerts & Animations (شارات الحالة، التنبيهات وتأثيرات الظهور)
   -------------------------------------------------------------------------- */
.badge { 
    padding: 6px 14px; 
    border-radius: 50px; 
    font-size: 12px; 
    font-weight: bold; 
    display: inline-block; 
}

.badge-pending { 
    background: #fef3c7; 
    color: #d97706; 
}

.badge-success { 
    background: #dcfce7; 
    color: #15803d; 
}

.alert { 
    padding: 15px; 
    border-radius: 12px; 
    font-weight: 700; 
    text-align: center; 
    margin-bottom: 25px; 
    font-size: 14px; 
}

.alert-danger { 
    background: #fee2e2; 
    color: #b91c1c; 
}

.alert-success { 
    background: #dcfce7; 
    color: #15803d; 
}

/* حركة أنيقة لظهور تفاصيل العيادة بشكل انسيابي */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}