:root {
    --teal-modern: #30C9C9;
    --navy-modern: #1A2B48;
    --text-gray: #666;
    --light-bg: #F8F9FA;
    --white: #FFFFFF;
}

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--navy-modern);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 auto;
}
/* =========================================
   زر الواتساب العائم - Floating WhatsApp Button
   ========================================= */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px; /* للنسخة الإنجليزية، سنضبطه لاحقاً للنسخة العربية */
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 5px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* ضبط الموقع للنسخة العربية (RTL) */
[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 30px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #FFF;
    background-color: #128C7E;
}

/* تأثير النبض الخفيف */
.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #25d366;
    opacity: 0.7;
    animation: pulse-whatsapp 2s infinite;
    z-index: -1;
}

@keyframes pulse-whatsapp {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* للهواتف الصغيرة */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px;
        font-size: 25px;
    }
}
/* الهيدر */
.main-header {
    background: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--navy-modern);
    font-weight: 500;
    transition: 0.3s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--teal-modern);
}

/* الأزرار */
.btn-primary-modern {
    background: var(--teal-modern);
    color: white !important;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
}

.btn-primary-modern:hover {
    background: var(--navy-modern);
    transform: translateY(-3px);
}

/* قسم الهيرو */
.hero-modern {
    background: var(--light-bg);
    padding: 80px 0 120px;
    position: relative;
}

.hero-flex {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-text { flex: 1; }
.hero-image { flex: 1; position: relative; }

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin: 20px 0;
}

.hero-text h1 span { color: var(--teal-modern); }

.main-hero-img {
    width: 100%;
    border-radius: 30px;
}

/* البطاقات المتداخلة */
.quick-info {
    margin-top: -80px;
    position: relative;
    z-index: 10;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.info-card {
    padding: 40px;
    border-radius: 20px;
    color: white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.info-card.light-blue { background: #E6F7F7; color: var(--navy-modern); }
.info-card.teal { background: var(--teal-modern); }
.info-card.navy { background: var(--navy-modern); }

.card-icon { font-size: 2.5rem; margin-bottom: 20px; }

/* قسم "عن المركز" */
/* تنسيقات قسم عن المركز المحدثة */
.about-modern {
    padding: 80px 0;
    background: #fff;
}

.about-flex {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.about-content {
    flex: 1;
    min-width: 300px;
}

/* تنسيق الفقرة المتكاملة */
.about-description {
    font-size: 1.1rem;
    line-height: 1.8; /* لزيادة مقروئية النص */
    color: #555;
    margin: 20px 0;
    text-align: justify; /* لترتيب الفقرة وجعلها متراصة */
}

/* التحكم في حجم الصورة */
.about-img-box-modern {
    flex: 0.8; /* جعل الصورة أصغر من النص */
    max-width: 450px; /* تحديد عرض أقصى ثابت للصورة */
    position: relative;
}

.img-fluid-modern {
    width: 100%;
    height: 380px; /* ارتفاع محدد لإبقاء الصورة متناسقة */
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* شارة سنوات الخبرة */
.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--teal-modern);
    color: white;
    padding: 15px 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(48, 201, 201, 0.3);
}

.experience-badge .num {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.experience-badge .txt {
    font-size: 0.8rem;
}

/* قائمة المميزات */
.features-list-modern {
    list-style: none;
    padding: 0;
}

.features-list-modern li {
    margin-bottom: 12px;
    color: var(--navy-modern);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.features-list-modern li::before {
    content: "✔";
    color: var(--teal-modern);
    margin-left: 10px;
}

/* للتوافق مع الجوال */
@media (max-width: 992px) {
    .about-flex { flex-direction: column; }
    .about-img-box-modern { max-width: 100%; flex: 1; }
    .img-fluid-modern { height: 300px; }
}
.features-list {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.features-list li::before {
    content: "✔";
    color: var(--teal-modern);
    margin-left: 10px;
    font-weight: bold;
}


/* الأقسام الجديدة */
.services-modern-section, .doctors-modern-section, .gallery-modern-section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.sub-title {
    color: var(--teal-modern);
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

/* بطاقات الخدمات */
/* تنسيق شبكة الخدمات المطور */
.services-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
    justify-content: center; /* لضمان التوسيط في حال كانت الشاشة عريضة جداً */
}

.service-card-modern {
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    transition: 0.4s all ease;
    border: 1px solid #f0f4f8;
    height: 100%; /* لتوحيد ارتفاع البطاقات */
    display: flex;
    flex-direction: column;
}

.service-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(48, 201, 201, 0.15);
}

.card-img {
    height: 220px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s;
}

.service-card-modern:hover .card-img img {
    transform: scale(1.1);
}

.card-body {
    padding: 25px;
    text-align: center;
}

.card-body h3 {
    color: var(--navy-modern);
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.card-body p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* قسم EyeRising */
.tech-highlight-modern { padding: 60px 0; }
.tech-card-modern {
    background: var(--navy-modern);
    border-radius: 30px;
    padding: 60px;
    display: flex;
    align-items: center;
    color: white;
    gap: 40px;
}

.tech-badge { background: var(--teal-modern); padding: 5px 15px; border-radius: 20px; font-size: 12px; font-weight: bold; }

/* بطاقات الأطباء */
.doctors-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* تنسيق بطاقة الصورة الجماعية للأطباء */


.doctors-group-card:hover {
    transform: translateY(-5px); /* حركة بسيطة عند التمرير */
}

/* تنسيق بطاقة الصورة الجماعية للأطباء - المطور */
/* تنسيق بطاقة الأطباء المحدث لتقليل الارتفاع */
.doctors-group-card {
    background: #ffffff;
    padding: 0 20px; /* إلغاء الحواف العلوية والسفلية تماماً وتقليل الجانبية */
    border-radius: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.05);
    margin: 40px 0;
    border: 1px solid #f0f4f8;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* جعل الصور تلتصق بأسفل البطاقة */
    min-height: auto; /* أهم تعديل: السماح للحاوية بالانكماش لتناسب حجم الصورة */
    overflow: hidden;
}

.group-img-wrapper {
    width: 100%;
    max-width: 1150px; /* زيادة العرض قليلاً لتظهر الصور أكبر */
    display: flex;
    justify-content: center;
}

.group-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    /* التأكد من عدم وجود هوامش تلقائية للصورة */
    margin-bottom: -5px; 
}

/* تحسين زر "تعرف على كامل الفريق" */
.center-btn-box {
    text-align: center;
    margin-top: 20px;
}

.card-link {
    color: var(--teal-modern);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: 0.3s;
}

.card-link:hover {
    color: var(--navy-modern);
    letter-spacing: 0.5px;
}

.doctor-card-modern { text-align: center; }
.doc-img img { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 5px solid var(--light-bg); }

/* المعرض */
/* تنسيق معرض الصور المطور */
.gallery-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 200px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: 0.4s;
    cursor: pointer;
}

.gallery-item-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.gallery-item-card:hover img {
    transform: scale(1.1);
}

/* أيقونة البحث عند التمرير */
.overlay-icon {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(48, 201, 201, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.3s;
    color: white;
    font-size: 2rem;
}

.gallery-item-card:hover .overlay-icon {
    opacity: 1;
}

.gallery-item-modern img { width: 100%; border-radius: 15px; height: 200px; object-fit: cover; }

/* تنسيق السلايدر الجديد */
.gallery-slider {
    padding: 20px 0 50px 0; /* مساحة للنقاط السفلية */
    position: relative;
}

.swiper-slide {
    display: flex;
    justify-content: center;
}

/* تخصيص الأسهم لتكون واضحة وعصرية */
.swiper-button-next, .swiper-button-prev {
    color: var(--teal-modern) !important;
    background: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: bold;
}

/* تخصيص النقاط السفلية */
.swiper-pagination-bullet-active {
    background: var(--teal-modern) !important;
    width: 25px;
    border-radius: 5px;
}

.gallery-item-card {
    border-radius: 20px;
    overflow: hidden;
    height: 350px; /* ارتفاع أكبر للسلايدر */
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* الفوتر المطور */
.footer-modern {
    background: #0F1A2D;
    color: white;
    padding: 80px 0 0;
}

.footer-grid-modern {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 50px;
    padding-bottom: 50px;
}

.footer-logo { max-width: 180px; margin-bottom: 25px; }
.footer-col-links ul { list-style: none; padding: 0; }
.footer-col-links a { color: #A0AEC0; text-decoration: none; display: block; margin-bottom: 12px; }
.footer-bottom-modern { background: #08101C; padding: 20px 0; text-align: center; color: #718096; }



/* =========================================
   تنسيقات صفحة الخدمات الحديثة (Services Page)
   ========================================= */

/* رأس الصفحة */
.page-header-modern {
    background: linear-gradient(135deg, #F8F9FA 0%, #E6F7F7 100%);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid #E2E8F0;
}

.page-header-modern h1 {
    font-size: 2.5rem;
    color: var(--navy-modern);
    margin-bottom: 10px;
}

/* عناوين الأقسام */
.category-title-modern {
    color: var(--navy-modern);
    border-right: 5px solid var(--teal-modern);
    padding-right: 15px;
    margin: 40px 0 25px 0;
    font-size: 1.8rem;
}

/* ضبط الاتجاه للإنجليزية */
[dir="ltr"] .category-title-modern {
    border-right: none;
    border-left: 5px solid var(--teal-modern);
    padding-right: 0;
    padding-left: 15px;
}

/* شبكة الخدمات العامة */
.services-grid-modern-page {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.service-item-modern {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border-right: 4px solid var(--teal-modern);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    font-weight: bold;
    color: var(--navy-modern);
    transition: 0.3s;
}

[dir="ltr"] .service-item-modern {
    border-right: none;
    border-left: 4px solid var(--teal-modern);
}

.service-item-modern:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(48, 201, 201, 0.1);
}

/* وحدة التشخيص - كروت أيقونات */
.diagnosis-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.diag-card-modern {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #E2E8F0;
    transition: 0.3s;
}

.diag-card-modern span {
    font-size: 30px;
    display: block;
    margin-bottom: 15px;
}

.diag-card-modern:hover {
    border-color: var(--teal-modern);
    background: #F0FBFB;
}

/* صناديق العمليات */
.dual-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.list-box-modern {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
}

.list-box-modern h3 {
    color: var(--teal-modern);
    margin-bottom: 20px;
    border-bottom: 2px solid #F0F4F8;
    padding-bottom: 10px;
}

.list-box-modern ul { list-style: none; padding: 0; }
.list-box-modern li {
    padding: 12px 0;
    border-bottom: 1px dashed #EDF2F7;
    color: #4A5568;
    display: flex;
    align-items: center;
}

.list-box-modern li::before {
    content: "✓";
    color: var(--teal-modern);
    margin-left: 10px;
    font-weight: bold;
}

[dir="ltr"] .list-box-modern li::before {
    margin-left: 0;
    margin-right: 10px;
}

/* الأقسام الخاصة */
.special-section-modern {
    margin-top: 50px;
    padding: 40px;
    border-radius: 25px;
}

.low-vision-modern {
    background: #F0F9F9;
    border-right: 8px solid var(--teal-modern);
}

[dir="ltr"] .low-vision-modern {
    border-right: none;
    border-left: 8px solid var(--teal-modern);
}

.eyerising-modern {
    background: #FFF5F5;
    border: 2px solid #FED7D7;
    position: relative;
    overflow: hidden;
}

.eyerising-badge-modern {
    background: #E53E3E;
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
}

.tech-box-modern {
    background: var(--navy-modern);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    margin: 20px 0;
}

.tool-tag-modern {
    display: inline-block;
    background: var(--teal-modern);
    color: white;
    padding: 8px 18px;
    border-radius: 50px;
    margin: 5px;
    font-size: 0.9rem;
}


/* =========================================
   تنسيقات صفحة الأطباء الحديثة (Doctors Page)
   ========================================= */
/* قسم الأطباء - النسخة المصححة لضمان ظهور الرأس كاملاً */
.doctors-page-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.doctors-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.doctor-card-modern {
    background: #fff;
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0f4f8;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.doctor-card-modern:hover {
    transform: translateY(-10px);
    border-color: var(--teal-modern);
    box-shadow: 0 15px 40px rgba(48, 201, 201, 0.15);
}

/* حاوية الصورة الدائرية */
.doc-img-container {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
    border-radius: 50%; /* تجعل الحاوية دائرية */
    overflow: hidden;   /* تقص الصورة الزائدة */
    border: 6px solid #f8fbfb;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.doctor-card-modern:hover .doc-img-container {
    border-color: var(--teal-modern);
}

/* تنسيق الصورة وحل مشكلة القص */
.doc-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;        /* ملء الدائرة بالصورة */
    object-position: top center; /* أهم سطر: يركز على الرأس ويمنع قطعه من الأعلى */
    transition: transform 0.4s ease;
}

.doctor-card-modern:hover .doc-img-container img {
    transform: scale(1.08); /* تأثير تكبير خفيف عند التمرير */
}

/* المربع البديل في حال عدم وجود صورة */
.doc-placeholder-modern {
    width: 100%;
    height: 100%;
    background: #eef2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal-modern);
    font-weight: bold;
    font-size: 14px;
}

.doctor-card-modern h3 {
    color: var(--navy-modern);
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.doctor-card-modern .doctor-title {
    color: var(--teal-modern);
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    line-height: 1.4;
    margin-bottom: 15px;
}

/* تنسيق الفقرة (الوصف) ليكون مرتباً */
.doctor-card-modern p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-book-doc {
    margin-top: auto; /* يجعل الزر دائماً في أسفل البطاقة مهما اختلف طول النص */
    padding: 10px 25px;
    border: 2px solid var(--teal-modern);
    border-radius: 50px;
    color: var(--teal-modern);
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: 0.3s;
}

.doctor-card-modern:hover .btn-book-doc {
    background: var(--teal-modern);
    color: #fff;
}
/* =========================================
   تنسيقات صفحة عن المركز الحديثة (About Us Page)
   ========================================= */

.about-intro-card {
    background: #fff;
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border-right: 8px solid var(--teal-modern);
    margin: 40px 0;
    line-height: 2;
    font-size: 1.1rem;
}

[dir="ltr"] .about-intro-card {
    border-right: none;
    border-left: 8px solid var(--teal-modern);
}

/* الهيكل التنظيمي */
.management-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.team-box-modern {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #E2E8F0;
    transition: 0.3s;
}

.team-box-modern:hover {
    border-color: var(--teal-modern);
    transform: translateY(-5px);
}

.team-box-modern h3 {
    color: var(--navy-modern);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-box-modern ul { list-style: none; padding: 0; }
.team-box-modern li {
    padding: 8px 0;
    border-bottom: 1px solid #F7FAFC;
    color: #4A5568;
}

/* مواعيد العمل */
.hours-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.hours-card-modern {
    background: #F8FBFB;
    padding: 35px;
    border-radius: 25px;
    border: 1px solid #E2E8F0;
}

.hours-card-modern h3 {
    color: var(--teal-modern);
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.hours-table-modern {
    width: 100%;
    border-collapse: collapse;
}

.hours-table-modern td {
    padding: 15px 5px;
    border-bottom: 1px solid #EDF2F7;
    font-size: 1rem;
}

.hours-table-modern tr:last-child td { border-bottom: none; }

.off-day-modern {
    color: #E53E3E;
    font-weight: bold;
}
/* تنسيق قسم مواعيد العمل المطور */
.working-hours-modern {
    padding: 40px 0;
}

.hours-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.hours-card-modern {
    background: #fff;
    padding: 30px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #f0f4f8;
    display: flex;
    flex-direction: column;
}

.hours-card-modern h3 {
    color: var(--navy-modern);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* تنسيق حاوية الـ QR داخل البطاقة */
.qr-container-inline {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed #e0e6ed;
    text-align: center;
}

.qr-wrapper {
    display: inline-block;
    padding: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    margin-bottom: 10px;
}

.qr-img {
    width: 120px; /* حجم متناسق داخل البطاقة */
    height: 120px;
    display: block;
}

.qr-hint {
    font-size: 0.8rem;
    color: var(--teal-modern);
    font-weight: 500;
}

/* جداول المواعيد */
.hours-table-modern {
    width: 100%;
    border-collapse: collapse;
}

.hours-table-modern td {
    padding: 10px 0;
    border-bottom: 1px solid #f9f9f9;
    font-size: 0.95rem;
    color: #555;
}

.off-day-modern td {
    color: #e74c3c;
    font-weight: bold;
}

/* توزيع المحتوى داخلياً بجانب بعضه */
.card-body-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: 15px;
}

/* ضبط مساحة الجدول ليتمدد بشكل متناسق */
.hours-table-modern {
    flex: 1;
}

/* تنسيق حاوية الـ QR الجانبية */
.qr-container-side {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 140px; /* ضمان عدم انضغاط الـ QR */
}

.qr-wrapper {
    padding: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.qr-img {
    width: 110px; /* حجم متناسق للـ QR ليكون بجانب النص */
    height: 110px;
    display: block;
}

.qr-hint {
    font-size: 0.75rem;
    color: var(--teal-modern);
    font-weight: 500;
    margin-top: 8px;
    white-space: nowrap; /* لمنع انقسام الجملة على سطرين */
}

/* تحويل العناصر فوق بعضها تلقائياً في الشاشات الصغيرة (الجوال) */
@media (max-width: 576px) {
    .card-body-flex {
        flex-direction: column;
        gap: 20px;
    }
    .qr-container-side {
        width: 100%;
        padding-top: 15px;
        border-top: 1px dashed #e0e6ed; /* فاصل بسيط على الجوال فقط */
    }
}

/* =========================================
   تنسيق الهيكل التنظيمي بنظام الشجرة
   ========================================= */
.org-tree-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
    position: relative;
}

.tree-level {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* جعل كروت المستوى الثالث تظهر في خط واحد */
.tree-level.level-3 {
    gap: 40px;
    flex-wrap: wrap;
}

/* خطوط الربط العمودية الفاصلة بين المستويات */
.tree-line-v {
    width: 2px;
    height: 35px;
    background-color: var(--teal-modern);
    margin: 5px 0;
    position: relative;
}

/* التنسيق العام لكروت الشجرة (Nodes) */
.tree-node {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border: 1px solid #f0f4f8;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 280px;
}

.tree-node:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(48, 201, 201, 0.12);
    border-color: var(--teal-modern);
}

/* تمييز بطاقة المدير العام كجذر للشجرة */
.root-node {
    background: linear-gradient(135deg, var(--navy-modern), #253b66);
    color: #ffffff;
    border: none;
    padding: 20px 40px;
}

.root-node h3 {
    color: #ffffff !important;
    font-size: 1.4rem;
    margin: 5px 0 0 0;
}

.root-node span {
    color: var(--teal-modern);
    font-weight: 700;
    font-size: 0.95rem;
}

.node-icon {
    font-size: 1.5rem;
}

.tree-node h3 {
    color: var(--navy-modern);
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

/* تنسيق القوائم والنصوص داخل البطاقات إقليمياً */
.node-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

[dir="ltr"] .node-list {
    text-align: left;
}

.node-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #555;
}

.text-center {
    text-align: center !important;
}

/* تنسيق المجموعات الفرعية للتمريض */
.sub-team {
    margin-bottom: 15px;
    text-align: right;
}

[dir="ltr"] .sub-team {
    text-align: left;
}

.sub-team:last-child {
    margin-bottom: 0;
}

.sub-team strong {
    color: var(--teal-modern);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 4px;
}

.sub-team p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* التجاوب مع شاشات الجوال */
@media (max-width: 768px) {
    .tree-level.level-3 {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .tree-node {
        width: 100%;
        max-width: 320px;
    }
}
/* =========================================
   تنسيقات معرض الصور العصري (Modern Studio Gallery)
   ========================================= */

.gallery-page-modern {
    padding: 100px 0;
    background: linear-gradient(to bottom, #ffffff, #f0fbfb);
}

.gallery-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.gallery-card-modern {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    height: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card-modern:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(48, 201, 201, 0.2);
}

.gallery-img-wrapper {
    width: 100%;
    height: 100%;
}

.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.gallery-card-modern:hover img {
    transform: scale(1.1);
}

/* تأثير التظليل والنص عند الحوم (Hover Overlay) */
.gallery-overlay-modern {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 30px;
    background: linear-gradient(to top, rgba(26, 43, 72, 0.9) 0%, rgba(26, 43, 72, 0.4) 60%, transparent 100%);
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-card-modern:hover .gallery-overlay-modern {
    transform: translateY(0);
    opacity: 1;
}

.gallery-overlay-modern h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.gallery-overlay-modern p {
    font-size: 0.9rem;
    color: var(--teal-modern);
    font-weight: 500;
}

/* في حال عدم وجود صورة (المربعات المحجوزة) */
.img-placeholder-modern {
    width: 100%;
    height: 100%;
    background: #eef2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #a0aec0;
    text-align: center;
    padding: 20px;
}


/* تنسيق إضافي لنموذج الحجز المطور */
.form-row-triple { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; margin-bottom: 20px; }
.appointment-status { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; background: #eef2f7; color: #555; }
.period-badge { padding: 4px 10px; border-radius: 5px; font-size: 11px; background: var(--teal-modern); color: white; margin-right: 5px; }

/* للهواتف */
@media (max-width: 768px) {
    .form-row-triple { grid-template-columns: 1fr; }
}