/* ================= المتغيرات والثوابت ================= */
:root {
    --bg-dark: #0a192f; --bg-card: #112240; --primary-neon: #64ffda;
    --text-white: #e6f1ff; --text-gray: #8892b0; --border: rgba(100, 255, 218, 0.1);
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Cairo', sans-serif; }
body { background-color: var(--bg-dark); color: var(--text-white); scroll-behavior: smooth; overflow-x: hidden; line-height: 1.6; }
.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: clamp(1.45rem, 2.8vw + 0.65rem, 2.5rem);
    line-height: 1.25;
    color: var(--primary-neon);
    overflow-wrap: anywhere;
}

/* ================= Navbar ================= */
.navbar {
    display: flex; justify-content: space-between; align-items: center; padding: 15px 5%;
    position: fixed; top: 0; width: 100%; z-index: 2000; background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
    pointer-events: auto;
}
.navbar a, .navbar button, .navbar .lang-switch, .navbar .lang-switch__btn { pointer-events: auto; }
.logo {
    font-weight: 700;
    font-size: clamp(0.92rem, 1.6vw + 0.55rem, 1.5rem);
    color: var(--text-white);
    text-decoration: none;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.logo span { color: var(--primary-neon); }
.nav-links { display: flex; list-style: none; gap: 30px; align-items: center; }
.nav-links a:not(.lang-switch__btn) { text-decoration: none; color: var(--text-white); transition: 0.3s; font-size: 0.9rem; }
.nav-links a:not(.lang-switch__btn):hover, .menu-icon:hover { color: var(--primary-neon); }
.navbar { isolation: isolate; }
.menu-icon { display: none; font-size: 1.6rem; color: var(--primary-neon); cursor: pointer; }
.btn-login { padding: 10px 25px; background: #3b82f6; color: white !important; border-radius: 8px; font-weight: bold; transition: 0.3s; }

/* ================= Hero & Buttons ================= */
.hero { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 10%; background: radial-gradient(circle, #112240 0%, #0a192f 100%); text-align: center; }
.badge { color: var(--primary-neon); border: 1px solid var(--primary-neon); padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; margin-bottom: 20px; }
.hero h1 {
    font-size: clamp(1.65rem, 4.2vw + 0.75rem, 3.5rem);
    line-height: 1.2;
    margin-bottom: 20px;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.hero h1 span { color: var(--primary-neon); }
.hero p {
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: clamp(0.88rem, 1.4vw + 0.45rem, 1.1rem);
    line-height: 1.65;
}
.btn { padding: 15px 30px; border-radius: 5px; text-decoration: none; font-weight: bold; margin: 10px; display: inline-block; transition: 0.3s; }
.primary-btn { background: var(--primary-neon); color: var(--bg-dark); }
.secondary-btn { border: 1px solid var(--primary-neon); color: var(--primary-neon); }
.primary-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(100, 255, 218, 0.2); }

/* ================= About Section ================= */
/* تنسيق قسم About */
.about {
    padding: 100px 10%;
    background-color: var(--bg-dark);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.about-img {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.img-frame {
    width: 350px;
    height: 450px;
    border: 2px solid var(--primary-neon);
    border-radius: 20px;
    position: relative;
}

.img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    position: absolute;
    top: 20px;
    right: -20px;
    background: var(--bg-card);
}

.about-text {
    flex: 1.5;
    min-width: 300px;
}

.about-text .about-section-title {
    margin-bottom: 30px;
    font-size: clamp(1.45rem, 2.8vw + 0.65rem, 2.5rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.bio-intro {
    font-size: clamp(1rem, 1.6vw + 0.5rem, 1.3rem);
    color: var(--text-white);
    margin-bottom: 25px;
    font-weight: bold;
}

.qualifications {
    margin: 30px 0;
}

.q-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    background: var(--bg-card);
    padding: 15px;
    border-radius: 10px;
    transition: 0.3s;
}

.q-item:hover {
    background: rgba(100, 255, 218, 0.05);
    transform: translateX(-10px);
}

.q-item i {
    color: var(--primary-neon);
    font-size: 1.5rem;
}

.experience-text {
    color: var(--text-gray);
    line-height: 1.8;
}

/* ================= Services & Overlay ================= */
.services { padding: 100px 10%; }
/* .section-title — معرّف أعلاه بـ clamp */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.service-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 10px;
    transition: 0.3s;
    border: 1px solid transparent;
    text-align: center;
}

.service-card h3 {
    font-size: clamp(1rem, 1.8vw + 0.45rem, 1.35rem);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.service-card p {
    font-size: clamp(0.85rem, 1.2vw + 0.35rem, 1rem);
    line-height: 1.55;
}

.service-card i {
    font-size: clamp(1.6rem, 2.5vw + 0.5rem, 2.5rem);
    color: var(--primary-neon);
    margin-bottom: 20px;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-neon);
}
.service-overlay { 
    display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; 
    background: rgba(10, 25, 47, 0.9); backdrop-filter: blur(8px); overflow-y: auto; padding: 50px 0; 
}
.overlay-container { 
    position: relative; background: var(--bg-card); width: 90%; max-width: 900px; margin: 0 auto; 
    border-radius: 20px; border: 1px solid var(--primary-neon); padding: 40px; display: flex; gap: 30px; 
}
.close-overlay { position: absolute; top: 20px; right: 25px; color: var(--primary-neon); font-size: 40px; cursor: pointer; background: none; border: none; }
.overlay-right { flex: 1; }
.overlay-left { flex: 1; display: flex; flex-wrap: wrap; gap: 10px; }
.overlay-left img {
    width: 100%;
    height: 250px;       /* حدد طول ثابت مناسب عشان الصور متبقاش عملاقة */
    object-fit: cover;   /* ده السر! بيخلي الصورة تملى المربع بدون ما تتمط */
    object-position: center; /* بيخلي نص الصورة هو اللي يظهر */
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 15px;
    transition: 0.3s;
}

/* لو عايز الصورة تكبر لما تلمسها بالماوس (حركة شيك) */
.overlay-left img:hover {
    transform: scale(1.02);
    border-color: var(--primary-neon);
}

/* ================= Cases Section ================= */
.categories-wrapper { padding: 20px 8%; }
.category-section { margin-bottom: 80px; }
.category-title { font-size: 2rem; color: var(--primary-neon); border-bottom: 2px solid var(--border); padding-bottom: 10px; margin-bottom: 30px; }
.cases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 30px; }
.case-card { background: var(--bg-card); border-radius: 15px; padding: 25px; border: 1px solid var(--border); transition: 0.3s; }
.image-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.img-box img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; cursor: pointer; }
.img-box:nth-child(4), .img-box:nth-child(5) { grid-column: span 1.5; }

/* ================= Contact & Branch Selector ================= */
.contact-section { padding: 80px 10%; text-align: center; }
.contact-section > h2 {
    font-size: clamp(1.45rem, 2.8vw + 0.65rem, 2.5rem);
    line-height: 1.25;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}

.branch-selector { display: flex; justify-content: center; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.branch-btn { padding: 12px 30px; border: 1px solid var(--primary-neon); background: transparent; color: var(--primary-neon); border-radius: 50px; cursor: pointer; font-weight: bold; transition: 0.3s; }
.branch-btn.active { background: var(--primary-neon); color: var(--bg-dark); }
.contact-container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: var(--bg-card); padding: 40px; border-radius: 20px; border: 1px solid var(--border); text-align: right; }
.branch-info-item h3 {
    color: var(--primary-neon);
    font-size: clamp(1.15rem, 2vw + 0.5rem, 1.8rem);
    line-height: 1.25;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.branch-info-item p {
    font-size: clamp(0.88rem, 1.1vw + 0.4rem, 1.1rem);
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.map-container { border-radius: 15px; overflow: hidden; height: 350px; border: 1px solid var(--border); }


    

        .branch-btn.active { background: var(--primary); color: var(--navy); box-shadow: 0 0 20px rgba(100, 255, 218, 0.3); }

        /* حاوية المحتوى (الخريطة والتفاصيل) */
        .contact-container {
            display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
            background: var(--light-navy); padding: 40px; border-radius: 20px;
            border: 1px solid var(--border); text-align: right;
        }

        /* تفاصيل العيادة */
        .branch-details { display: flex; flex-direction: column; justify-content: center; }
        .branch-info-item { margin-bottom: 25px; transition: 0.5s; }
        .branch-info-item h3 { color: var(--primary); font-size: 1.8rem; margin-bottom: 10px; }
        .branch-info-item p { color: var(--slate); font-size: 1.1rem; margin: 5px 0; }
        .branch-info-item i { color: var(--primary); margin-left: 10px; width: 25px; }

        /* إطار الخريطة */
        .map-container { border-radius: 15px; overflow: hidden; height: 350px; border: 1px solid var(--border); position: relative; }
        .map-placeholder {
            position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
            padding: 20px; text-align: center; color: var(--text-gray); font-size: 0.9rem;
            background: rgba(17, 34, 64, 0.85); pointer-events: none;
        }
        iframe { width: 100%; height: 100%; border: 0; }

/* ================= Footer ================= */
footer { background: var(--bg-card); padding: 50px 20px; text-align: center; border-top: 1px solid rgba(255,255,255,0.05); }
.social-icons { display: flex; gap: 25px; justify-content: center; margin: 20px 0; }
.social-icons a { color: var(--text-white); background: rgba(255,255,255,0.03); width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: 0.3s; }
.social-icons a:hover { background: var(--primary-neon); color: var(--bg-dark); transform: translateY(-5px); }
.footer-about h4 { color: var(--primary); margin-bottom: 20px; font-size: 1.1rem; }
/* ================= Media Queries ================= */
@media (max-width: 1100px) {
    .hero { padding-left: 6%; padding-right: 6%; }
    .about, .services, .contact-section { padding-left: 6%; padding-right: 6%; }
}

@media (max-width: 992px) {
    .overlay-container, .contact-container { flex-direction: column; grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .map-container { order: 2; height: 300px; }
}
@media (max-width: 768px) {
    .menu-icon { display: block; }
    .navbar { padding: 10px 12px; flex-wrap: wrap; }
    .navbar .logo { font-size: 1.05rem; flex: 1 1 auto; min-width: 0; }
    .navbar__lang { flex: 0 1 auto; max-width: min(58vw, 240px); margin-inline-start: auto; }
    .nav-links {
        display: none; width: 100%; flex-direction: column;
        background: var(--bg-dark); position: absolute; top: 100%; left: 0; right: 0;
        padding: 16px 20px 20px; border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35); gap: 14px; z-index: 2200;
    }
    .nav-links.active { display: flex; }
    .nav-links li { width: 100%; text-align: center; }
    .nav-links a:not(.lang-switch__btn) { display: block; padding: 8px 0; font-size: 1rem; }
    .hero {
        min-height: auto; height: auto; padding: 100px 6% 56px;
        justify-content: flex-start;
    }
    .hero h1 { max-width: 100%; }
    .hero p { max-width: 100%; }
    .hero-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
    .hero-btns .btn { margin: 4px; padding: 12px 20px; font-size: 0.9rem; }
    .about { padding: 70px 5%; }
    .about-container { flex-direction: column; gap: 28px; }
    .about-text .about-section-title, .section-title { margin-bottom: 24px; }
    .services { padding: 70px 5%; }
    .services-grid { grid-template-columns: 1fr; gap: 16px; }
    .service-card { padding: 28px 20px; }
    .contact-section { padding: 60px 5%; }
    .contact-container { padding: 22px 16px; gap: 24px; }
    .branch-selector { gap: 10px; }
    .branch-btn { padding: 10px 18px; font-size: 0.85rem; }
    .map-container { height: 260px; }
    .overlay-container { width: 95%; padding: 24px 16px; }
    .img-frame { width: min(280px, 88vw); height: auto; aspect-ratio: 5/6; margin: 0 auto 24px; }
    .img-frame img { right: -8px; top: 12px; }
}
@media (max-width: 600px) {
    .services-grid, .cases-grid { grid-template-columns: 1fr; }
    .img-box:nth-child(4), .img-box:nth-child(5) { grid-column: span 1; }
    .cases-grid { grid-template-columns: 1fr !important; }
    .categories-wrapper { padding: 16px 4%; }
    .category-title { font-size: 1.35rem; }
}

/* زر واتساب — النص في المنتصف بكل اللغات */
.clinic-whatsapp-btn,
#clinic-whatsapp {
    background: #25d366 !important;
    color: #fff !important;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    text-align: center;
    font-weight: 800;
    line-height: 1.35;
    min-height: 46px;
    max-width: 100%;
    transition: 0.3s;
    box-sizing: border-box;
}
.clinic-whatsapp-btn span,
#clinic-whatsapp span {
    display: inline-block;
    text-align: center;
    flex: 0 1 auto;
}
.clinic-whatsapp-btn:hover,
#clinic-whatsapp:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}