/* ==========================================================================
   Dr. Moges — Consultant Physician
   Design system: typography, colour, layout, components
   ========================================================================== */

:root {
  /* Colour palette */
  --teal-900: #083f44;
  --teal-800: #0a5f67;
  --teal-700: #0e7c86;
  --teal-600: #1296a0;
  --teal-100: #dcefed;
  --teal-50:  #eef7f6;
  --ink:      #17252b;
  --ink-soft: #52636b;
  --line:     #e2ecee;
  --paper:    #ffffff;
  --tint:     #f4f8f8;
  --accent:   #e2a13c;
  --accent-soft: #fdf3e2;
  --danger:   #c0392b;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;

  /* Layout */
  --container: 1200px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(8, 63, 68, 0.06);
  --shadow-md: 0 12px 34px rgba(8, 63, 68, 0.10);
  --shadow-lg: 0 24px 60px rgba(8, 63, 68, 0.16);
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.container { width: min(var(--container), 92%); margin-inline: auto; }

section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

::selection { background: var(--teal-800); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  border: 2px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-800));
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 124, 134, 0.32);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(14, 124, 134, 0.42); }
.btn--ghost {
  background: transparent;
  color: var(--teal-800);
  border-color: var(--teal-800);
}
.btn--ghost:hover { background: var(--teal-50); transform: translateY(-2px); }
.btn--lg { padding: 1.05rem 2.1rem; font-size: 1rem; }

/* ---------- Topbar ---------- */
.topbar { background: var(--teal-900); color: #d7eef0; font-size: 0.84rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 42px; flex-wrap: wrap; padding-block: 0.35rem; }
.topbar__group { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.topbar__item { display: inline-flex; align-items: center; gap: 0.45rem; }
.topbar__item svg { width: 15px; height: 15px; fill: var(--accent); }

/* Rotating hospital + location + hours (values come from the database) */
.topbar__rotator { min-width: 0; max-width: 100%; }
.topbar__rotator-text {
  display: inline-block; max-width: 52ch; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.topbar__rotator-text.is-out { opacity: 0; transform: translateY(-4px); }
#topbarHours { min-width: 0; }
#topbarHoursText { max-width: 40ch; }

/* Keep the bar on one line on smaller laptops; it wraps cleanly below that. */
@media (max-width: 1100px) {
  .topbar__rotator-text { max-width: 30ch; }
  #topbarHoursText { max-width: 24ch; }
}
@media (max-width: 900px) {
  .topbar__group:nth-of-type(2) { display: none; }
}
.topbar__cta {
  color: #fff; font-weight: 600;
  padding: 0.15rem 0;
  border-bottom: 2px solid var(--accent);
  transition: color 0.2s;
}
.topbar__cta:hover { color: var(--accent); }

/* ---------- Header / Nav ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.header.is-scrolled { box-shadow: var(--shadow-sm); border-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 0.65rem; }
.brand__mark {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--teal-800), var(--teal-700));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.brand__mark svg { width: 26px; height: 26px; }
.brand__mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 11px; }
.brand__mark--logo { border-radius: 50%; overflow: hidden; }
.brand__mark--logo img { border-radius: 50%; object-fit: cover; }
.brand__text { line-height: 1.15; font-size: 1.15rem; color: var(--teal-900); }
.brand__text strong { font-weight: 700; }
.brand__text small { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-700); margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav__link {
  font-weight: 500; font-size: 0.95rem; color: var(--ink);
  position: relative; padding-block: 0.4rem;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__link:hover { color: var(--teal-800); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__cta { padding: 0.7rem 1.4rem; }

.nav__toggle {
  display: none; border: 0; background: transparent;
  width: 44px; height: 44px; flex-direction: column;
  justify-content: center; align-items: center; gap: 5px;
}
.nav__toggle span { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: var(--teal-900); transition: transform 0.3s var(--ease), opacity 0.3s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; background: linear-gradient(160deg, var(--teal-50) 0%, #ffffff 60%); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 150, 160, 0.12), transparent 70%);
}
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: center; padding-block: 4.5rem 5rem; }

.hero__badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--teal-100); color: var(--teal-800);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em;
  padding: 0.5rem 1.1rem; border-radius: 999px; margin-bottom: 1.4rem;
}
.hero__badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.hero__title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.14; color: var(--teal-900);
  letter-spacing: -0.01em;
}
.hero__title em { font-style: italic; background: linear-gradient(120deg, var(--teal-700), var(--teal-600)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { margin-block: 1.4rem 2rem; font-size: 1.1rem; color: var(--ink-soft); max-width: 34rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__trust { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 2.2rem; }
.hero__trust li { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 500; color: var(--ink-soft); }
.hero__trust svg { width: 18px; height: 18px; color: var(--teal-700); flex: none; }

.hero__media { position: relative; }
.hero__media img {
  width: 100%; height: auto;
  filter: drop-shadow(0 30px 60px rgba(8, 63, 68, 0.18));
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Stats ---------- */
.stats { background: linear-gradient(135deg, var(--teal-800), var(--teal-900)); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; padding-block: 3rem; }
.stat { text-align: center; color: #fff; position: relative; }
.stat:not(:last-child)::after {
  content: ""; position: absolute; right: -1rem; top: 20%; height: 60%; width: 1px;
  background: rgba(255, 255, 255, 0.18);
}
.stat__num { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.4vw, 2.6rem); display: block; }
.stat__label { font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: #bfe6e6; font-weight: 600; }

/* ---------- Section scaffolding ---------- */
.section { padding-block: 5.5rem; }
.section--tint { background: var(--tint); }
.section__head { max-width: 42rem; margin: 0 auto 3rem; text-align: center; }
.section__title { font-family: var(--font-serif); font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.2; color: var(--teal-900); letter-spacing: -0.01em; }
.section__title em { font-style: italic; color: var(--teal-700); }
.section__sub { margin-top: 1rem; color: var(--ink-soft); font-size: 1.05rem; }
.eyebrow {
  display: inline-block; color: var(--teal-700); font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 0.9rem;
}

/* ---------- About ---------- */
.about__inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 4rem; align-items: center; }
.about__media { position: relative; }
.about__media img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.about__card {
  position: absolute; left: -2rem; bottom: -1.5rem; right: 2.5rem;
  background: #fff; border-radius: var(--radius-sm);
  padding: 1.4rem 1.6rem; box-shadow: var(--shadow-md);
  border-left: 5px solid var(--accent);
}
.about__card svg { width: 30px; height: 30px; color: var(--teal-700); margin-bottom: 0.6rem; }
.about__card p { font-family: var(--font-serif); font-style: italic; font-size: 1.02rem; line-height: 1.5; color: var(--teal-900); }
.about__content > p { color: var(--ink-soft); margin-bottom: 1rem; }
.about__list { margin-top: 1.4rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.6rem; }
.about__list li { display: flex; gap: 0.9rem; align-items: flex-start; }
.about__icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--teal-100); color: var(--teal-800);
}
.about__icon svg { width: 22px; height: 22px; }
.about__list strong { display: block; font-size: 0.97rem; color: var(--teal-900); }
.about__list span { font-size: 0.85rem; color: var(--ink-soft); }
.about__sign { margin-top: 2rem; display: flex; align-items: center; gap: 1.1rem; }
.about__sign img { width: 150px; height: auto; }
.about__sign > span { font-size: 0.85rem; color: var(--ink-soft); font-weight: 500; }

/* ---------- Cards / Services ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2rem 1.8rem;
  display: flex; flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.card__icon {
  width: 58px; height: 58px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--teal-50); color: var(--teal-700);
  margin-bottom: 1.3rem; transition: background 0.3s, color 0.3s;
}
.card__icon svg { width: 28px; height: 28px; }
.card:hover .card__icon { background: var(--teal-800); color: #fff; }
.card h3 { font-size: 1.15rem; color: var(--teal-900); margin-bottom: 0.6rem; }
.card p { font-size: 0.95rem; color: var(--ink-soft); flex: 1; }
.card__link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1.3rem; font-weight: 600; font-size: 0.9rem; color: var(--teal-800);
}
.card__link svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.card__link:hover svg { transform: translateX(4px); }

/* ---------- Expertise / timeline ---------- */
.expertise { background: linear-gradient(160deg, var(--teal-900), var(--teal-800)); color: #fff; }
.expertise .section__title { color: #fff; }
.expertise .section__title em { color: #8ad4d8; }
.expertise .section__sub { color: #bfe6e6; }
.expertise .eyebrow { color: #8ad4d8; }
.expertise__head { text-align: center; max-width: 42rem; margin: 0 auto 4rem; }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; position: relative; }
.step {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius); padding: 2.2rem 1.8rem;
  backdrop-filter: blur(4px);
  transition: background 0.3s, transform 0.3s var(--ease);
}
.step:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-6px); }
.step__num {
  font-family: var(--font-serif); font-size: 2.6rem; color: transparent;
  -webkit-text-stroke: 1.5px #8ad4d8; display: block; margin-bottom: 1rem;
}
.step h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.step p { color: #c9e9ea; font-size: 0.95rem; }

/* ---------- Testimonials ---------- */
.slider { position: relative; max-width: 46rem; margin: 0 auto; min-height: 260px; }
.slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0.45s;
  text-align: center; padding: 2rem 2.5rem;
}
.slide.is-active { opacity: 1; visibility: visible; transform: none; position: relative; }
.slide__stars { color: var(--accent); font-size: 1.35rem; letter-spacing: 4px; margin-bottom: 1.2rem; }
.slide blockquote {
  font-family: var(--font-serif); font-size: 1.22rem; font-style: italic;
  color: var(--teal-900); line-height: 1.6; margin-bottom: 1.6rem;
}
.slide footer strong { display: block; color: var(--ink); }
.slide footer span { font-size: 0.85rem; color: var(--ink-soft); }
.slider__nav { display: flex; align-items: center; justify-content: center; gap: 1.4rem; margin-top: 2rem; }
.slider__btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--teal-800);
  display: grid; place-items: center; transition: background 0.25s, color 0.25s, transform 0.25s;
}
.slider__btn svg { width: 20px; height: 20px; }
.slider__btn:hover { background: var(--teal-800); color: #fff; transform: scale(1.06); }
.slider__dots { display: flex; gap: 0.5rem; }
.slider__dot { width: 9px; height: 9px; border-radius: 999px; border: 0; background: #c8dcde; transition: width 0.3s var(--ease), background 0.3s; }
.slider__dot.is-active { width: 26px; background: var(--teal-700); }

/* ---------- Appointment ---------- */
.appointment__inner { display: grid; grid-template-columns: 1fr 1.05fr; gap: 4rem; align-items: start; }
.appointment__info > p { color: var(--ink-soft); margin-top: 1rem; max-width: 30rem; }
.appointment__points { margin-top: 2rem; display: grid; gap: 1rem; }
.appointment__points li { display: flex; gap: 0.7rem; align-items: center; font-weight: 500; }
.appointment__points svg { width: 22px; height: 22px; color: var(--teal-700); flex: none; }
.appointment__hotline {
  margin-top: 2.4rem; display: flex; gap: 1rem; align-items: center;
  background: var(--teal-50); border: 1px solid var(--teal-100);
  border-radius: var(--radius-sm); padding: 1.2rem 1.5rem;
}
.appointment__hotline svg { width: 34px; height: 34px; color: var(--teal-700); flex: none; }
.appointment__hotline span { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); font-weight: 600; }
.appointment__hotline strong { font-size: 1.25rem; color: var(--teal-900); }

.form {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2.4rem;
  box-shadow: var(--shadow-md);
}
.form__title { font-family: var(--font-serif); font-size: 1.5rem; color: var(--teal-900); margin-bottom: 1.6rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--teal-900); }
.field label span { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.85rem 1rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fbfdfd; color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal-600); background: #fff;
  box-shadow: 0 0 0 4px var(--teal-100);
}
.field .field__error { display: none; font-size: 0.8rem; color: var(--danger); margin-top: 0.35rem; }
.field.is-invalid input, .field.is-invalid select { border-color: var(--danger); background: #fff7f6; }
.field.is-invalid .field__error { display: block; }
.hospital-map {
  margin-top: 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; background: #fff;
}
.hospital-map iframe { display: block; width: 100%; height: 210px; border: 0; }
.hospital-map__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.7rem 0.9rem; border-top: 1px solid var(--line); font-size: 0.85rem;
}
.hospital-map__address { color: var(--ink-soft); line-height: 1.4; }
.hospital-map__link {
  display: inline-flex; align-items: center; gap: 0.3rem; flex: none;
  color: var(--teal-800); font-weight: 600; text-decoration: none;
}
.hospital-map__link svg { width: 15px; height: 15px; }
.hospital-map__link:hover { text-decoration: underline; }

.form__submit { width: 100%; margin-top: 0.4rem; }
.form__privacy { font-size: 0.8rem; color: var(--ink-soft); text-align: center; margin-top: 1rem; }
.form__success {
  margin-top: 1.2rem; display: flex; gap: 0.8rem; align-items: flex-start;
  background: #eef9f3; border: 1px solid #bfe8d2; color: #1d6b43;
  border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; font-size: 0.95rem;
}
.form__success svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.form__success-close { margin-left: auto; border: 0; background: transparent; color: inherit; font-size: 1rem; }

/* ---------- FAQ ---------- */
.faq__inner { max-width: 52rem; margin-inline: auto; }
.accordion { display: grid; gap: 0.9rem; margin-top: 2.5rem; }
.acc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; transition: box-shadow 0.3s, border-color 0.3s;
}
.acc[open] { box-shadow: var(--shadow-sm); border-color: var(--teal-100); }
.acc summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.2rem 1.5rem; font-weight: 600; color: var(--teal-900);
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+"; flex: none; width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--teal-50); color: var(--teal-800);
  font-size: 1.25rem; font-weight: 400;
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s;
}
.acc[open] summary::after { transform: rotate(45deg); background: var(--teal-800); color: #fff; }
.acc__body { padding: 0 1.5rem 1.4rem; color: var(--ink-soft); max-width: 44rem; }

/* ---------- Contact ---------- */
.contact__inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.contact__card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.8rem; text-align: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.contact__card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.contact__icon {
  width: 56px; height: 56px; margin: 0 auto 1.1rem;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--teal-50); color: var(--teal-700);
}
.contact__icon svg { width: 26px; height: 26px; }
.contact__card h3 { font-size: 1.1rem; color: var(--teal-900); margin-bottom: 0.7rem; }
.contact__card p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.8; }
.contact__card a { color: var(--teal-700); font-weight: 600; }
.contact__card a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #aebcc2; }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-block: 4rem 2.5rem; }
.brand--footer .brand__mark { background: rgba(255, 255, 255, 0.1); }
.brand--footer .brand__text { color: #fff; }
.brand--footer .brand__text small { color: #8ad4d8; }
.footer__brand > p { margin-top: 1.2rem; font-size: 0.92rem; }
.footer__disclaimer { font-size: 0.8rem; color: #7e9098; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 1rem; margin-top: 1rem; }
.footer__col h4 { color: #fff; font-size: 1rem; margin-bottom: 1.1rem; }
.footer__links { display: grid; gap: 0.65rem; font-size: 0.92rem; }
.footer__links a:hover { color: #fff; }
.footer__address { line-height: 1.6; }
.footer__social { display: flex; gap: 0.7rem; margin-top: 1.2rem; }
.footer__social a {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08); color: #fff;
  transition: background 0.25s, transform 0.25s;
}
.footer__social svg { width: 18px; height: 18px; }
.footer__social a:hover { background: var(--teal-700); transform: translateY(-3px); }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer__bottom .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.2rem; font-size: 0.82rem; color: #7e9098; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--teal-800); color: #fff; display: grid; place-items: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.to-top svg { width: 20px; height: 20px; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--teal-900); }

/* ---------- Photo gallery ---------- */
.gallery { background: #fff; }
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.gallery__item {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-md);
}
.gallery__item a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s var(--ease);
}
.gallery__item a:hover img { transform: scale(1.05); }
.gallery__item figcaption {
  padding: 0.85rem 1rem; font-size: 0.9rem; font-weight: 600;
  color: var(--teal-900); border-top: 1px solid var(--line);
}

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .hero__content { display: flex; flex-direction: column; align-items: center; }
  .hero__lead { margin-inline: auto; }
  .hero__trust { justify-content: center; }
  .hero__media { max-width: 480px; margin-inline: auto; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1rem; }
  .stat:nth-child(2)::after { display: none; }
  .about__inner { grid-template-columns: 1fr; gap: 3rem; }
  .about__media { max-width: 520px; margin-inline: auto; }
  .about__card { left: 0.5rem; right: 0.5rem; bottom: -1rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr; }
  .appointment__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .topbar__group:nth-of-type(2) { display: none; }

  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 1rem 4% 1.6rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-16px); opacity: 0; visibility: hidden;
    transition: transform 0.35s var(--ease), opacity 0.35s, visibility 0.35s;
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__link { padding: 0.9rem 0.4rem; border-bottom: 1px solid var(--tint); }
  .nav__cta { margin-top: 1rem; }
  .nav__toggle { display: flex; }

  .form__row { grid-template-columns: 1fr; }
  .about__list { grid-template-columns: 1fr; }
  .section { padding-block: 3.8rem; }
  .hero__inner { padding-block: 3.2rem 3.8rem; }
  .slider { min-height: 320px; }
  .footer__inner { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; }
  .footer__bottom .container { justify-content: center; text-align: center; }
}

@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .hero__actions .btn { width: 100%; }
  .about__sign { flex-direction: column; align-items: flex-start; }
  .slide { padding: 1rem 1.2rem; }
}