/* =========================================================
   MASH Hospital theme: modern medical blue / teal
   ========================================================= */
:root {
  --mash-primary: #0b6fb8;
  --mash-primary-dark: #084f86;
  --mash-teal: #14a89d;
  --mash-dark: #0d2436;
  --mash-text: #33475b;
  --mash-muted: #6b7c8c;
  --mash-soft: #f3f8fc;
  --mash-border: #e3edf5;
  --radius-lg: 1.25rem;
  --shadow-sm: 0 2px 8px rgba(13, 36, 54, .06);
  --shadow-md: 0 12px 32px rgba(13, 36, 54, .10);
  --shadow-lg: 0 24px 60px rgba(13, 36, 54, .16);
  --font-head: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --bs-primary: var(--mash-primary);
  --bs-primary-rgb: 11, 111, 184;
  --bs-link-color: var(--mash-primary);
  --bs-link-color-rgb: 11, 111, 184;
  --bs-link-hover-color: var(--mash-primary-dark);
  --bs-body-font-family: var(--font-body);
}

body { color: var(--mash-text); font-family: var(--font-body); background: #fff; }
h1, h2, h3, h4, h5, h6, .navbar-brand { font-family: var(--font-head); color: var(--mash-dark); }

/* ---------- Buttons ---------- */
.btn-primary {
  --bs-btn-bg: var(--mash-primary);
  --bs-btn-border-color: var(--mash-primary);
  --bs-btn-hover-bg: var(--mash-primary-dark);
  --bs-btn-hover-border-color: var(--mash-primary-dark);
  --bs-btn-active-bg: var(--mash-primary-dark);
  --bs-btn-active-border-color: var(--mash-primary-dark);
}
.btn-outline-primary {
  --bs-btn-color: var(--mash-primary);
  --bs-btn-border-color: var(--mash-primary);
  --bs-btn-hover-bg: var(--mash-primary);
  --bs-btn-hover-border-color: var(--mash-primary);
  --bs-btn-active-bg: var(--mash-primary-dark);
}
.btn-pill { border-radius: 999px; padding-left: 1.4rem; padding-right: 1.4rem; font-weight: 600; }
.btn { transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.shadow-primary { box-shadow: 0 10px 24px rgba(11, 111, 184, .30); }
.text-primary { color: var(--mash-primary) !important; }
.text-teal { color: var(--mash-teal) !important; }
.bg-primary-soft { background: rgba(11, 111, 184, .12); }
.bg-teal-soft { background: rgba(20, 168, 157, .14); }
.bg-danger-soft { background: rgba(220, 53, 69, .12); }

/* ---------- Top bar & navbar ---------- */
.topbar { background: var(--mash-dark); }
.topbar a { text-decoration: none; }
.navbar-glass {
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  transition: box-shadow .25s ease;
}
.navbar-glass.scrolled { box-shadow: 0 6px 20px rgba(13, 36, 54, .08); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--mash-primary), var(--mash-teal));
  color: #fff; font-size: 1.35rem; box-shadow: 0 6px 16px rgba(11, 111, 184, .3);
}
.brand-text { font-weight: 800; letter-spacing: .5px; color: var(--mash-dark); }
.brand-text span { color: var(--mash-teal); }
.navbar .nav-link { font-weight: 500; color: var(--mash-text); position: relative; }
.navbar .nav-link.active, .navbar .nav-link:hover { color: var(--mash-primary) !important; }
@media (min-width: 992px) {
  .navbar .nav-link.active::after {
    content: ""; position: absolute; left: .5rem; right: .5rem; bottom: .15rem;
    height: 2px; border-radius: 2px; background: var(--mash-primary);
  }
}

/* ---------- Sections ---------- */
.section { padding-top: 5rem; padding-bottom: 5rem; }
.bg-soft { background: var(--mash-soft); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--mash-teal); margin-bottom: .5rem;
}
.section-title { font-weight: 800; color: var(--mash-dark); font-size: clamp(1.6rem, 3vw, 2.3rem); }
.section-sub { color: var(--mash-muted); font-size: 1.05rem; margin-bottom: 0; }

/* ---------- Hero ---------- */
.hero-modern { position: relative; overflow: hidden; padding-bottom: 4rem; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(800px 420px at 85% 10%, rgba(20, 168, 157, .16), transparent 60%),
    radial-gradient(700px 500px at 0% 0%, rgba(11, 111, 184, .14), transparent 60%),
    linear-gradient(180deg, #f5faff 0%, #ffffff 100%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(11, 111, 184, .12) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.6), transparent 80%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.6), transparent 80%);
}
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid var(--mash-border); border-radius: 999px;
  padding: .4rem .9rem; font-size: .85rem; font-weight: 600; color: var(--mash-primary);
  box-shadow: var(--shadow-sm);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e; position: relative;
}
.pulse-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid #22c55e; animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.hero-title {
  font-size: clamp(2.3rem, 5.2vw, 3.8rem); font-weight: 800; line-height: 1.08; letter-spacing: -.02em;
}
.text-gradient {
  background: linear-gradient(90deg, var(--mash-primary), var(--mash-teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: 1.15rem; color: var(--mash-muted); max-width: 520px; margin-top: 1rem; }
.hero-trust li { display: flex; align-items: center; gap: .45rem; font-weight: 500; color: var(--mash-text); font-size: .95rem; }
.hero-trust i { color: var(--mash-teal); font-size: 1.1rem; }

.hero-visual { position: relative; height: 460px; }
.hero-blob {
  position: absolute; inset: 50px 30px 30px; border-radius: 42% 58% 55% 45% / 50% 45% 55% 50%;
  background: linear-gradient(135deg, var(--mash-primary) 0%, var(--mash-teal) 100%);
  opacity: .9; animation: morph 12s ease-in-out infinite;
}
@keyframes morph {
  0%, 100% { border-radius: 42% 58% 55% 45% / 50% 45% 55% 50%; }
  50% { border-radius: 55% 45% 42% 58% / 45% 55% 50% 50%; }
}
.hero-photo {
  position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(330px, 62%); margin: 0; border-radius: 1.75rem; overflow: hidden;
  border: 6px solid #fff; box-shadow: var(--shadow-lg); background: #dbe8f3;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; display: block; }

.glass-card {
  position: absolute; display: flex; align-items: center; gap: .75rem;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .9); border-radius: 1rem; padding: .8rem 1rem;
  box-shadow: var(--shadow-md); min-width: 190px;
}
.glass-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
.glass-label { font-size: .75rem; color: var(--mash-muted); font-weight: 500; }
.glass-value { font-family: var(--font-head); font-weight: 700; color: var(--mash-dark); text-decoration: none; font-size: .98rem; }
.float-a { top: 6%; left: 0; animation: floaty 6s ease-in-out infinite; }
.float-b { top: 44%; right: 0; animation: floaty 7s ease-in-out infinite .8s; }
.float-c { bottom: 2%; left: 8%; animation: floaty 6.5s ease-in-out infinite 1.6s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 575.98px) {
  .hero-visual { height: 420px; }
  .hero-blob { inset: 50px 0 30px; }
  .hero-photo { width: 64%; }
  .glass-card { min-width: 0; padding: .6rem .8rem; }
  .glass-value { font-size: .85rem; }
}

/* ---------- Quick info strip ---------- */
.quick-info { position: relative; z-index: 2; margin-top: -2.5rem; }
.info-tile {
  display: flex; align-items: center; gap: 1rem; height: 100%;
  background: #fff; border: 1px solid var(--mash-border); border-radius: var(--radius-lg);
  padding: 1.25rem; box-shadow: var(--shadow-md); text-decoration: none; color: inherit;
  transition: transform .25s ease, box-shadow .25s ease;
}
a.info-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: inherit; }
.info-tile > i {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
  background: rgba(11, 111, 184, .1); color: var(--mash-primary);
}
.info-tile h6 { margin: 0 0 .15rem; font-weight: 700; }
.info-tile p { margin: 0; color: var(--mash-muted); font-size: .88rem; line-height: 1.35; }
.info-danger > i { background: rgba(220, 53, 69, .1); color: #dc3545; }

/* ---------- About preview ---------- */
.about-visual { position: relative; padding: 0 2rem 3rem 0; }
.about-card { border-radius: var(--radius-lg); }
.about-card-main {
  background: linear-gradient(150deg, var(--mash-dark), var(--mash-primary-dark) 60%, var(--mash-primary));
  color: rgba(255, 255, 255, .8); padding: 3rem 2rem; min-height: 320px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden;
}
.about-card-main::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(20, 168, 157, .35); filter: blur(10px);
}
.about-card-main i { font-size: 3rem; color: #fff; position: relative; }
.about-card-main h4 { color: #fff; font-weight: 800; margin-top: 1rem; position: relative; }
.about-card-main p { margin: 0; position: relative; }
.about-card-photo { background-size: cover; background-position: center 40%; min-height: 440px; }
.about-card-photo::before {
  inset: 0; right: 0; top: 0; width: auto; height: auto; border-radius: 0; filter: none;
  background: linear-gradient(180deg, rgba(13, 36, 54, 0) 35%, rgba(13, 36, 54, .92) 100%);
}

/* Building photo on About and Contact pages */
.about-page-photo { width: 100%; height: 340px; object-fit: cover; object-position: center 40%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.building-hint {
  display: flex; align-items: center; gap: .9rem; padding: .6rem; margin-bottom: 1.25rem;
  background: var(--mash-soft); border: 1px solid var(--mash-border); border-radius: 1rem; font-size: .88rem;
}
.building-hint img { width: 54px; height: 72px; object-fit: cover; object-position: center 40%; border-radius: .6rem; flex-shrink: 0; }
.about-card-badge {
  position: absolute; right: 0; bottom: 0; background: #fff; padding: 1.1rem 1.4rem;
  box-shadow: var(--shadow-md); display: flex; flex-direction: column; border: 1px solid var(--mash-border);
}
.badge-num { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--mash-teal); line-height: 1; }
.about-card-badge span:last-child { color: var(--mash-muted); font-size: .85rem; margin-top: .25rem; }
.check-item { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.check-item i { color: var(--mash-teal); font-size: 1.15rem; }

/* ---------- Stats band ---------- */
.stats-band {
  background: linear-gradient(110deg, var(--mash-primary-dark), var(--mash-primary) 55%, var(--mash-teal));
  padding: 3.5rem 0; color: #fff; position: relative; overflow: hidden;
}
.stats-band::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 20px 20px;
}
.stats-band .container { position: relative; }
.stat-big { font-family: var(--font-head); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; line-height: 1; }
.stat-cap { opacity: .85; margin-top: .4rem; font-weight: 500; }

/* ---------- Department cards ---------- */
.dept-card {
  border-radius: var(--radius-lg); border: 1px solid var(--mash-border) !important;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; background: #fff;
}
.dept-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg) !important; border-color: transparent !important; }
.dept-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 16px;
  background: linear-gradient(135deg, var(--mash-primary), var(--mash-teal));
  color: #fff; font-size: 1.6rem; flex-shrink: 0; box-shadow: 0 8px 18px rgba(11, 111, 184, .25);
  transition: transform .3s ease;
}
.dept-card:hover .dept-icon { transform: rotate(-6deg) scale(1.06); }
.dept-link { font-weight: 600; font-size: .9rem; color: var(--mash-primary); }
.dept-link i { transition: transform .25s ease; display: inline-block; }
.dept-card:hover .dept-link i { transform: translateX(4px); }

/* ---------- Facilities ---------- */
.facility-tile {
  height: 100%; text-align: center; padding: 1.75rem 1rem; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--mash-border); transition: all .3s ease;
}
.facility-tile:hover { background: linear-gradient(160deg, var(--mash-primary), var(--mash-teal)); border-color: transparent; transform: translateY(-4px); box-shadow: var(--shadow-md); }
.facility-tile:hover h6, .facility-tile:hover p { color: #fff; }
.facility-tile:hover .facility-icon { background: rgba(255,255,255,.2); color: #fff; }
.facility-icon {
  width: 60px; height: 60px; margin: 0 auto 1rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
  background: rgba(20, 168, 157, .12); color: var(--mash-teal); transition: all .3s ease;
}
.facility-tile h6 { font-weight: 700; margin-bottom: .35rem; transition: color .3s; }
.facility-tile p { font-size: .85rem; color: var(--mash-muted); margin: 0; transition: color .3s; }

/* ---------- Doctor cards ---------- */
.doctor-card { border-radius: var(--radius-lg); overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.doctor-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg) !important; }
.doctor-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.doctor-photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e5f0fa, #dff4f1);
  color: #a4c2d8; font-size: 5rem;
}

/* ---------- Steps ---------- */
.step {
  position: relative; height: 100%; padding: 2rem 1.5rem 1.5rem; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--mash-border); transition: box-shadow .3s ease;
}
.step:hover { box-shadow: var(--shadow-md); }
.step-num {
  position: absolute; top: -16px; left: 1.5rem; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--mash-primary), var(--mash-teal)); color: #fff;
  font-family: var(--font-head); font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(11, 111, 184, .3);
}
.step > i { font-size: 2rem; color: var(--mash-primary); }
.step h6 { font-weight: 700; margin: .75rem 0 .4rem; }
.step p { color: var(--mash-muted); font-size: .9rem; margin: 0; }
@media (min-width: 992px) {
  .steps > div:not(:last-child) .step::after {
    content: "\F138"; font-family: 'bootstrap-icons'; position: absolute; right: -1.15rem; top: 50%;
    transform: translateY(-50%); color: var(--mash-teal); font-size: 1.2rem; z-index: 1;
  }
}

/* ---------- Patient tips & FAQ ---------- */
.tips-card { background: #fff; border-radius: var(--radius-lg); padding: .5rem 1.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--mash-border); }
.tip { display: flex; gap: 1rem; padding: 1.1rem 0; }
.tip + .tip { border-top: 1px dashed var(--mash-border); }
.tip > i {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(11, 111, 184, .1); color: var(--mash-primary); font-size: 1.2rem;
}
.tip h6 { margin: 0 0 .2rem; font-weight: 700; }
.tip p { margin: 0; color: var(--mash-muted); font-size: .9rem; }

.faq .accordion-item { border: 1px solid var(--mash-border); border-radius: 1rem !important; margin-bottom: .75rem; overflow: hidden; background: #fff; }
.faq .accordion-button { font-family: var(--font-head); font-weight: 700; color: var(--mash-dark); padding: 1.1rem 1.25rem; background: #fff; box-shadow: none; }
.faq .accordion-button:not(.collapsed) { color: var(--mash-primary); background: #fff; }
.faq .accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(11, 111, 184, .15); }
.faq .accordion-body { color: var(--mash-muted); padding-top: 0; }

/* ---------- Location ---------- */
.location-wrap { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--mash-border); background: #fff; }
.map-frame { min-height: 340px; }
.map-frame iframe { border: 0; }
.location-info { padding: 2rem; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.location-info h5 { font-weight: 800; margin-bottom: 1.25rem; }
.loc-row { display: flex; gap: .75rem; margin-bottom: .9rem; color: var(--mash-text); }
.loc-row i { color: var(--mash-primary); margin-top: .15rem; }
.loc-row a { color: inherit; text-decoration: none; }
.loc-row a:hover { color: var(--mash-primary); }

/* ---------- Emergency CTA ---------- */
.emergency-cta {
  margin-top: 1rem; border-radius: 1.5rem; padding: 2rem 2.25rem; color: #fff;
  background: linear-gradient(110deg, #b91c2c, #dc3545 60%, #f0605d);
  display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; justify-content: space-between;
  box-shadow: 0 18px 40px rgba(220, 53, 69, .3);
}
.emergency-cta h3 { color: #fff; font-weight: 800; }
.emergency-cta p { opacity: .9; }
.emergency-icon {
  width: 64px; height: 64px; border-radius: 18px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 1.9rem; flex-shrink: 0;
}

/* ---------- Inner page header (other pages) ---------- */
.page-header { background: linear-gradient(120deg, var(--mash-primary-dark), var(--mash-primary) 55%, var(--mash-teal)); }
.page-header h1 { color: #fff; }

/* ---------- Stats (About page) ---------- */
.stat { background: var(--mash-soft); border-radius: var(--radius-lg); padding: 1.5rem 1rem; }
.stat-num { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--mash-primary); }
.stat-label { color: var(--mash-muted); font-size: .9rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--mash-dark); }
.site-footer h5, .site-footer h6 { color: #fff; }
.site-footer a { color: rgba(255, 255, 255, .7); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .btn-danger { color: #fff; }

/* ---------- Booking progress bar ---------- */
/* Compact one-line stepper:  (1) Doctor ──── (2) Date & time ──── (3) … */
.booking-progress-card {
  background: #fff; border: 1px solid var(--mash-border); border-radius: 999px;
  padding: .55rem 1.1rem; margin-bottom: .85rem; box-shadow: var(--shadow-sm);
}
.booking-progress { list-style: none; display: flex; align-items: center; margin: 0; padding: 0; }
.booking-progress li { display: flex; align-items: center; flex: 1 1 0; min-width: 0; user-select: none; }
.booking-progress li:first-child { flex: 0 0 auto; }
.booking-progress li:not(:first-child)::before {   /* line from the previous step */
  content: ""; flex: 1 1 auto; height: 3px; min-width: 12px; margin: 0 .6rem;
  border-radius: 3px; background: var(--mash-border); transition: background .4s ease;
}
.booking-progress li.done::before, .booking-progress li.current::before {
  background: linear-gradient(90deg, var(--mash-teal), var(--mash-primary));
}
.bp-dot {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid var(--mash-border); color: var(--mash-muted);
  font-family: var(--font-head); font-weight: 800; font-size: .82rem; transition: all .3s ease;
}
.bp-check { display: none; font-size: 1rem; }
.booking-progress li.current .bp-dot {
  border-color: var(--mash-primary); background: var(--mash-primary); color: #fff;
  box-shadow: 0 0 0 4px rgba(11, 111, 184, .14);
}
.booking-progress li.done .bp-dot { background: var(--mash-teal); border-color: var(--mash-teal); color: #fff; }
.booking-progress li.done .bp-num { display: none; }
.booking-progress li.done .bp-check { display: inline; }
.bp-label { margin-left: .45rem; font-size: .85rem; font-weight: 600; color: var(--mash-muted); white-space: nowrap; }
.booking-progress li.current .bp-label { color: var(--mash-primary); }
.booking-progress li.done .bp-label { color: var(--mash-dark); }
.booking-progress li.reachable:not(.current):not([data-step="4"]) { cursor: pointer; }
.booking-progress li.reachable:not(.current):not([data-step="4"]):hover .bp-dot { transform: scale(1.1); }
.booking-progress.is-complete li[data-step="4"] .bp-dot { background: #22c55e; border-color: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .15); }

@media (max-width: 575.98px) {
  .booking-progress-card { padding: .5rem .75rem; }
  .booking-progress li:not(.current) .bp-label { display: none; }   /* phone: only the current step's name */
  .booking-progress li:not(:first-child)::before { margin: 0 .35rem; }
}

/* Wizard: one step at a time (only when JavaScript runs) */
.js .booking-wizard .booking-step { display: none; }
.js .booking-wizard .booking-step.is-current { display: block; animation: stepIn .35s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.step-nav {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  margin-top: 1.1rem; padding-top: .9rem; border-top: 1px dashed var(--mash-border);
}

/* Compact layout for the booking page */
.page-header-compact h1 { margin-bottom: .15rem !important; }
.booking-page .booking-step { padding: 1.15rem 1.25rem; margin-bottom: 0; }
.booking-page .step-head { margin-bottom: .85rem; }
.booking-page .alert { margin-bottom: 1rem; }
.js .booking-wizard .step-nav { display: flex; }
.step-error { color: #dc3545; font-size: .9rem; font-weight: 500; margin-top: .75rem; }
.step-error:empty { display: none; }
html:not(.js) .step-nav [data-next], html:not(.js) .step-nav [data-back] { display: none; }

/* ---------- Appointment booking ---------- */
.booking-step {
  background: #fff; border: 1px solid var(--mash-border); border-radius: var(--radius-lg);
  padding: 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm);
}
.step-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.1rem; }
.step-badge {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--mash-primary), var(--mash-teal)); color: #fff; font-weight: 800; font-family: var(--font-head);
}
.doctor-option { display: block; cursor: pointer; height: 100%; margin: 0; }
.doctor-option input { position: absolute; opacity: 0; pointer-events: none; }
.doctor-option-body {
  display: flex; gap: .85rem; align-items: flex-start; height: 100%; padding: 1rem; border-radius: 1rem;
  border: 2px solid var(--mash-border); transition: border-color .2s, background .2s, box-shadow .2s;
}
.doctor-option:hover .doctor-option-body { border-color: rgba(11, 111, 184, .4); }
.doctor-option input:checked + .doctor-option-body { border-color: var(--mash-primary); background: #f2f8fd; box-shadow: 0 6px 18px rgba(11, 111, 184, .12); }
.doctor-option input:focus-visible + .doctor-option-body { outline: 3px solid rgba(11, 111, 184, .35); outline-offset: 2px; }
.doctor-option-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e5f0fa, #dff4f1); color: #8fb3cf; font-size: 1.5rem;
}
.doctor-option-name { display: block; font-family: var(--font-head); font-weight: 700; color: var(--mash-dark); }
.doctor-option-meta { display: block; font-size: .85rem; color: var(--mash-muted); }
.doctor-option-fee { display: inline-block; margin-top: .35rem; font-size: .78rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; background: rgba(20, 168, 157, .12); color: #0d7f77; }
.doctor-option-check { color: var(--mash-border); font-size: 1.3rem; transition: color .2s; }
.doctor-option input:checked + .doctor-option-body .doctor-option-check { color: var(--mash-primary); }

.slot-hint { color: var(--mash-muted); font-size: .92rem; padding: .25rem 0 .5rem; }
.date-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.date-chip, .shift-chip {
  border: 2px solid var(--mash-border); background: #fff; border-radius: .9rem; cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.date-chip { min-width: 62px; padding: .45rem .35rem; display: flex; flex-direction: column; align-items: center; line-height: 1.15; flex-shrink: 0; }
.date-chip small { font-size: .72rem; color: var(--mash-muted); text-transform: uppercase; letter-spacing: .04em; }
.date-chip strong { font-family: var(--font-head); font-size: 1.35rem; color: var(--mash-dark); }
.shift-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.shift-chip { padding: .6rem 1rem; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.shift-chip span { font-weight: 600; color: var(--mash-dark); }
.shift-chip small { font-size: .78rem; color: #0d7f77; }
.date-chip:hover, .shift-chip:hover { border-color: rgba(11, 111, 184, .45); }
.date-chip.active, .shift-chip.active { border-color: var(--mash-primary); background: var(--mash-primary); }
.date-chip.active small, .date-chip.active strong, .shift-chip.active span, .shift-chip.active small { color: #fff; }

.guardian-box { background: #fff8e6; border: 1px solid #f5dfa3; border-radius: 1rem; padding: 1rem; }

.booking-summary {
  position: sticky; top: 90px; background: #fff; border: 1px solid var(--mash-border);
  border-radius: var(--radius-lg); padding: 1.15rem 1.25rem; box-shadow: var(--shadow-sm);
}
.booking-summary h3 { margin-bottom: .5rem !important; }
.sum-row { display: flex; gap: .8rem; padding: .45rem 0; border-bottom: 1px dashed var(--mash-border); }
.sum-note { font-size: .82rem; color: var(--mash-muted); margin: .75rem 0 0; }
.sum-emergency {
  display: flex; align-items: center; justify-content: center; margin-top: .75rem; padding: .5rem;
  border-radius: 999px; background: #fdecee; color: #c62834; font-weight: 600; font-size: .9rem; text-decoration: none;
}
.sum-emergency:hover { background: #fbd9dd; color: #a91f2a; }
.sum-row i { color: var(--mash-primary); font-size: 1.15rem; margin-top: .15rem; }
.sum-row small { color: var(--mash-muted); font-size: .75rem; }
.sum-row div > div { font-weight: 600; color: var(--mash-dark); }

.booking-closed { max-width: 520px; padding: 2.5rem 1.5rem; }
.booking-closed-icon, .confirm-icon {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center; font-size: 2.2rem;
}
.booking-closed-icon { background: #fdecee; color: #dc3545; }

.confirm-progress { max-width: 620px; }
.confirm-card {
  max-width: 620px; text-align: center; background: #fff; border: 1px solid var(--mash-border);
  border-radius: 1.5rem; padding: 2.5rem 2rem; box-shadow: var(--shadow-md);
}
.confirm-icon { background: linear-gradient(135deg, #22c55e, var(--mash-teal)); color: #fff; box-shadow: 0 12px 28px rgba(34, 197, 94, .35); }
.confirm-token {
  display: flex; justify-content: center; gap: 2.5rem; margin: 1.5rem 0; padding: 1.1rem; border-radius: 1rem;
  background: linear-gradient(110deg, var(--mash-primary-dark), var(--mash-primary) 60%, var(--mash-teal)); color: #fff;
}
.confirm-token small { display: block; opacity: .85; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.confirm-token strong { font-family: var(--font-head); font-size: 1.6rem; letter-spacing: .02em; }
.confirm-details { text-align: left; margin: 0; }
.confirm-details > div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--mash-border); }
.confirm-details dt { font-weight: 500; color: var(--mash-muted); }
.confirm-details dt i { color: var(--mash-primary); margin-right: .5rem; }
.confirm-details dd { margin: 0; font-weight: 600; color: var(--mash-dark); text-align: right; }
.confirm-note { display: flex; gap: .6rem; text-align: left; margin-top: 1.25rem; padding: .9rem 1rem; border-radius: 1rem; background: var(--mash-soft); font-size: .9rem; }
.confirm-note i { color: var(--mash-primary); }

/* ---------- Booking page: compact modern layout ---------- */
.booking-bg { background: linear-gradient(180deg, #eef5fb 0%, #f6fafd 55%, #fff 100%); padding: 1.25rem 0 2rem; }
.booking-top { display: flex; align-items: center; gap: 1.25rem; margin-bottom: .9rem; }
.booking-heading { flex-shrink: 0; }
.booking-title { font-size: 1.45rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.booking-sub { margin: .1rem 0 0; font-size: .82rem; color: var(--mash-muted); }
.booking-sub i { color: #f59e0b; margin-right: .25rem; }
.booking-top-progress { flex: 1; min-width: 0; }
.booking-top-progress .booking-progress-card { margin-bottom: 0; }
@media (max-width: 991.98px) {
  .booking-top { flex-direction: column; align-items: stretch; gap: .6rem; }
}

.booking-page .booking-step {
  padding: 1.1rem 1.25rem; border: 1px solid rgba(13, 36, 54, .06);
  box-shadow: 0 1px 2px rgba(13, 36, 54, .04), 0 8px 24px rgba(13, 36, 54, .05);
}
.booking-page .step-head { margin-bottom: .75rem; }
.booking-page .step-head h2 { font-size: 1.05rem; }
.booking-page .step-head small { font-size: .8rem; }
.booking-page .step-nav { margin-top: .9rem; padding-top: .8rem; }
.booking-page .step-nav .btn { white-space: nowrap; }
@media (max-width: 575.98px) {
  .booking-page .booking-step { padding: .95rem 1rem; }
  .booking-page .step-nav .btn-lg { padding: .5rem 1.1rem; font-size: 1rem; }
  .booking-progress li.current { flex: 0 0 auto; }   /* room for the current step's name */
}

/* doctor cards */
.booking-page .doctor-option-body { padding: .7rem .8rem; gap: .7rem; border-width: 1.5px; border-radius: .9rem; }
.booking-page .doctor-option-avatar { width: 40px; height: 40px; font-size: 1.25rem; }
.booking-page .doctor-option-name { font-size: .95rem; }
.booking-page .doctor-option-meta { font-size: .8rem; line-height: 1.35; }

/* dates: a 7-column calendar grid, no sideways scrolling */
.booking-page .date-list { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
.booking-page .date-chip { min-width: 0; padding: .35rem 0; border-width: 1.5px; border-radius: .75rem; }
.booking-page .date-chip strong { font-size: 1.1rem; }
.booking-page .date-chip small { font-size: .66rem; }
@media (max-width: 575.98px) { .booking-page .date-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* times */
.booking-page .shift-chip { padding: .45rem .85rem; border-width: 1.5px; border-radius: .75rem; }
.booking-page .shift-chip span { font-size: .9rem; }
.booking-page #shiftWrap { margin-top: .75rem !important; }

/* patient form */
.booking-page .form-label { margin-bottom: .2rem; font-size: .85rem; font-weight: 500; }
.booking-page .form-control, .booking-page .form-select { padding: .45rem .75rem; border-radius: .6rem; font-size: .95rem; }
.booking-page textarea.form-control { min-height: 0; }
.booking-page .input-group-text { border-radius: .6rem; background: var(--mash-soft); font-weight: 600; font-size: .9rem; color: var(--mash-text); }
.booking-page .guardian-box { padding: .75rem; }

/* summary */
.booking-page .booking-summary { padding: 1rem 1.1rem; top: 84px; box-shadow: 0 1px 2px rgba(13, 36, 54, .04), 0 8px 24px rgba(13, 36, 54, .05); }
.booking-page .booking-summary h3 { font-size: .75rem; letter-spacing: .08em; }
.booking-page .sum-row { padding: .4rem 0; gap: .65rem; }
.booking-page .sum-row i { font-size: 1rem; }
.booking-page .sum-row div > div { font-size: .92rem; }
.booking-page .sum-emergency { padding: .4rem; font-size: .85rem; }
.booking-page .booking-closed { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-top: .5rem; }

@media print {
  .topbar, .navbar, .site-footer, .alert { display: none !important; }
  .confirm-card { box-shadow: none; border: 0; }
}

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; transition-delay: var(--delay, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
