:root {
  --primary: #0e7c86;
  --primary-dark: #0a5f66;
  --primary-deep: #06454c;
  --primary-light: #e0f2f4;
  --ink: #16333c;
  --muted: #5d7681;
  --bg: #ffffff;
  --bg-alt: #f2f8f9;
  --accent: #e0674a;
  --accent-light: #fdeeea;
  --line: #dde9ec;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(10, 95, 102, .08);
  --shadow-lg: 0 18px 45px rgba(6, 69, 76, .14);
  --font: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
  --container: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
ul { list-style: none; }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; display: inline-block; vertical-align: -0.15em; }
.accent { color: var(--accent); }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: inherit;
  font-size: .98rem;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .22s ease;
  white-space: nowrap;
}
.btn .icon { width: 1.05em; height: 1.05em; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.55); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255,255,255,.22); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-light:hover { background: var(--primary-light); transform: translateY(-2px); }
.btn-cta { background: var(--accent); color: #fff; padding: 11px 22px; font-size: .92rem; }
.btn-cta:hover { background: #c75339; transform: translateY(-2px); }

/* ============ Top bar ============ */
.topbar { background: var(--primary-deep); color: #cfe7ea; font-size: .88rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar-note { display: inline-flex; align-items: center; gap: 8px; }
.lang-switch {
  color: #fff; font-weight: 700; font-size: .85rem;
  padding: 4px 12px; border: 1px solid rgba(255,255,255,.4); border-radius: 999px;
  transition: all .2s ease; flex-shrink: 0;
}
.lang-switch:hover { background: rgba(255,255,255,.15); }

/* ============ Header / nav ============ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(6,69,76,.03);
}
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { width: 46px; height: 46px; }
.brand-light .brand-logo { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.22rem; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.brand-text small { font-size: .78rem; color: var(--primary); font-weight: 700; }
.brand-light .brand-text strong { color: #fff; }
.brand-light .brand-text small { color: #9fd4d9; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.main-nav a {
  color: var(--ink); font-weight: 700; font-size: .95rem;
  padding: 10px 14px; border-radius: 999px; transition: all .2s ease;
}
.main-nav a:hover { color: var(--primary); background: var(--primary-light); }
.main-nav a.active { color: #fff; background: var(--primary); }

.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; margin: 6px auto; width: 24px; background: var(--ink); border-radius: 2px; transition: all .25s ease; }

/* ============ Section scaffolding ============ */
.section { padding: 84px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  display: inline-block; font-size: .82rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 10px;
}
.section-title { font-size: 2.05rem; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.section-title.center { text-align: center; }
.section-text { color: var(--muted); margin-top: 12px; font-size: 1.02rem; }
.section-more { margin-top: 40px; text-align: center; }

/* ============ Hero ============ */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(14,124,134,.55), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(224,103,74,.28), transparent 55%),
    linear-gradient(135deg, var(--primary-deep) 0%, var(--primary-dark) 55%, var(--primary) 100%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px;
}
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; min-height: 540px; padding-block: 72px; }
.hero-content { max-width: 640px; }
.hero .kicker { color: #9fd4d9; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); font-weight: 900; line-height: 1.22; letter-spacing: -.015em; margin-bottom: 20px; }
.hero-text { font-size: 1.15rem; color: #d5ecf0; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============ Stats ============ */
.stats { padding: 40px 0 70px; margin-top: -20px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-num { display: block; font-size: 2.1rem; font-weight: 900; color: var(--primary); line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .92rem; font-weight: 600; margin-top: 6px; display: inline-block; }

/* ============ Cards grid ============ */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards-grid.three { grid-template-columns: repeat(3, 1fr); }

.service-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: all .25s ease; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; inset-inline-start: 0; inset-block-start: 0;
  height: 4px; width: 0; background: var(--primary); transition: width .3s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service-card:hover::before { width: 100%; }
.service-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 14px;
  background: var(--primary-light); color: var(--primary);
  margin-bottom: 18px;
}
.service-icon .icon { width: 28px; height: 28px; }
.service-name { font-size: 1.16rem; font-weight: 800; margin-bottom: 8px; color: var(--ink); }
.service-desc { color: var(--muted); font-size: .94rem; line-height: 1.65; }
.service-more { margin-top: auto; padding-top: 16px; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; }
.service-card:hover .service-more .icon { transform: translateX(4px); }
[dir="rtl"] .service-card:hover .service-more .icon { transform: translateX(-4px); }
.service-more .icon { transition: transform .2s ease; }

/* ============ Why ============ */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.why-card { background: #fff; border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.why-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--primary-light); color: var(--primary); margin-bottom: 16px;
}
.why-check .icon { width: 22px; height: 22px; }
.why-card h3 { font-size: 1.08rem; font-weight: 800; margin-bottom: 8px; }
.why-card p { color: var(--muted); font-size: .93rem; line-height: 1.7; }

/* ============ News cards ============ */
.news-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.news-card.full { padding: 30px; margin-bottom: 22px; transition: all .25s ease; }
.news-card.full:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.news-date {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 700; color: var(--primary);
  background: var(--primary-light); border-radius: 999px;
  padding: 5px 14px; align-self: flex-start; margin-bottom: 14px;
}
.news-title { font-size: 1.05rem; font-weight: 800; line-height: 1.45; margin-bottom: 8px; }
.news-card.full .news-title { font-size: 1.3rem; }
.news-title a { color: var(--ink); }
.news-title a:hover { color: var(--primary); }
.news-excerpt { color: var(--muted); font-size: .93rem; line-height: 1.7; }
.news-list { max-width: 820px; margin-inline: auto; }

/* ============ Emergency CTA ============ */
.emergency-cta { background: linear-gradient(135deg, #c04b31, var(--accent)); color: #fff; padding: 54px 0; }
.emergency-cta-inner { display: flex; align-items: center; gap: 26px; }
.emergency-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 76px; height: 76px; border-radius: 22px; flex-shrink: 0;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
}
.emergency-icon .icon { width: 40px; height: 40px; }
.emergency-cta .kicker { color: #ffd9cf; }
.emergency-cta h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.emergency-cta p:not(.kicker) { color: #ffe9e2; max-width: 520px; }
.emergency-cta-inner .btn { margin-inline-start: auto; flex-shrink: 0; }

/* ============ Page hero ============ */
.page-hero {
  position: relative; color: #fff; padding: 74px 0 66px; overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% -20%, rgba(14,124,134,.5), transparent 60%),
    linear-gradient(135deg, var(--primary-deep), var(--primary-dark) 60%, var(--primary));
}
.page-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 900; line-height: 1.25; letter-spacing: -.01em; }
.page-hero .kicker { color: #9fd4d9; }
.page-hero-text { color: #d5ecf0; max-width: 640px; margin-top: 12px; font-size: 1.06rem; }

/* ============ Split / about ============ */
.split { display: grid; grid-template-columns: 1.25fr .9fr; gap: 50px; align-items: start; }
.split-text p { color: var(--muted); margin-bottom: 16px; }
.split-text p:first-of-type { margin-top: 0; }

.split-card {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px;
}
.timeline { display: grid; gap: 22px; }
.timeline-item { position: relative; padding-inline-start: 26px; }
.timeline-item::before {
  content: ''; position: absolute; inset-inline-start: 5px; inset-block-start: 6px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--primary);
  box-shadow: 0 0 0 5px var(--primary-light);
}
.timeline-item::after {
  content: ''; position: absolute; inset-inline-start: 10px; inset-block-start: 24px;
  width: 2px; top: 26px; bottom: -24px; background: var(--line);
}
.timeline-item:last-child::after { display: none; }
.timeline-year { display: block; font-weight: 900; color: var(--primary); font-size: 1.05rem; }
.timeline-text { color: var(--ink); font-weight: 600; font-size: .95rem; }

/* ============ Mission cards ============ */
.mission-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm);
}
.mission-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 14px;
  background: var(--primary-light); color: var(--primary); margin-bottom: 16px;
}
.mission-icon .icon { width: 28px; height: 28px; }
.mission-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 8px; }
.mission-card p { color: var(--muted); font-size: .94rem; }

/* ============ Departments ============ */
.dept-row {
  display: flex; align-items: center; gap: 22px;
  padding: 26px 8px; border-bottom: 1px solid var(--line);
  transition: all .2s ease;
}
.dept-row:first-of-type { border-top: 1px solid var(--line); }
.dept-row:hover { background: var(--bg-alt); padding-inline: 18px; }
.dept-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 16px; flex-shrink: 0;
  background: var(--primary-light); color: var(--primary);
}
.dept-icon .icon { width: 30px; height: 30px; }
.dept-info { flex: 1; }
.dept-name { font-size: 1.2rem; font-weight: 800; margin-bottom: 2px; }
.dept-desc { color: var(--muted); font-size: .95rem; }
.dept-num { font-size: 2.4rem; font-weight: 900; color: var(--line); line-height: 1; }

/* ============ Doctors ============ */
.doctor-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 26px 28px; text-align: center; box-shadow: var(--shadow-sm);
  transition: all .25s ease;
}
.doctor-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.doctor-ava {
  display: inline-flex; align-items: center; justify-content: center;
  width: 78px; height: 78px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #cfecef);
  color: var(--primary); margin-bottom: 16px;
}
.doctor-ava .icon { width: 38px; height: 38px; }
.doctor-name { font-size: 1.12rem; font-weight: 800; }
.doctor-role { color: var(--primary); font-weight: 700; font-size: .92rem; margin-top: 4px; }
.doctor-dept {
  display: inline-block; margin-top: 12px; font-size: .8rem; font-weight: 700;
  color: var(--muted); background: var(--bg-alt); border: 1px solid var(--line);
  padding: 5px 14px; border-radius: 999px;
}

/* ============ Contact ============ */
.contact-item { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 13px;
  background: var(--primary-light); color: var(--primary);
}
.contact-icon .icon { width: 24px; height: 24px; }
.contact-item h3 { font-size: 1rem; font-weight: 800; margin-bottom: 2px; }
.contact-item p { color: var(--muted); font-size: .96rem; }

.contact-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 22px;
}
.contact-panel-head { display: flex; gap: 16px; }
.contact-panel-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 54px; height: 54px; border-radius: 15px;
  background: var(--accent-light); color: var(--accent);
}
.contact-panel-icon .icon { width: 28px; height: 28px; }
.contact-panel h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; }
.contact-panel p { color: var(--muted); font-size: .94rem; }

.map-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  min-height: 300px; border: 2px dashed var(--line); border-radius: var(--radius);
  background:
    linear-gradient(rgba(14,124,134,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,124,134,.05) 1px, transparent 1px),
    var(--bg-alt);
  background-size: 40px 40px; text-align: center; color: var(--muted);
}
.map-marker {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary); color: #fff; box-shadow: var(--shadow-lg);
}
.map-marker .icon { width: 30px; height: 30px; }

/* ============ Footer ============ */
.site-footer { background: var(--primary-deep); color: #c8dee2; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 44px;
  padding: 62px 24px 48px; max-width: var(--container); margin-inline: auto;
}
.footer-about p { margin-top: 16px; color: #a9c8cd; font-size: .94rem; max-width: 360px; }
.footer-col h4 { color: #fff; font-size: 1.02rem; font-weight: 800; margin-bottom: 18px; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: #a9c8cd; font-size: .94rem; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-contact li { margin-bottom: 9px; color: #a9c8cd; font-size: .94rem; list-style: none; }
.footer-contact a { color: #9fd4d9; font-weight: 700; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  max-width: var(--container); margin-inline: auto; padding: 18px 24px;
  font-size: .85rem; color: #8fb4b9;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; margin-inline-start: auto; }
  .btn-cta { display: none; }
  .main-nav {
    position: fixed; top: 0; inset-inline-end: -300px; width: 280px; height: 100vh;
    background: #fff; flex-direction: column; align-items: flex-start; gap: 8px;
    padding: 90px 26px; box-shadow: var(--shadow-lg); transition: inset-inline-end .3s ease; z-index: 70;
  }
  .main-nav.open { inset-inline-end: 0; }
  .main-nav a { padding: 12px 16px; width: 100%; }
  .nav-toggle { position: relative; z-index: 80; }
  .nav-toggle .open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle .open span:nth-child(2) { opacity: 0; }
  .nav-toggle .open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .cards-grid, .cards-grid.three { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .emergency-cta-inner { flex-wrap: wrap; }
  .emergency-cta-inner .btn { margin-inline-start: 0; }
}

@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid, .cards-grid.three, .why-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.05rem; }
  .hero-inner { min-height: 440px; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar-note { font-size: .78rem; }
  .dept-row { flex-wrap: wrap; }
  .dept-num { display: none; }
  .section-title { font-size: 1.7rem; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}