
:root{--brown:#492c25;--brown2:#2f1c18;--beige:#ccb295;--cream:#faf7f2;--line:#e7ddd3;--text:#2c211d;--muted:#776c66;--white:#fff;--radius:24px;--shadow:0 14px 45px rgba(73,44,37,.08)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--cream);color:var(--text);font-family:Manrope,Arial,sans-serif;line-height:1.65}.lang-ar{display:none;font-family:'Noto Kufi Arabic',Arial,sans-serif}html[dir=rtl] body{font-family:'Noto Kufi Arabic',Arial,sans-serif}.site-header{position:sticky;top:0;z-index:50;height:84px;display:flex;align-items:center;gap:28px;padding:12px clamp(20px,4vw,64px);background:rgba(250,247,242,.94);backdrop-filter:blur(16px);border-bottom:1px solid rgba(73,44,37,.08)}.brand img{width:150px;display:block}.site-header nav{display:flex;gap:20px;align-items:center;flex:1;justify-content:center}.site-header nav a{color:var(--text);text-decoration:none;font-size:14px;font-weight:600;white-space:nowrap}.site-header nav a.active,.site-header nav a:hover{color:var(--brown);text-decoration:underline;text-underline-offset:7px}.header-actions{display:flex;align-items:center;gap:10px}.lang-toggle,.menu-btn{border:0;background:transparent;color:var(--brown);font-weight:700;cursor:pointer}.menu-btn{display:none;font-size:24px}.when-ar{display:none}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:13px 20px;border-radius:999px;background:var(--brown);color:#fff!important;text-decoration:none!important;font-weight:700;border:1px solid var(--brown);transition:.2s}.btn:hover{transform:translateY(-1px);background:var(--brown2)}.btn-outline{background:transparent;color:var(--brown)!important}.btn-light{background:#fff;color:var(--brown)!important;border-color:#fff}.btn-sm{padding:10px 16px;font-size:13px}main{min-height:65vh}.hero{position:relative;min-height:82vh;display:flex;align-items:flex-end;overflow:hidden;background:#241915}.hero-media,.hero-media video,.hero-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.hero-media:after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(25,17,13,.08),rgba(25,17,13,.72))}.hero-content{position:relative;z-index:2;color:#fff;padding:0 clamp(24px,7vw,110px) clamp(52px,8vw,100px);max-width:930px}.eyebrow{text-transform:uppercase;letter-spacing:.16em;font-size:12px;font-weight:700;opacity:.8}.hero h1{font-size:clamp(42px,7vw,86px);line-height:1.02;margin:10px 0 18px;letter-spacing:-.04em}.hero p{font-size:clamp(17px,2vw,22px);max-width:700px;margin:0 0 28px}.hero-actions{display:flex;gap:12px;flex-wrap:wrap}.section{padding:90px clamp(22px,6vw,88px)}.section.white{background:#fff}.section.dark{background:var(--brown);color:#fff}.section-head{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:34px}.section-head h2,.page-hero h1{font-size:clamp(34px,4.2vw,58px);letter-spacing:-.035em;line-height:1.08;margin:8px 0}.section-head p{max-width:630px;color:var(--muted);margin:0}.dark .section-head p{color:#e8ddd7}.grid{display:grid;gap:22px}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.doctor-card,.article-card,.dept-card,.info-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}.doctor-photo{aspect-ratio:4/4.2;background:linear-gradient(145deg,#f3ebe4,#ded0c4);overflow:hidden;display:flex;align-items:center;justify-content:center}.doctor-photo img{width:100%;height:100%;object-fit:cover}.doctor-photo.placeholder img{width:42%;height:auto;object-fit:contain;opacity:.32}.card-body{padding:22px}.doctor-card h3,.article-card h3{font-size:20px;line-height:1.3;margin:0 0 8px}.meta{font-size:13px;color:var(--muted)}.badge{display:inline-block;padding:6px 10px;border-radius:999px;background:#f2e4c6;color:#6b4a12;font-size:11px;font-weight:800;margin-bottom:10px}.card-actions{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}.text-link{color:var(--brown);font-weight:700;text-decoration:none}.dept-card{padding:28px;min-height:190px;display:flex;flex-direction:column;justify-content:space-between}.dept-icon{width:45px;height:45px;border-radius:14px;background:#f0e7df;display:grid;place-items:center;color:var(--brown);font-weight:800}.dept-card h3{margin:28px 0 0;font-size:22px}.page-hero{padding:80px clamp(22px,6vw,88px) 55px;background:linear-gradient(135deg,#f1e6dd,#faf7f2)}.page-hero p{max-width:760px;color:var(--muted)}.toolbar{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:28px}.search{flex:1;min-width:240px;padding:14px 18px;border:1px solid var(--line);border-radius:14px;background:#fff;font:inherit}.filter{padding:14px 18px;border:1px solid var(--line);border-radius:14px;background:#fff;font:inherit}.article-card{padding:26px}.article-card .category{font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:#8a6b59;font-weight:800}.article-card p{color:var(--muted)}.split{display:grid;grid-template-columns:1.05fr .95fr;gap:54px;align-items:center}.split img{width:100%;border-radius:30px;box-shadow:var(--shadow)}.contact-list{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.contact-item{padding:20px;border-radius:18px;background:#fff;border:1px solid var(--line)}.contact-item strong{display:block;margin-bottom:3px}.article-wrap{max-width:900px;margin:auto}.article-wrap h1{font-size:clamp(34px,5vw,60px);line-height:1.12;letter-spacing:-.035em}.article-content{background:#fff;border-radius:28px;padding:clamp(24px,5vw,58px);box-shadow:var(--shadow)}.article-content h2{margin-top:34px;color:var(--brown)}.article-content p{font-size:17px}.article-content details{border-top:1px solid var(--line);padding:16px 0}.article-content summary{font-weight:700;cursor:pointer}.doctor-profile{display:grid;grid-template-columns:minmax(300px,.8fr) 1.2fr;gap:55px;align-items:start}.profile-photo{width:100%;border-radius:28px;background:#eee;overflow:hidden}.profile-photo img{width:100%;display:block}.profile-details h1{font-size:clamp(38px,5vw,62px);line-height:1.08;margin:6px 0 12px}.service-tags{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}.service-tags span{background:#fff;border:1px solid var(--line);padding:9px 12px;border-radius:999px;font-size:13px}.floor-list{display:grid;gap:12px}.floor-row{display:grid;grid-template-columns:110px 1fr;gap:20px;padding:20px 22px;background:#fff;border:1px solid var(--line);border-radius:18px}.floor-num{font-weight:800;color:var(--brown)}footer{background:#211714;color:#f7efeb;padding:58px clamp(22px,6vw,88px) 24px}.footer-grid{display:grid;grid-template-columns:1.5fr repeat(3,1fr);gap:38px}.footer-logo{width:160px;filter:brightness(0) invert(1);opacity:.95}footer h4{margin-top:0}footer a{display:block;color:#eee1db;text-decoration:none;margin:8px 0;font-size:14px}footer .muted{color:#c7b9b3}.footer-bottom{border-top:1px solid rgba(255,255,255,.15);margin-top:40px;padding-top:18px;display:flex;justify-content:space-between;gap:20px;color:#b9aaa3;font-size:12px}.floating-wa{position:fixed;right:22px;bottom:22px;width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:#25D366;color:white;font-size:28px;text-decoration:none;z-index:60;box-shadow:0 10px 30px rgba(0,0,0,.2)}html[dir=rtl] .floating-wa{right:auto;left:22px}.quick-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--line)}.quick-strip a{padding:24px;text-align:center;background:#fff;color:var(--brown);text-decoration:none;font-weight:700}.empty{padding:35px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:18px}.medical-note{margin-top:24px;padding:18px 20px;border-radius:16px;background:#f7efe9;color:#6c5a51;font-size:13px}.social-row{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}.social-row a{color:var(--brown);font-weight:700;text-decoration:none}.lang-ar.block,.lang-en.block{display:block}
@media(max-width:1050px){.site-header nav{position:fixed;top:84px;left:0;right:0;background:var(--cream);padding:24px;display:none;flex-direction:column;align-items:flex-start;border-bottom:1px solid var(--line)}.site-header nav.open{display:flex}.menu-btn{display:block}.site-header{gap:12px}.brand{margin-right:auto}.header-actions .btn{display:none}.grid-4{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:repeat(2,1fr)}.split,.doctor-profile{grid-template-columns:1fr}.footer-grid{grid-template-columns:1fr 1fr}.quick-strip{grid-template-columns:1fr 1fr 1fr}}
@media(max-width:650px){.site-header{height:72px;padding:10px 18px}.site-header nav{top:72px}.brand img{width:125px}.section{padding:65px 18px}.page-hero{padding:55px 18px 35px}.hero{min-height:74vh}.hero-content{padding:0 20px 44px}.grid-4,.grid-3{grid-template-columns:1fr}.section-head{align-items:flex-start;flex-direction:column}.quick-strip{grid-template-columns:1fr}.contact-list{grid-template-columns:1fr}.footer-grid{grid-template-columns:1fr}.footer-bottom{flex-direction:column}.floor-row{grid-template-columns:80px 1fr}.profile-details h1{font-size:38px}.doctor-photo{aspect-ratio:4/4}.hero-media video{display:none}}

/* Robust bilingual visibility */
.lang-en,.when-en{display:inline}
.lang-ar,.when-ar{display:none!important}
html[lang="ar"] .lang-en,html[lang="ar"] .when-en{display:none!important}
html[lang="ar"] .lang-ar,html[lang="ar"] .when-ar{display:inline!important}
html[lang="en"] .lang-en,html[lang="en"] .when-en{display:inline!important}
html[lang="en"] .lang-ar,html[lang="en"] .when-ar{display:none!important}
html[lang="ar"] .lang-ar.block,html[lang="en"] .lang-en.block{display:block!important}
html[dir="rtl"] .section-head,html[dir="rtl"] .hero-content,html[dir="rtl"] .page-hero,html[dir="rtl"] .card-body,html[dir="rtl"] .profile-details,html[dir="rtl"] .article-content,html[dir="rtl"] footer{text-align:right}
html[dir="rtl"] .card-actions,html[dir="rtl"] .hero-actions,html[dir="rtl"] .service-tags,html[dir="rtl"] .social-row{direction:rtl}
html[dir="rtl"] .text-link{display:inline-flex;gap:6px;align-items:center}
html[dir="rtl"] .site-header nav{direction:rtl}
html[dir="rtl"] .header-actions{direction:rtl}
html[dir="rtl"] .quick-strip{direction:rtl}

/* v4: static bilingual routes. Arabic no longer depends on JavaScript. */
.lang-toggle{display:inline-flex;align-items:center;justify-content:center;padding:9px 13px;border:1px solid var(--brown);border-radius:999px;text-decoration:none;color:var(--brown);font-weight:700;line-height:1.2}
html[lang=ar] body{font-family:'Noto Kufi Arabic',Arial,sans-serif;text-align:right}
html[lang=ar] .site-header,html[lang=ar] .section-head,html[lang=ar] .card-actions,html[lang=ar] .hero-actions,html[lang=ar] .header-actions{direction:rtl}
html[lang=ar] .text-link{direction:rtl}
html[lang=ar] .text-link::after{content:' ←';}
html[lang=ar] .text-link{font-family:'Noto Kufi Arabic',Arial,sans-serif}
.card-actions .btn,.card-actions .btn-outline,.card-actions .text-link{min-height:42px;align-items:center}
@media(max-width:760px){html[lang=ar] .site-header nav{text-align:right}}


/* v5 definitive language layout fix */
html[lang="en"], html[lang="en"] body { direction:ltr !important; text-align:left !important; }
html[lang="en"] .site-header { direction:ltr !important; }
html[lang="en"] .brand { order:0 !important; margin-left:0 !important; margin-right:0 !important; }
html[lang="en"] .site-header nav { direction:ltr !important; order:1 !important; }
html[lang="en"] .header-actions { direction:ltr !important; order:2 !important; }
html[lang="en"] .hero { direction:ltr !important; justify-content:flex-start !important; }
html[lang="en"] .hero-content { direction:ltr !important; text-align:left !important; margin-left:0 !important; margin-right:auto !important; }
html[lang="en"] .hero-actions, html[lang="en"] .card-actions, html[lang="en"] .service-tags, html[lang="en"] .social-row { direction:ltr !important; justify-content:flex-start; }
html[lang="en"] .section-head, html[lang="en"] .page-hero, html[lang="en"] .card-body, html[lang="en"] .profile-details, html[lang="en"] .article-content, html[lang="en"] footer { direction:ltr !important; text-align:left !important; }
html[lang="en"] .quick-strip, html[lang="en"] .footer-grid, html[lang="en"] .floor-list { direction:ltr !important; }

html[lang="ar"], html[lang="ar"] body { direction:rtl !important; text-align:right !important; }
html[lang="ar"] .site-header { direction:rtl !important; }
html[lang="ar"] .brand { order:0 !important; margin-right:0 !important; margin-left:0 !important; }
html[lang="ar"] .site-header nav { direction:rtl !important; order:1 !important; }
html[lang="ar"] .header-actions { direction:rtl !important; order:2 !important; }
html[lang="ar"] .hero { direction:rtl !important; justify-content:flex-start !important; }
html[lang="ar"] .hero-content { direction:rtl !important; text-align:right !important; margin-right:0 !important; margin-left:auto !important; }
html[lang="ar"] .hero-actions, html[lang="ar"] .card-actions, html[lang="ar"] .service-tags, html[lang="ar"] .social-row { direction:rtl !important; justify-content:flex-start; }
html[lang="ar"] .section-head, html[lang="ar"] .page-hero, html[lang="ar"] .card-body, html[lang="ar"] .profile-details, html[lang="ar"] .article-content, html[lang="ar"] footer { direction:rtl !important; text-align:right !important; }
html[lang="ar"] .quick-strip, html[lang="ar"] .footer-grid, html[lang="ar"] .floor-list { direction:rtl !important; }
html[lang="ar"] .profile-details h3 { margin-top:28px; margin-bottom:10px; color:var(--brown); }
html[lang="ar"] .service-tags span { direction:rtl; unicode-bidi:plaintext; }

@media(max-width:1050px){
 html[lang="en"] .brand{margin-right:auto !important;}
 html[lang="ar"] .brand{margin-left:auto !important;}
 html[lang="en"] .site-header nav{align-items:flex-start;text-align:left!important;}
 html[lang="ar"] .site-header nav{align-items:flex-end;text-align:right!important;}
}

/* v6 — persistent corner logo + footer logo fix */
.site-header{padding-left:260px;}
.site-header .brand{
  position:fixed;
  top:0;
  left:68px;
  z-index:90;
  display:block;
  width:168px;
  height:132px;
}
.site-header .brand img{
  width:168px;
  height:132px;
  object-fit:cover;
  display:block;
}
html[dir="rtl"] .site-header{padding-left:clamp(20px,4vw,64px);padding-right:260px;}
html[dir="rtl"] .site-header .brand{left:auto;right:68px;}
.footer-logo{
  width:132px;
  height:auto;
  filter:none !important;
  opacity:1;
  object-fit:contain;
  display:block;
  background:transparent;
}
@media(max-width:900px){
  .site-header{padding-left:108px;}
  .site-header .brand{left:18px;width:82px;height:84px;}
  .site-header .brand img{width:82px;height:84px;object-fit:cover;}
  html[dir="rtl"] .site-header{padding-left:20px;padding-right:108px;}
  html[dir="rtl"] .site-header .brand{right:18px;left:auto;}
}
