/* ==========================================================================
   Dr. Zaid Ghanim Al-Obaidy — shared stylesheet (Arabic + English)
   Mobile first. Logical properties so RTL and LTR share one file.
   ========================================================================== */

:root {
  --navy: #0f2742;
  --navy-deep: #0a1d33;
  --blue: #1e88c8;
  --blue-soft: #e7f2fb;
  --orange: #f39a1e;
  --orange-dark: #d9820d;
  --bg: #f4f7fa;
  --white: #ffffff;
  --ink: #1b2a3a;
  --muted: #5a6b7d;
  --line: #dfe7ef;
  --wa: #25d366;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(15, 39, 66, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 39, 66, 0.16);
  --maxw: 1120px;
  --header-h: 66px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, "Noto Kufi Arabic", "Noto Sans Arabic", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}

html[lang="en"] body {
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
}

h1, h2, h3, h4 {
  line-height: 1.3;
  margin: 0;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Utilities ---------- */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding-block: 56px;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-kicker {
  display: inline-block;
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--blue);
}

html[lang="en"] .section-kicker {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 10px;
}

.section-sub {
  color: var(--muted);
  font-size: 1.02rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0.72rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn-accent {
  background: var(--orange);
  color: #241505;
  box-shadow: 0 10px 24px rgba(243, 154, 30, 0.3);
}

.btn-accent:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.8);
}

.btn-wa {
  background: var(--wa);
  color: #052e16;
}

.btn-wa:hover {
  background: #1eb658;
  transform: translateY(-2px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: var(--header-h);
  padding-block: 8px;
}

.wordmark {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
  text-decoration: none;
  color: var(--navy);
  margin-inline-end: auto;
  padding-block: 2px;
}

.wordmark .wm-name {
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

.wordmark .wm-sub {
  display: none;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 2px;
}

.lang-switch {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  padding: 0.45rem 0.45rem;
  border-radius: 8px;
  white-space: nowrap;
}

.lang-switch:hover {
  background: var(--blue-soft);
}

.header-cta {
  min-height: 44px;
  padding: 0.45rem 0.8rem;
  font-size: 0.84rem;
  flex: none;
}

.nav-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.site-nav {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  display: none;
  padding: 12px 20px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.site-nav.is-open {
  display: block;
}

.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.7rem 0.6rem;
  border-radius: 10px;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--bg);
  color: var(--blue);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 36px 56px;
  color: var(--white);
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(30, 136, 200, 0.28) 0%, rgba(30, 136, 200, 0) 55%),
    linear-gradient(160deg, #0f2742 0%, #0b2038 55%, #0a2138 100%);
}

.hero-grid {
  display: grid;
  gap: 30px;
  align-items: center;
}

.hero-media {
  order: -1;
  width: 100%;
  max-width: 330px;
  margin-inline: auto;
}

.hero-media img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-lg);
}

.hero-copy {
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #b6dbf4;
}

.hero h1 {
  font-size: clamp(2rem, 9vw, 3.4rem);
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: 0.2px;
}

.hero-title {
  font-size: clamp(1rem, 3.4vw, 1.18rem);
  font-weight: 600;
  color: #cfe3f2;
  margin: 0 0 14px;
}

.hero-lead {
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  color: #a9c4da;
  max-width: 54ch;
  margin: 0 auto 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ---------- About ---------- */

.about {
  background: var(--white);
}

.about-body {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
  font-size: 1.08rem;
  color: #33475b;
}

.about-body p + p {
  margin-top: 14px;
}

/* ---------- Services ---------- */

.services {
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 15px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
}

.card-icon svg {
  width: 30px;
  height: 30px;
}

.card h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 6px;
}

.card p {
  color: var(--muted);
  font-size: 0.96rem;
}

/* ---------- Why laparoscopy ---------- */

.why {
  background: var(--white);
}

.benefits {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1000px;
  margin-inline: auto;
}

.benefit {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.benefit-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--white);
  color: var(--orange-dark);
  box-shadow: var(--shadow);
}

.benefit-icon svg {
  width: 26px;
  height: 26px;
}

.benefit h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0;
}

.benefit p {
  color: var(--muted);
  font-size: 0.95rem;
}

.assessment {
  max-width: 1000px;
  margin: 26px auto 0;
  padding: 20px 22px;
  border-inline-start: 4px solid var(--orange);
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 700;
}

/* ---------- Quote strip ---------- */

.quote-strip {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding-block: 72px;
  color: var(--white);
  text-align: center;
}

.quote-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.quote-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(8, 22, 40, 0.6), rgba(8, 22, 40, 0.76));
}

.quote-inner {
  position: relative;
  z-index: 2;
  max-width: 860px;
  padding-inline: 20px;
}

.quote-inner blockquote {
  margin: 0;
  font-size: clamp(1.5rem, 5.6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.45;
}

.quote-inner cite {
  display: block;
  margin-top: 16px;
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 600;
  color: #bcd6ea;
}

/* ---------- Clinic ---------- */

.clinic {
  background: var(--bg);
}

.clinic-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.clinic-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-block: 15px;
  border-bottom: 1px dashed var(--line);
}

.info-row:first-child {
  padding-top: 0;
}

.info-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
}

.info-icon svg {
  width: 22px;
  height: 22px;
}

.info-row h3 {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 3px;
}

.info-row p,
.info-row address {
  margin: 0;
  font-style: normal;
  color: var(--muted);
  font-size: 0.96rem;
}

.hours-note {
  margin-top: 6px !important;
  font-size: 0.85rem !important;
  color: var(--muted);
}

.phone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.phone-list a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  direction: ltr;
  unicode-bidi: isolate;
}

.phone-list a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.clinic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.map-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
}

.map-frame {
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 12px 6px 4px;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.94rem;
  text-decoration: none;
}

.map-link:hover {
  text-decoration: underline;
}

.map-link svg {
  width: 17px;
  height: 17px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 44px 26px;
  background: var(--navy);
  color: #cddcea;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand .fb-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
}

.footer-brand .fb-sub {
  font-size: 0.85rem;
  color: #9fb3c7;
  margin-top: 3px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.social-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
  background: var(--blue);
  transform: translateY(-2px);
}

.social-link svg {
  width: 21px;
  height: 21px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: #9fb3c7;
}

.footer-bottom a {
  color: #cfe3f2;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* ---------- Floating WhatsApp ---------- */

.wa-fab {
  position: fixed;
  inset-inline-end: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wa);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 16px 36px rgba(37, 211, 102, 0.55);
}

.wa-fab svg {
  width: 30px;
  height: 30px;
}

/* ---------- 404 ---------- */

.error-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--bg);
  text-align: center;
}

.error-card {
  max-width: 480px;
  padding: 40px 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.error-code {
  font-size: clamp(4rem, 20vw, 6.5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--navy);
}

.error-card h1 {
  font-size: 1.35rem;
  color: var(--navy);
  margin: 10px 0 8px;
}

.error-card p {
  color: var(--muted);
  margin: 0 0 24px;
}

/* ---------- Larger screens ---------- */

@media (max-width: 400px) {
  .wordmark .wm-name {
    font-size: 0.88rem;
  }

  .lang-switch {
    font-size: 0.75rem;
    padding: 0.4rem 0.35rem;
  }

  .header-cta {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
}

@media (min-width: 560px) {
  .header-inner {
    gap: 10px;
  }

  .wordmark .wm-name {
    font-size: 1.02rem;
  }

  .wordmark .wm-sub {
    display: block;
  }

  .lang-switch {
    font-size: 0.82rem;
    padding: 0.5rem 0.55rem;
  }

  .header-cta {
    padding: 0.5rem 0.95rem;
    font-size: 0.9rem;
  }
}

@media (min-width: 620px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 860px) {
  .section {
    padding-block: 84px;
  }

  .hero {
    padding-block: 64px 88px;
  }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
  }

  .hero-media {
    order: 0;
    max-width: 430px;
    margin-inline-start: auto;
    margin-inline-end: 0;
  }

  .hero-copy {
    text-align: start;
  }

  .hero-lead {
    margin-inline: 0;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .clinic-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (min-width: 920px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    inset: auto;
    display: block;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .site-nav ul {
    flex-direction: row;
    gap: 2px;
  }

  .site-nav a {
    padding: 0.5rem 0.7rem;
    font-size: 0.95rem;
  }
}

@media (min-width: 980px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-grid > .card:last-child:nth-child(3n + 1) {
    grid-column: 2;
  }

  .benefits {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
