/* Premium responsive homepage polish, driven by the active CMS theme. */
:root {
  --hero-shadow: 0 24px 65px rgba(15, 23, 42, .13);
  --control-height: 48px;
  --focus-ring: 0 0 0 4px rgba(37, 99, 235, .16);
}

/* Stronger type hierarchy and accessible focus states. */
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a.btn, button.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent) !important;
  outline-offset: 3px;
}
.hero-pill-badge, .section-badge-pill {
  color: var(--primary);
  background: rgba(255, 255, 255, .78);
  border-color: rgba(15, 23, 42, .12);
}
.hero-main-title span.accent-text, .stat-number-display {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--accent);
}
.hero-main-title { letter-spacing: -.045em; }
.hero-lead-text { color: #40516a; }
.navbar-toggler { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.top-emergency-bar a[href="auth/login"] { min-height: 44px; display: inline-flex; align-items: center; padding: 6px 10px; }
.navbar-collapse { max-height: calc(100vh - 110px); overflow-y: auto; }

/* Hero: balanced composition and less empty vertical space. */
.hero-master-section { padding-top: 40px; padding-bottom: 16px; }
.hero-master-section .container { position: relative; z-index: 1; }
.hero-master-section .row > .col-lg-6:first-child { flex: 0 0 55%; max-width: 55%; }
.hero-master-section .row > .col-lg-6:last-child { flex: 0 0 45%; max-width: 45%; }
.hero-main-title { font-size: clamp(2.75rem, 4.15vw, 3.8rem); line-height: 1.08; margin-bottom: 1.35rem; }
.hero-main-image { max-height: 520px; border-radius: calc(var(--radius-xl) + 6px); box-shadow: var(--hero-shadow); }
.hero-image-wrapper { isolation: isolate; }
.hero-image-wrapper::before {
  content: '';
  position: absolute;
  inset: 8% 6% -5% 8%;
  border-radius: calc(var(--radius-xl) + 8px);
  background: linear-gradient(145deg, rgba(37, 99, 235, .16), rgba(0, 180, 216, .07));
  transform: rotate(2deg);
  z-index: -1;
}
.quick-action-strip { margin-top: -34px; }
.quick-card { padding: 18px; border-color: rgba(15, 23, 42, .09); box-shadow: 0 10px 26px rgba(15, 23, 42, .07); }
.quick-card-icon { width: 46px; height: 46px; margin-bottom: .75rem; }
.quick-card h5 { margin-bottom: .35rem; }
.quick-card p { line-height: 1.45; }
.quick-card:hover { transform: translateY(-5px); border-color: var(--accent); }

/* Clear section rhythm and refined cards. */
.section-main-heading { line-height: 1.18; }
.section-subtitle { line-height: 1.65; }
.dept-card, .doctor-profile-card, .stat-card-modern, .review-bubble { border-color: rgba(15, 23, 42, .09); }
.stat-card-modern { padding: 24px 16px; }
.stat-number-display { font-size: 2.55rem; }
.hospital-footer { padding-top: 56px; }

/* Booking shell: real width on every device and a calmer wizard. */
.booking-wizard-wrapper { padding: 42px 32px; }
.booking-glass-sheet { padding: 28px; border: 1px solid rgba(255, 255, 255, .35); }
.booking-step { animation: bookingFade .22s ease-out; }
.booking-step[hidden] { display: none !important; }
.booking-step .form-control-modern { min-height: var(--control-height); font-size: 1rem !important; }
.booking-step .form-label-modern { font-size: .78rem; margin-bottom: 7px; }
.booking-step select[name="time_slot"] {
  display: block !important;
  width: 100%;
  min-height: var(--control-height);
  background-color: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  color: #0f172a !important;
}
.wizard-navigation { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.wizard-navigation .btn { min-height: 46px; padding: 10px 18px; font-weight: 700; }
.wizard-navigation .btn-next { margin-left: auto; }
.wizard-error { display: none; border-radius: 9px; background: #fff1f2; color: #be123c; padding: 10px 12px; margin-top: 16px; font-size: .88rem; }
.wizard-error.is-visible { display: block; }
.booking-review { border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; padding: 16px; margin-bottom: 16px; }
.booking-review h3 { color: var(--primary); font-size: 1rem; margin-bottom: 12px; }
.booking-review dl { display: grid; grid-template-columns: minmax(92px, 28%) 1fr; row-gap: 7px; margin: 0; }
.booking-review dt { color: #64748b; font-weight: 600; }
.booking-review dd { color: var(--primary); font-weight: 700; overflow-wrap: anywhere; }
.wizard-step[aria-current="step"] .step-circle { border-color: var(--accent); background: var(--accent); color: #fff; }
#appt_submit_btn { min-height: 50px; }
@keyframes bookingFade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile-specific composition and accessible touch targets. */
@media (max-width: 991.98px) {
  .hero-master-section { padding-top: 56px; padding-bottom: 52px; }
  .hero-master-section .row > .col-lg-6:first-child,
  .hero-master-section .row > .col-lg-6:last-child { flex: 0 0 100%; max-width: 100%; }
  .hero-main-title { font-size: clamp(2.15rem, 7vw, 3.1rem); line-height: 1.12; }
  .hero-lead-text { font-size: 1rem; line-height: 1.6; margin-bottom: 1.5rem; }
  .hero-image-wrapper { margin-top: 12px; }
  .hero-main-image { max-height: 430px; }
  .quick-action-strip { margin-top: -18px; }
  .booking-wizard-wrapper { padding: 28px 20px; }
  #appt_form_block > .col-lg-7 { order: -1; }
  .booking-glass-sheet { padding: 22px; }
  .wizard-progress-strip { padding: 0; }
  .wizard-step .step-title { font-size: .66rem; }
}

@media (max-width: 575.98px) {
  .hero-master-section { padding-top: 44px; padding-bottom: 42px; }
  .hero-main-title { font-size: clamp(2rem, 10vw, 2.6rem); line-height: 1.1; letter-spacing: -.035em; }
  .hero-main-image { max-height: 360px; }
  .quick-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 11px;
    padding: 13px;
  }
  .quick-card-icon { grid-column: 1; grid-row: 1 / span 2; width: 42px; height: 42px; margin: 0; font-size: 1.1rem; }
  .quick-card h5 { grid-column: 2; margin: 0; font-size: .96rem; }
  .quick-card p { grid-column: 2; margin: 2px 0 0; font-size: .875rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .quick-card .mt-3 { grid-column: 3; grid-row: 1 / span 2; font-size: 0 !important; }
  .quick-card .mt-3 i { font-size: .95rem; }
  .quick-card:hover { transform: none; }
  .section-main-heading { font-size: 1.85rem; }
  .section-subtitle { font-size: .94rem; }
  .booking-wizard-wrapper { padding: 18px 6px; border-radius: 18px; }
  .booking-glass-sheet { padding: 12px; border-radius: 14px; }
  .booking-step .row { --bs-gutter-x: .75rem; }
  .booking-step .form-label-modern { font-size: .72rem; }
  .booking-step .form-control-modern { font-size: 16px !important; padding: 10px 12px !important; }
  .wizard-progress-strip::before { left: 24px; right: 24px; }
  .wizard-step .step-circle { width: 30px; height: 30px; font-size: .76rem; }
  .wizard-step .step-title { font-size: .59rem; letter-spacing: .1px; }
  .wizard-navigation { gap: 8px; }
  .wizard-navigation .btn { padding: 9px 13px; font-size: .86rem; }
  .booking-review { padding: 13px; }
  .booking-review dl { grid-template-columns: minmax(76px, 31%) 1fr; font-size: .82rem; }
  .floating-emergency-mobile {
    left: 0; right: 0; bottom: 0;
    justify-content: center;
    border-radius: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 18px rgba(15, 23, 42, .18);
  }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  #backToTopBtn { bottom: calc(68px + env(safe-area-inset-bottom)); width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
