/* إعدادات الصفحة الكاملة والألوان الثابتة */
:root {
    --primary-tech: #00f2ff;
    --bg-overlay: rgba(10, 17, 32, 0.78);
    --accent-green: #64ffda;
    --text-main: #ffffff;
}

html, body { 
    margin: 0; padding: 0; width: 100%; height: 100%; 
    font-family: 'Tajawal', sans-serif; overflow-x: hidden;
    background-color: #0a192f;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* الحاوية الرئيسية بالخلفية المتجاوبة المشتركة */
.hero-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(var(--bg-overlay), var(--bg-overlay)), 
                url('https://i.postimg.cc/LXLFWcjr/IMG-0510.jpg'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .hero-wrapper { background-attachment: scroll; }
}

/* شريط التنقل العلوي - انسيابي وعرضي مرن ومضمون لجميع الشاشات */
.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 4%;
    z-index: 100;
    gap: 20px;
    width: 100%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.8vw, 25px);
}

.nav-item {
    color: #cbd5e1;
    text-decoration: none;
    font-size: clamp(13px, 1.5vw, 16px);
    font-weight: bold;
    transition: 0.3s;
    padding: 6px 10px;
    white-space: nowrap; /* مستحيل تنقسم الكلمة أو تنزل سطر جديد */
}
.nav-item:hover, .nav-item.active {
    color: var(--primary-tech);
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.4);
}

.brand-box { 
    display: flex; 
    align-items: center; 
    gap: clamp(8px, 1.5vw, 15px);
    flex-shrink: 0;
}

.site-title {
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.site-title span { color: #0ea5e9; }

.logo-img { width: clamp(60px, 6vw, 95px); height: auto; filter: drop-shadow(0 0 10px rgba(255,255,255,0.3)); }

.contact-link {
    background: #0ea5e9;
    color: white;
    padding: 8px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: clamp(11px, 1.3vw, 14px);
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    white-space: nowrap;
    flex-shrink: 0;
}
.contact-link:hover { background: #38bdf8; transform: translateY(-2px); }

/* تنسيقات المحتوى الرئيسي لـ index.html */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(15px, 4vw, 40px);
    width: 100%;
}
.hero-text { max-width: 800px; margin-bottom: clamp(25px, 4vw, 40px); }
.hero-text h1 { font-size: clamp(22px, 5vw, 48px); color: #fff; margin: 0; text-shadow: 2px 4px 15px rgba(0,0,0,0.8); line-height: 1.3; }
.hero-text h2 { font-size: clamp(14px, 3vw, 24px); color: #f1f5f9; margin: 12px 0; line-height: 1.4; }
.hero-text p { font-size: clamp(13px, 2.2vw, 18px); color: #38bdf8; font-weight: bold; margin: 10px 0 0 0; }

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    padding: 10px;
}
.main-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px; padding: 20px;
    display: flex; align-items: center; gap: 15px;
    text-decoration: none; color: white;
    transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.main-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.12); border-color: #0ea5e9; box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.card-icon-box { font-size: clamp(26px, 4vw, 34px); color: #38bdf8; flex-shrink: 0; }
.card-txt { text-align: right; }
.card-txt h3 { font-size: clamp(15px, 2vw, 18px); margin: 0; font-weight: 700; }
.card-txt p { font-size: clamp(12px, 1.8vw, 13px); margin: 6px 0 0; color: #cbd5e1; line-height: 1.5; }

/* تنسيقات صفحة الدكاترة لـ doctors.html */
.header-title { text-align: center; margin: 2rem 0 1rem 0; }
.header-title h2 { color: var(--primary-tech); font-size: clamp(1.3rem, 4.5vw, 2.2rem); text-shadow: 0 0 15px rgba(0, 242, 255, 0.5); margin: 0 0 0.5rem 0; }
.header-title p { color: #ccd6f6; font-size: clamp(0.85rem, 2.5vw, 1.1rem); margin: 0; }

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(1rem, 2.5vw, 1.8rem);
    max-width: 1300px; width: 100%; margin: 0 auto; padding: 1rem 0.5rem;
}
.card {
    background: rgba(16, 33, 65, 0.6);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-radius: 20px; padding: clamp(1.5rem, 4vw, 2.2rem) clamp(1rem, 3vw, 1.5rem);
    text-align: center; border: 1px solid rgba(100, 255, 218, 0.2);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s, box-shadow 0.3s;
    display: flex; flex-direction: column; justify-content: space-between;
}

@media (hover: hover) {
    .card:hover { transform: translateY(-8px); background: rgba(16, 33, 65, 0.8); border-color: var(--primary-tech); box-shadow: 0 10px 30px rgba(0, 242, 255, 0.3); }
    .btn-courses:hover { background: rgba(100, 255, 218, 0.1); }
    .btn-cv:hover { box-shadow: 0 0 15px rgba(0, 242, 255, 0.6); opacity: 0.9; }
}

.tech-icon { font-size: clamp(2rem, 5vw, 2.5rem); color: var(--accent-green); margin-bottom: 1.2rem; filter: drop-shadow(0 0 8px rgba(100, 255, 218, 0.4)); }
.name { font-size: clamp(14px, 2.5vw, 1.4rem); margin: 0.5rem 0; font-weight: bold; color: #fff; }
.specialty { font-size: clamp(0.75rem, 1.8vw, 0.85rem); color: var(--primary-tech); background: rgba(0, 242, 255, 0.1); padding: 0.4rem 1rem; border-radius: 50px; display: inline-block; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid rgba(0, 242, 255, 0.2); }

.btn-group { display: flex; flex-direction: column; gap: 0.8rem; width: 100%; }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; padding: clamp(0.7rem, 2vw, 0.85rem); border-radius: 12px; font-size: clamp(0.85rem, 2vw, 0.95rem); font-weight: 600; transition: 0.3s; cursor: pointer; width: 100%; }
.btn-courses { background: transparent; color: var(--accent-green); border: 1px solid var(--accent-green); }
.btn-cv { background: var(--primary-tech); color: #0a192f; border: none; }
.btn:active { transform: scale(0.97); opacity: 0.85; }

/* المعالجة السحرية والذكية لتجاوب الشاشات الصغيرة مع المحاذاة الأفقية الثابتة */
@media (max-width: 768px) {
    .header-nav {
        flex-direction: column; /* يضع الشعار بالأعلى والروابط بالأسفل بشكل عرضي متكامل */
        gap: 15px;
        padding: 15px 2%;
    }
    .nav-links {
        width: 100%;
        justify-content: flex-start; /* الترتيب يبدأ من اليمين لليسار */
        overflow-x: auto; /* سحب أفقي ناعم جداً إذا زادت العناصر */
        padding-bottom: 8px;
        scrollbar-width: none; /* إخفاء شريط السحب على الفايرفوكس */
    }
    .nav-links::-webkit-scrollbar {
        display: none; /* إخفاء شريط السحب على الكروم والسفاري */
    }
    .nav-item {
        font-size: 13px;
        padding: 4px 8px;
    }
    .cards-container { grid-template-columns: 1fr; max-width: 450px; gap: 15px; }
}