/* 1. Design tokens */
:root {
  --ink: #0f2b33;
  --deep: #0b3b4a;
  --teal: #0e7c86;
  --tl: #5fb9be;
  --mist: #eef7f7;
  --brass: #e3a72f;
  --on-gold: #1b1400;
  --line: #d8e7e7;
  --mute: #3b5a62;
  --r: 14px;
  --gold-grad: linear-gradient(135deg, #f4c55b, #d99a1e);
  --gold-grad-hover: linear-gradient(135deg, #f7ce72, #e3a72f);
  --teal-grad: linear-gradient(135deg, var(--teal), var(--deep));
}

/* 2. Base */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: "Tajawal", sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.8;
  overflow-x: hidden;
  padding-bottom: 78px;
}

h1,
h2,
h3 {
  font-family: "Cairo", sans-serif;
  color: var(--deep);
  margin: 0 0 0.5em;
  line-height: 1.4;
}

p {
  margin: 0 0 1em;
  max-width: 64ch;
}

a {
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

:is(a, button, summary, input, select, textarea, .hotspot):focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
}

/* 3. Layout */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

section {
  padding: 68px 0;
}

.section-alt {
  background: var(--mist);
}

.section-head {
  max-width: 640px;
  margin-bottom: 38px;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.section-head h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin-top: 10px;
  border-radius: 4px;
  background: var(--brass);
}

.mt-m {
  margin-top: 22px;
}

.mt-l {
  margin-top: 24px;
}

/* 4. Header */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 10px;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Cairo", sans-serif;
  font-weight: 800;
  color: var(--deep);
  text-decoration: none;
}

.brand small {
  display: block;
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--teal);
  line-height: 1.2;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(160deg, var(--teal), var(--deep));
  display: grid;
  place-items: center;
  flex: none;
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

nav ul {
  display: flex;
  gap: 16px;
}

nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

nav a:hover {
  color: var(--teal);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
  color: var(--deep);
}

/* 5. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: 999px;
  font:
    700 1rem "Tajawal",
    sans-serif;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
}

.btn-primary,
.header-call {
  background: var(--gold-grad);
  color: var(--on-gold);
  box-shadow: 0 10px 22px -12px rgba(217, 154, 30, 0.8);
}

.btn-primary:hover {
  background: var(--gold-grad-hover);
}

.header-call {
  text-decoration: none;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  white-space: nowrap;
}

.btn-ghost {
  border-color: #8fdcd0;
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-light {
  background: #fff;
  color: #7c5920;
}

.btn-outline {
  border-color: var(--teal);
  color: var(--teal);
}

.btn-block {
  width: 100%;
}

/* 6. Hero */
.hero {
  background: radial-gradient(
    120% 140% at 20% 0,
    #14606b,
    var(--deep) 55%,
    #082530
  );
  color: #fff;
  padding: 70px 0 84px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -140px;
  right: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(227, 167, 47, 0.28),
    transparent 65%
  );
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
}

.hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  max-width: 18ch;
}

.hero p {
  color: #d9eeee;
  font-size: 1.06rem;
  max-width: 48ch;
}

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

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 30px;
  color: #bfe7e9;
  font-size: 0.95rem;
}

.hero-facts li::before {
  content: "✓ ";
  content: "✓ " / "";
  color: #8fdcd0;
  font-weight: 700;
}

.bubbles span {
  position: absolute;
  bottom: -60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  animation: rise linear infinite;
  pointer-events: none;
}

@keyframes rise {
  to {
    transform: translateY(-820px);
  }
}

.wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 50px;
  display: block;
}

/* 7. Cards & forms */
.card {
  background: #fff;
  color: var(--ink);
  border-radius: var(--r);
  padding: 26px;
  box-shadow: 0 24px 50px -28px #000;
}

.card h2 {
  font-size: 1.15rem;
}

.contact .card {
  border: 1px solid var(--line);
  box-shadow: none;
}

label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 4px;
}

input,
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 11px 12px;
  border: 1px solid #b9d3d3;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  margin-bottom: 12px;
}

textarea {
  resize: vertical;
  min-height: 70px;
}

.note {
  font-size: 0.85rem;
  color: var(--mute);
  margin: 8px 0 0;
}

/* 8. Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: -46px;
  position: relative;
  z-index: 2;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 12px;
  text-align: center;
  box-shadow: 0 18px 34px -24px rgba(11, 59, 74, 0.5);
}

.stat b {
  font:
    800 1.7rem "Cairo",
    sans-serif;
  color: var(--teal);
  display: block;
  line-height: 1.3;
}

.stat b span {
  font: inherit;
  color: inherit;
}

.stat > span {
  font-size: 0.88rem;
  color: var(--mute);
}

/* 9. Service cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: linear-gradient(180deg, #fff, var(--mist));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  overflow: hidden;
}

.section-alt .service-card {
  background: #fff;
}

.service-card h3 {
  font-size: 1.08rem;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--mute);
  margin-bottom: 0.6em;
}

.service-card small {
  display: block;
  color: var(--teal);
  font-weight: 700;
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--teal-grad);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

/* 9b. Images (services / articles / gallery) */
.pic {
  margin: 0;
  overflow: hidden;
  background: linear-gradient(160deg, #eaf6f6, #bfe7e9);
  line-height: 0;
}

.pic svg,
.pic img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5/3;
  object-fit: cover;
}

#services .card-icon {
  display: none;
}

#services .service-card .pic {
  margin: -24px -24px 16px;
  border-radius: 18px 18px 0 0;
}

#articles details .pic {
  border-radius: 12px;
  margin: 0 0 14px;
  max-width: 520px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.gallery figure {
  margin: 0;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  cursor: zoom-in;
}

.gallery figure:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
}

.gallery figcaption {
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--deep);
}

.gallery .pic {
  transition: transform 0.3s;
}

.gallery figure:hover .pic {
  transform: scale(1.04);
}

#lightbox {
  border: 0;
  padding: 0;
  border-radius: var(--r);
  width: min(760px, 92vw);
  background: #fff;
  overflow: hidden;
}

#lightbox::backdrop {
  background: rgba(8, 37, 48, 0.8);
}

#lightbox .lb-cap {
  padding: 14px 18px;
  font-weight: 700;
  color: var(--deep);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

#lightbox button {
  font:
    700 0.95rem "Tajawal",
    sans-serif;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 18px;
  min-height: 40px;
  cursor: pointer;
}

/* 10. Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.steps b {
  font-family: "Cairo", sans-serif;
  font-size: 1.5rem;
  color: var(--tl);
  display: block;
}

.steps h3 {
  font-size: 1.02rem;
}

.steps p {
  font-size: 0.93rem;
  color: var(--mute);
}

/* 11. Why us */
.why {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}

.why li {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.why li::before {
  content: "✓";
  content: "✓" / "";
  color: var(--teal);
  font-weight: 800;
  flex: none;
}

.why h3 {
  font-size: 1rem;
  margin: 0;
}

.why p {
  font-size: 0.94rem;
  color: var(--mute);
  margin: 0;
}

.panel {
  background: linear-gradient(160deg, var(--deep), #0a2e39);
  color: #fff;
  border-radius: var(--r);
  padding: 30px;
}

.panel h3 {
  color: #fff;
}

.panel p {
  color: #cfe7e7;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 500;
}

.panel .chips {
  margin: 14px 0 18px;
}

.panel .chips li {
  color: var(--ink);
}

/* 12. Anatomy */
.anatomy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

@media (max-width: 600px) {
  #reviews .card-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 22px;
    margin-inline: -22px;
    padding: 4px 22px 16px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    align-items: stretch;
  }

  #reviews .card-grid::-webkit-scrollbar {
    display: none;
  }

  #reviews .review-card {
    flex: 0 0 min(84%, 340px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

.service-card .more {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 0;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.areas {
  margin: 22px 0 0;
  color: var(--mute);
  font-size: 0.92rem;
}

.areas b {
  color: var(--deep);
}

footer nav a,
footer p a {
  text-underline-offset: 3px;
}

.anatomy-pic {
  margin: 0;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  border-radius: 18px;
  overflow: hidden;
  background: #eaf6f6;
  box-shadow: 0 18px 40px -22px rgba(11, 59, 74, 0.45);
  line-height: 0;
}

.anatomy-pic img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70dvh;
  object-fit: cover;
}

.anatomy svg {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
}

.hotspot {
  cursor: pointer;
}

.hotspot circle {
  fill: var(--brass);
  stroke: #fff;
  stroke-width: 3;
}

.hotspot text {
  fill: var(--on-gold);
  font:
    800 14px "Cairo",
    sans-serif;
  pointer-events: none;
}

.hotspot.on circle {
  fill: var(--teal);
}

.hotspot.on text {
  fill: #fff;
}

.hotspot:focus-visible {
  outline: none;
}

.hotspot:focus-visible circle {
  stroke: var(--deep);
  stroke-width: 4;
}

.anatomy-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.anatomy-list button {
  font:
    700 1rem "Tajawal",
    sans-serif;
  text-align: start;
  padding: 12px 16px;
  min-height: 46px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.anatomy-list button.on {
  border-color: var(--teal);
  background: #e3f3f3;
  color: var(--deep);
}

.anatomy-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 0.96rem;
  color: var(--mute);
}

.anatomy-panel b {
  color: var(--deep);
}

/* 13. Quiz */
.section-dark {
  background: linear-gradient(160deg, var(--deep), #082530);
  color: #fff;
}

.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-dark .section-head p {
  color: #cfe7e7;
}

.quiz {
  max-width: 640px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r);
  padding: 26px;
}

.quiz h3 {
  font-size: 1.2rem;
}

.quiz p {
  color: #d9eeee;
}

.quiz-fine {
  font-size: 0.85rem;
  color: #9fc2c2;
}

.quiz-progress {
  height: 6px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.15);
  margin-bottom: 18px;
  overflow: hidden;
}

.quiz-progress span {
  display: block;
  height: 100%;
  background: var(--brass);
  transition: width 0.3s;
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-options button {
  font:
    700 1rem "Tajawal",
    sans-serif;
  text-align: start;
  padding: 13px 16px;
  min-height: 48px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.quiz-options button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #8fdcd0;
}

.link-button {
  background: none;
  border: 0;
  color: #8fdcd0;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  margin-top: 14px;
  padding: 6px 0;
}

/* 14. Timeline */
.timeline {
  border-inline-start: 3px solid var(--tl);
  max-width: 640px;
  margin-inline-start: 9px;
}

.timeline li {
  position: relative;
  padding-inline-start: 28px;
  padding-bottom: 20px;
}

.timeline li::before {
  content: "";
  position: absolute;
  inset-inline-start: -12px;
  top: 6px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--brass);
  border: 4px solid var(--mist);
}

.timeline b {
  font-family: "Cairo", sans-serif;
  color: var(--deep);
}

.timeline p {
  margin: 0;
  color: var(--mute);
  font-size: 0.95rem;
}

/* 15. Reviews */
.review-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  margin: 0;
}

.review-card .review-stars {
  color: var(--brass);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.review-card p {
  font-size: 0.97rem;
  margin-bottom: 12px;
}

.review-card figcaption {
  font-size: 0.9rem;
  color: var(--mute);
  font-weight: 700;
}

/* 16. Articles filter & accordions */
.article-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.article-filter button {
  font:
    700 0.92rem "Tajawal",
    sans-serif;
  padding: 8px 18px;
  min-height: 40px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  color: var(--ink);
}

.article-filter button.on {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.accordion {
  display: grid;
  gap: 12px;
  max-width: 780px;
}

.accordion a {
  color: var(--teal);
  font-weight: 700;
}

details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  background: #fff;
}

details[open] summary {
  margin-bottom: 10px;
}

details p,
details li {
  font-size: 0.95rem;
  color: var(--mute);
  margin: 0 0 0.4em;
}

details ul {
  list-style: disc;
  padding-inline-start: 20px;
}

details ol {
  list-style: decimal;
  padding-inline-start: 20px;
}

summary {
  font-family: "Cairo", sans-serif;
  font-weight: 700;
  color: var(--deep);
  cursor: pointer;
  list-style: none;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline-end: 38px;
}

summary::-webkit-details-marker {
  display: none;
}

summary h3 {
  display: inline;
  flex: 1;
  font: inherit;
  margin: 0;
  color: inherit;
}

summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--mist);
  color: var(--teal);
  font:
    700 1.25rem/1 "Cairo",
    sans-serif;
}

details[open] summary::after {
  content: "\2212";
  background: var(--teal);
  color: #fff;
}

/* 17. CTA, contact, footer */
.cta-band {
  background: var(--gold-grad);
  color: var(--on-gold);
  padding: 40px 0;
}

.cta-band .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-band h2 {
  color: var(--on-gold);
  margin: 0 0 4px;
  font-size: 1.4rem;
}

.cta-band p {
  color: var(--on-gold);
  margin: 0;
}

.contact {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}

.big {
  display: block;
  font-family: "Cairo", sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--deep);
  text-decoration: none;
  direction: ltr;
  text-align: right;
}

footer {
  background: var(--deep);
  color: #cfe7e7;
  padding: 36px 0;
  font-size: 0.92rem;
}

footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

footer p {
  margin: 0;
  max-width: none;
}

footer a {
  color: #fff;
  text-decoration: none;
}

footer details {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  flex-basis: 100%;
  padding: 10px 16px;
}

footer summary {
  color: #fff;
  font-size: 0.95rem;
}

footer details p {
  color: #cfe7e7;
  font-size: 0.9rem;
}

/* 18. Action bar & progress */
.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin-inline: auto;
  max-width: 560px;
  z-index: 50;
  display: flex;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.94),
    rgba(255, 255, 255, 0)
  );
}

.action-bar a {
  flex: 1;
  min-height: 54px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #fff;
  text-decoration: none;
  font:
    800 1.05rem "Cairo",
    sans-serif;
  box-shadow: 0 12px 24px -12px rgba(11, 59, 74, 0.55);
  transition: transform 0.15s;
}

.action-bar a:active {
  transform: scale(0.97);
}

.action-bar .call {
  background: linear-gradient(135deg, #1897b8, var(--teal));
}

.action-bar .whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  animation: wp 2.2s infinite;
}

.action-bar svg {
  width: 24px;
  height: 24px;
  flex: none;
}

@keyframes wp {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.scroll-progress {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: right;
  will-change: transform;
  background: var(--brass);
  z-index: 60;
}

/* 19. Reveal */
.reveal {
  transition:
    opacity 0.6s ease,
    transform 0.6s ease,
    box-shadow 0.2s;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.js .reveal.on {
  opacity: 1;
  transform: none;
}

.service-card:hover,
.js .service-card.reveal.on:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px -22px rgba(11, 59, 74, 0.45);
}

/* 20. Responsive */
@media (max-width: 1000px) {
  .nav-toggle {
    display: grid;
  }

  .header-call {
    display: none;
  }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s;
  }

  nav.open {
    max-height: 520px;
  }

  nav ul {
    flex-direction: column;
    gap: 0;
    padding: 6px 22px 14px;
  }

  nav li {
    border-top: 1px solid var(--line);
  }

  nav li:first-child {
    border: 0;
  }

  nav a {
    display: block;
    padding: 13px 2px;
  }
}

@media (max-width: 920px) {
  .hero-grid,
  .why,
  .contact,
  .anatomy {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .steps,
  .stats,
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  html {
    scroll-padding-top: 70px;
  }

  section {
    padding: 44px 0;
  }

  .section-head {
    margin-bottom: 24px;
  }

  .section-head h2 {
    font-size: 1.45rem;
  }

  .btn,
  .quiz-options button {
    min-height: 52px;
  }

  .card {
    padding: 20px;
  }

  .brand {
    font-size: 0.92rem;
  }

  .actions .btn,
  .cta-band .btn {
    width: 100%;
  }

  .hero {
    padding: 32px 0 68px;
  }

  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  .hero p {
    font-size: 0.98rem;
    line-height: 1.75;
  }

  .hero-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 22px;
  }

  .hero-facts li {
    padding: 9px 12px;
    font-size: 0.86rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  #services .card-grid,
  #serve .card-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 22px;
    margin-inline: -22px;
    padding: 4px 22px 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  #services .card-grid::-webkit-scrollbar,
  #serve .card-grid::-webkit-scrollbar {
    display: none;
  }

  #services .service-card,
  #serve .service-card {
    flex: 0 0 80%;
    scroll-snap-align: center;
  }

  #services .section-head p::after,
  #serve .section-head p::after {
    content: "\2190 اسحب البطاقات لعرض المزيد";
    display: block;
    margin-top: 6px;
    color: var(--teal);
    font-weight: 700;
    font-size: 0.85rem;
  }

  .steps {
    display: block;
  }

  .steps li {
    position: relative;
    padding-inline-start: 58px;
    padding-bottom: 22px;
  }

  .steps li::before {
    content: "";
    position: absolute;
    inset-inline-start: 19px;
    top: 42px;
    bottom: 2px;
    width: 2px;
    background: var(--tl);
  }

  .steps li:last-child::before {
    display: none;
  }

  .steps b {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--teal-grad);
    color: #fff;
    font-size: 1rem;
  }

  .steps h3 {
    margin-top: 2px;
  }

  .article-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -22px;
    padding: 0 22px 8px;
    scrollbar-width: none;
  }

  .article-filter::-webkit-scrollbar {
    display: none;
  }

  .article-filter button {
    flex: none;
  }
}

/* 20b. Image & mobile refinements */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
}

/* Image box takes the real ratio of the photo (set from JS on load),
   so posters are never cropped and there is no layout shift. */
.pic {
  position: relative;
  aspect-ratio: var(--pic-ratio, 5 / 3);
}

.pic svg,
.pic img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.pic:not(.loaded) {
  background: linear-gradient(
    100deg,
    #eaf6f6 30%,
    #f7fcfc 50%,
    #eaf6f6 70%
  );
  background-size: 200% 100%;
  animation: picshine 1.4s linear infinite;
}

@keyframes picshine {
  to {
    background-position: -200% 0;
  }
}

.gallery figure {
  display: flex;
  flex-direction: column;
}

.gallery .pic {
  transition: none;
}

.gallery figure:hover .pic {
  transform: none;
}

@media (hover: hover) {
  .gallery .pic {
    transition: transform 0.3s;
  }

  .gallery figure:hover .pic {
    transform: scale(1.04);
  }
}

/* Lightbox: show the full image, never cropped */
#lightbox {
  max-height: 92dvh;
  overflow: auto;
}

#lightbox .pic {
  aspect-ratio: auto;
  background: #0b2530;
  animation: none;
  touch-action: pan-y;
}

#lightbox .pic img,
#lightbox .pic svg {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  max-height: 76dvh;
  object-fit: contain;
}

#lightbox .lb-nav {
  display: flex;
  gap: 8px;
}

#lightbox .lb-nav button {
  padding: 8px 14px;
  min-width: 44px;
}

/* Slider dots (mobile only) */
.dots {
  display: none;
}

@media (max-width: 600px) {
  #services .card-grid,
  #serve .card-grid {
    overscroll-behavior-x: contain;
    align-items: stretch;
  }

  #services .service-card,
  #serve .service-card {
    flex: 0 0 min(82%, 340px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
  }

  #services .service-card small,
  #serve .service-card small {
    margin-top: auto;
  }

  .dots {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 2px;
  }

  .dots button {
    position: relative;
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: #b9dadd;
    transition:
      width 0.25s,
      background 0.25s;
    margin: 0 3px;
  }

  .dots button::before {
    content: "";
    position: absolute;
    inset: -12px -5px;
  }

  .dots button[aria-current="true"] {
    width: 24px;
    background: var(--teal);
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery figcaption {
    padding: 8px 10px;
    font-size: 0.82rem;
    line-height: 1.5;
  }

  #articles details .pic {
    max-width: 100%;
  }

  .action-bar {
    pointer-events: none;
  }

  .action-bar a {
    pointer-events: auto;
  }
}

/* 21. Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .action-bar .whatsapp {
    animation: none;
  }

  .bubbles {
    display: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  * {
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
