/* ================= المتغيرات الأساسية ================= */
:root {
    --primary: #00796b;
    --primary-hover: #004d40;
    --secondary: #0a192f;
    --light-bg: #f4f8f9;
    --white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease-in-out;
}

/* ================= الإعدادات العامة ================= */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html, body { 
    scroll-behavior: smooth; 
    overflow-x: hidden; 
    width: 100%;
}

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--white);
}

body.en-font { font-family: 'Poppins', sans-serif; }

.container { 
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 15px; 
}

.section-padding { padding: 80px 0; }
.bg-light { background: var(--light-bg); }
.text-center { text-align: center; }
a { text-decoration: none; color: inherit; }

/* ================= الهيدر ================= */
header {
    position: fixed; 
    width: 100%; 
    top: 0; 
    z-index: 1000;
    transition: var(--transition); 
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
}

.header-container { display: flex; justify-content: space-between; align-items: center; }
.logo span { display: block; font-size: 1.25rem; font-weight: 800; color: var(--primary); }
.logo small { font-size: 0.8rem; color: var(--secondary); font-weight: 600; }

.nav-links { display: flex; list-style: none; gap: 20px; }
.nav-links a { color: var(--secondary); font-weight: 700; font-size: 0.95rem; transition: var(--transition); }
.nav-links a:hover { color: var(--primary); }
.nav-footer-mobile { display: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn {
    background: var(--light-bg); border: 1px solid #e2e8f0; padding: 6px 14px;
    border-radius: 50px; font-size: 0.9rem; font-weight: 700; color: var(--primary); cursor: pointer; transition: var(--transition);
}
.lang-btn:hover { background: var(--primary); color: var(--white); }
.menu-btn { display: none; font-size: 1.6rem; background: none; border: none; color: var(--secondary); cursor: pointer; }

/* ================= الهيرو (الواجهة الرئيسية) ================= */
.hero {
    position: relative; 
    padding: 160px 0 80px; 
    background: url('https://images.unsplash.com/photo-1512678080530-7760d81faba6?auto=format&fit=crop&w=1920&q=80') center/cover;
    color: var(--white);
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(10, 25, 47, 0.85), rgba(0, 121, 107, 0.75)); }
.hero-wrapper { position: relative; z-index: 2; }
.hero-content { max-width: 100%; text-align: center; }

.badge { background: var(--primary); padding: 6px 15px; border-radius: 50px; font-size: 0.85rem; font-weight: 700; display: inline-block; margin-bottom: 20px; }
.hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 20px; line-height: 1.4; }
.hero p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 30px; }

.hero-btns { display: flex; flex-direction: column; gap: 12px; width: 100%; align-items: center;}
.btn { 
    padding: 14px 24px; border-radius: 50px; font-weight: 700; display: inline-flex; 
    align-items: center; justify-content: center; font-size: 1.05rem; width: 100%; max-width: 350px; text-align: center; transition: var(--transition);
}
.btn-primary { background: var(--primary); color: var(--white); border: 2px solid var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); transform: translateY(-3px);}
.btn-white-outline { border: 2px solid var(--white); color: var(--white); }
.btn-white-outline:hover { background: var(--white); color: var(--secondary); }

/* ================= شريط الثقة ================= */
.trust-bar { background: var(--light-bg); padding: 40px 0; }
.trust-container { display: flex; flex-direction: column; gap: 15px; }
.trust-item { display: flex; align-items: center; gap: 15px; background: var(--white); padding: 18px; border-radius: 12px; box-shadow: var(--shadow-sm); }
.trust-item i { font-size: 2.2rem; color: var(--primary); }
.trust-item strong { display: block; font-size: 1.1rem; color: var(--secondary); }
.trust-item span { font-size: 0.9rem; color: var(--text-muted); }

/* ================= المستشفيات (التصميم الاحترافي الجديد) ================= */
.section-title { margin-bottom: 40px; text-align: center; }
.section-title h2 { font-size: 2rem; color: var(--secondary); margin-bottom: 10px; }
.section-title p { color: var(--primary); font-weight: 700; font-size: 1rem; }

.hosp-grid {
    display: grid;
    /* هذا السطر السحري يجعلها تتكيف مع الموبايل والكمبيوتر بذكاء */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.hosp-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #eaeaea;
}

.hosp-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.hosp-img {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.hosp-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hosp-card:hover .hosp-img img {
    transform: scale(1.1); /* تأثير التقريب عند لمس الصورة */
}

.hosp-card h3 {
    padding: 15px 10px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--secondary);
    font-weight: 700;
}

.hosp-footer { margin-top: 30px; font-weight: 700; color: var(--text-muted); font-size: 1.1rem;}
.hosp-footer i { color: var(--primary); margin-left: 8px;}

/* ================= عن أحمد ================= */
.about-wrapper { display: flex; flex-direction: column; gap: 35px; }
.about-image { position: relative; width: 100%; }
.about-image img { width: 100%; border-radius: 20px; box-shadow: var(--shadow-md);}
.exp-card { position: absolute; bottom: -15px; left: 15px; background: var(--primary); color: var(--white); padding: 20px; border-radius: 15px; text-align: center; box-shadow: var(--shadow-md);}
.exp-card span { font-size: 1.8rem; font-weight: 800; display: block; }
.exp-card p { font-size: 0.9rem; }

.about-text h2 { font-size: 1.9rem; margin-bottom: 15px; color: var(--secondary); line-height: 1.4;}
.about-p1 { font-size: 1.05rem; }
.about-list { list-style: none; margin-top: 20px; }
.about-list li { margin-bottom: 15px; font-weight: 700; display: flex; align-items: flex-start; gap: 12px; font-size: 1rem;}
.about-list i { color: var(--primary); font-size: 1.2rem; margin-top: 4px;}

/* ================= الخطوات والخدمات ================= */
.process-grid, .services-grid, .gallery-grid { display: flex; flex-direction: column; gap: 20px; }
.process-step, .service-card { background: var(--white); padding: 30px 20px; border-radius: 15px; text-align: center; box-shadow: var(--shadow-sm); transition: var(--transition);}
.process-step:hover, .service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-bottom: 3px solid var(--primary);}
.step-num { width: 45px; height: 45px; background: var(--primary); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; margin: 0 auto 15px; }
.process-step h3, .service-card h3 { color: var(--secondary); margin-bottom: 10px;}
.service-card i { font-size: 3rem; color: var(--primary); margin-bottom: 15px; }

/* ================= الصور ================= */
.gallery-item { border-radius: 15px; overflow: hidden; height: 260px; position: relative; box-shadow: var(--shadow-sm);}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s;}
.gallery-item:hover img {transform: scale(1.08);}
.overlay { position: absolute; bottom: 0; width: 100%; background: linear-gradient(transparent, rgba(0,0,0,0.9)); color: var(--white); padding: 20px 15px; text-align: center; font-size: 1.1rem; font-weight: 700;}

/* ================= التواصل ================= */
.contact-box { background: var(--secondary); color: var(--white); padding: 40px 20px; border-radius: 25px; text-align: center; box-shadow: var(--shadow-lg);}
.contact-info h2 { font-size: 1.8rem; margin-bottom: 15px; }
.contact-info p { font-size: 1rem; margin-bottom: 25px; color: #cbd5e1;}
.info-item-contact { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 1.1rem; margin-bottom: 15px; }
.info-item-contact i { color: var(--primary); font-size: 1.5rem; }

/* ================= الأزرار العائمة ================= */
.floating-socials { position: fixed; bottom: 20px; left: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 12px; }
.floating-socials a { width: 55px; height: 55px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--white); box-shadow: var(--shadow-md); transition: var(--transition);}
.float-wa { background: #25d366; }
.float-fb { background: #1877f2; }
.floating-socials a:hover { transform: scale(1.1); }

footer { background: #050c16; color: #94a3b8; padding: 25px 0; font-size: 0.9rem; text-align: center; font-weight: 500;}

/* ================= التجاوب مع شاشات الكمبيوتر والتابلت ================= */
@media (min-width: 768px) {
    .hero { padding: 200px 0 120px; text-align: right; }
    .hero h1 { font-size: 3.5rem; }
    .hero-content { max-width: 650px; text-align: right;}
    .hero-btns { flex-direction: row; width: auto; justify-content: flex-start;}
    .btn { width: auto; max-width: none; }
    
    .trust-bar { margin-top: -60px; background: transparent; padding: 0; }
    .trust-container { flex-direction: row; padding: 30px; border-radius: 20px; }
    
    .about-wrapper { flex-direction: row; align-items: center;}
    .process-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
    .services-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
    
    .contact-box { display: grid; grid-template-columns: 1fr 1fr; text-align: right; padding: 60px; }
    .contact-cta { display: flex; align-items: center;}
    .info-item-contact { justify-content: flex-start; }
    .floating-socials { bottom: 30px; left: 30px; }
    .floating-socials a { width: 65px; height: 65px; font-size: 2.2rem; }
}

@media (min-width: 1024px) {
    .process-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ================= القائمة الجانبية للموبايل ================= */
@media (max-width: 767px) {
    .menu-btn { display: block; }
    nav { 
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; 
        background: var(--white); flex-direction: column; padding: 90px 24px; 
        transition: 0.3s ease-in-out; box-shadow: -5px 0 20px rgba(0,0,0,0.15); 
        z-index: 999;
    }
    nav.active { right: 0; }
    .nav-links { flex-direction: column; gap: 30px; width: 100%; }
    .nav-links a { font-size: 1.15rem; }
    .nav-footer-mobile { display: block; margin-top: 50px; text-align: center; }
}

/* تأثير الظهور السلس */
.fade-in { opacity: 0; transform: translateY(25px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }