/* ============================================================
   DaktarChai Medical Service — Main Stylesheet
   Font: Hind Siliguri + Noto Sans Bengali (Bangla + Latin)
   Framework: Bootstrap 5.3
   ============================================================ */

/* ── Font Preload: system fallback first, then web fonts ── */
@font-face {
  font-family: 'Hind Siliguri';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Hind Siliguri'), local('Noto Sans Bengali'),
       url('https://fonts.gstatic.com/s/hindsiliguri/v12/ijwTs5DuQ1h0hW6Y6QcD5A.woff2') format('woff2');
  unicode-range: U+0980-09FF, U+0950-0952, U+0964-0965, U+0C00-0C7F, U+1CD0-1CF6, U+200C-200D, U+25CC, U+A830-A839;
}

@font-face {
  font-family: 'Noto Sans Bengali';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: local('Noto Sans Bengali'), local('']);
  unicode-range: U+0980-09FF, U+0950-0952, U+0964-0965, U+0C00-0C7F, U+1CD0-1CF6, U+200C-200D, U+25CC, U+A830-A839;
}

/* ── Root Variables ─────────────────────────────────────── */
:root {
  --brand-primary:   #0d6efd;
  --brand-secondary: #198754;
  --brand-accent:    #0dcaf0;
  --brand-dark:      #1a2238;
  --brand-light:     #f4f8ff;
  --text-muted-soft: #6c757d;
  --card-shadow:     0 2px 16px rgba(13,110,253,.10);
  --radius-lg:       1rem;
  --radius-md:       .625rem;
  --radius-sm:       .375rem;
  --transition:      all .22s ease;
  --brand-gradient:  linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
  --brand-deep:      linear-gradient(135deg, #1a2238 0%, #0d6efd 100%);
}

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

body {
  font-family: 'Noto Sans Bengali', 'Hind Siliguri', 'Segoe UI', Tahoma, sans-serif;
  color: #212529;
  background: #fff;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: #0b5ed7; }

img { max-width: 100%; }

/* ── Top Bar ────────────────────────────────────────────── */
.top-bar {
  background: linear-gradient(90deg, #1a2238 0%, #111c33 55%, #0d6efd 100%);
  color: rgba(255,255,255,.78);
  font-size: .78rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative;
  z-index: 1035;
}
.top-bar-item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  line-height: 1.2;
}
.top-bar-item i {
  color: var(--brand-accent);
  font-size: .78rem;
  transition: var(--transition);
}
.top-bar-trust i {
  color: #4ade80;
}
.top-bar-trust span {
  color: rgba(255,255,255,.72);
}
.top-bar-user i {
  color: #90caf9;
}
.top-bar-contact {
  color: rgba(255,255,255,.88);
  text-decoration: none;
  transition: var(--transition);
}
.top-bar-contact:hover {
  color: #fff;
}
.top-bar-contact:hover i {
  color: var(--brand-accent);
  transform: translateY(-1px);
}
.top-bar-phone i { color: #90caf9; }
.top-bar-wa i { color: #25d366; }
.top-bar-mail i { color: #c7b2ff; }
.top-bar-contacts {
  row-gap: .1rem;
  min-width: 0;
}
@media (max-width: 575.98px) {
  .top-bar-contacts .top-bar-contact { font-size: .74rem; }
}
.top-bar-divider {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,.2);
  margin: 0 .45rem;
  flex-shrink: 0;
}
.top-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: rgba(255,255,255,.75);
  font-size: .78rem;
  padding: .22rem .7rem;
  border-radius: 2rem;
  transition: var(--transition);
  text-decoration: none;
}
.top-bar-btn:hover {
  color: #fff;
  background: rgba(255,255,255,.1);
}
.top-bar-btn-login {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-weight: 500;
}
.top-bar-btn-login:hover {
  background: #fff;
  border-color: #fff;
  color: var(--brand-primary);
}
.top-bar-btn-reg {
  background: var(--brand-primary);
  color: #fff;
}
.top-bar-btn-reg:hover {
  background: #0b5ed7;
  color: #fff;
}
.top-bar .dropdown .btn {
  font-size: .75rem;
  padding: .2rem .55rem;
  color: rgba(255,255,255,.85);
  border-color: rgba(255,255,255,.16);
  border-radius: 2rem;
}
.top-bar .dropdown .btn:hover,
.top-bar .dropdown .btn:focus {
  color: #fff;
  border-color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.08);
}

/* ── Main Navbar ────────────────────────────────────────── */
.main-navbar {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 8px 28px rgba(13,110,253,.07);
  padding: 0;
  z-index: 1030;
  min-height: 68px;
  overflow: visible;
  transition: box-shadow .3s ease, background .3s ease;
}
.main-navbar.navbar-scrolled {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.05), 0 12px 34px rgba(13,110,253,.12);
}
html:not([data-bs-theme="dark"]) .main-navbar.navbar-scrolled {
  background: rgba(255,255,255,.98);
}

.main-navbar .container {
  display: flex;
  align-items: stretch;
  min-height: 68px;
  gap: .5rem;
}

/* Desktop menu column — shrinkable so it never collides with right actions.
   Scoped to >=992px so Bootstrap's d-none/d-lg-flex still controls mobile. */
@media (min-width: 992px) {
  .main-navbar .navbar-collapse {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
  }
  .main-navbar .navbar-collapse .navbar-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
    min-width: 0;
  }
}

/* ── Shared brand block (settings-driven logo/name/tagline) ── */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem 0;
  text-decoration: none;
  min-width: 0;
  color: inherit;
}
.site-brand:hover { color: inherit; }
.site-brand .brand-text { min-width: 0; }
.site-brand .brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
}

/* Size variants */
.site-brand-md .brand-icon-wrap,
.site-brand-md .brand-logo-wrap { width: 42px; height: 42px; }
.site-brand-md .brand-icon-wrap { font-size: 1.25rem; border-radius: 10px; }
.site-brand-md .brand-name { font-size: 1.05rem; }
.site-brand-md .brand-tagline { font-size: .68rem; }

.site-brand-lg .brand-icon-wrap,
.site-brand-lg .brand-logo-wrap { width: 48px; height: 48px; }
.site-brand-lg .brand-icon-wrap { font-size: 1.45rem; border-radius: 12px; }
.site-brand-lg .brand-name { font-size: 1.2rem; }
.site-brand-lg .brand-tagline { font-size: .72rem; }

.site-brand-sm .brand-icon-wrap,
.site-brand-sm .brand-logo-wrap { width: 36px; height: 36px; }
.site-brand-sm .brand-icon-wrap { font-size: 1.1rem; border-radius: 9px; }
.site-brand-sm .brand-name { font-size: .98rem; }
.site-brand-sm .brand-tagline { font-size: .64rem; }

/* Footer variant — light text on the dark footer */
.site-brand-footer { padding: 0; }
.site-brand-footer .brand-icon-wrap {
  width: 46px; height: 46px;
  font-size: 1.35rem;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(13,110,253,.35);
}
.site-brand-footer .brand-logo-wrap { width: 48px; height: 48px; }
.site-brand-footer .brand-name { color: #fff; font-size: 1.05rem; }
.site-brand-footer .brand-tagline { color: #94a3b8; font-size: .7rem; }

/* Legacy selectors kept for the compact breakpoint rules below */
.brand-icon-wrap {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #0dcaf0 100%);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.brand-logo-wrap {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-logo-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-weight: 700;
  color: var(--brand-dark);
  line-height: 1.2;
}
.brand-tagline {
  color: var(--text-muted-soft);
  line-height: 1.1;
}

/* Nav links — rounded pill style */
.main-navbar .navbar-nav {
  gap: 2px;
}
.main-navbar .nav-link {
  font-weight: 500;
  color: #495057;
  padding: .5rem 1rem;
  border-radius: 999px;
  transition: var(--transition);
  font-size: .9rem;
  position: relative;
}
.main-navbar .nav-link:hover {
  color: var(--brand-primary);
  background: #e8f0fe;
}
.main-navbar .nav-link.active {
  color: #fff;
  background: var(--brand-primary);
  font-weight: 600;
}
.main-navbar .nav-link.active::after {
  display: none;
}

/* Dropdown in navbar */
.main-navbar .dropdown-menu {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: 0 18px 48px rgba(26,34,56,.16);
  padding: .6rem;
  margin-top: .65rem !important;
  animation: navDropdownIn .22s ease both;
  transform-origin: top center;
}
@keyframes navDropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.main-navbar .dropdown-item {
  border-radius: var(--radius-sm);
  padding: .5rem .85rem;
  font-size: .88rem;
  transition: var(--transition);
}
.main-navbar .dropdown-item:hover {
  background: #e8f0fe;
  color: var(--brand-primary);
}
.main-navbar .dropdown-item.active {
  background: var(--brand-primary);
  color: #fff;
}

/* ── Mega-menu (Doctors specialties, 3 columns) ── */
.main-navbar .mega-menu {
  width: 780px;
  max-width: 90vw;
  padding: 1.15rem 1.3rem;
}
.main-navbar .mega-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem .85rem;
  margin-bottom: .7rem;
  border-bottom: 1px solid #eef1f5;
  background: linear-gradient(135deg, #f4f8ff 0%, #fff 100%);
  border-radius: var(--radius-sm);
}
.main-navbar .mega-menu-header .mega-title {
  font-weight: 700;
  font-size: .95rem;
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.main-navbar .mega-menu-header .mega-title i {
  color: var(--brand-primary);
  font-size: 1rem;
}
.main-navbar .mega-menu-header .mega-all {
  font-size: .82rem;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .65rem;
  border-radius: 2rem;
  background: rgba(13,110,253,.08);
  transition: var(--transition);
}
.main-navbar .mega-menu-header .mega-all:hover {
  text-decoration: none;
  background: var(--brand-primary);
  color: #fff;
  transform: translateX(2px);
}
.main-navbar .mega-menu .mega-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .15rem .75rem;
}
.main-navbar .mega-menu .mega-col {
  display: flex;
  flex-direction: column;
}
.main-navbar .mega-menu .mega-col .dropdown-item {
  border-radius: var(--radius-sm);
  padding: .4rem .7rem;
  font-size: .88rem;
  white-space: normal;
  line-height: 1.35;
}
.main-navbar .mega-menu .mega-col .dropdown-item .mega-item-icon {
  font-size: .6rem;
  color: #c2d4ff;
  margin-right: .3rem;
  transition: var(--transition);
}
.main-navbar .mega-menu .mega-col .dropdown-item:hover .mega-item-icon {
  color: var(--brand-primary);
}
@media (max-width: 991.98px) {
  .main-navbar .mega-menu {
    width: 100%;
    max-width: none;
    padding: .75rem;
  }
  .main-navbar .mega-menu .mega-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Search trigger button */
.nav-search-trigger {
  color: #495057;
  font-size: 1.15rem;
  padding: .35rem;
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.nav-search-trigger:hover {
  color: var(--brand-primary);
  background: #e8f0fe;
}

/* Expandable search panel */
.nav-search-collapse {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}
.nav-search-collapse .input-group {
  max-width: 500px;
}
.nav-search-collapse .input-group-text {
  border-color: #dee2e6;
}
.nav-search-collapse .form-control {
  border-color: #dee2e6;
}
.nav-search-collapse .form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: none;
}

/* Mobile adjustments */
@media (max-width: 991.98px) {
  .main-navbar .navbar-collapse {
    padding: 1rem 0;
  }
  .main-navbar .nav-link {
    border-radius: var(--radius-sm);
  }
}

/* Compact desktop navbar — keep all items in one row without overlap */
@media (min-width: 992px) and (max-width: 1399.98px) {
  .main-navbar .nav-link {
    padding: .45rem .6rem;
    font-size: .84rem;
  }
  .main-navbar .site-brand {
    gap: .5rem;
  }
  .site-brand-lg .brand-name { font-size: 1.05rem; }
  .site-brand-lg .brand-tagline { font-size: .66rem; }
  .site-brand-lg .brand-logo-wrap, .site-brand-lg .brand-icon-wrap { width: 42px; height: 42px; }
}

/* Mobile hamburger */
.btn-mobile-menu {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--brand-dark);
  border: 1px solid #e9ecef;
  border-radius: .75rem;
  background: #fff;
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.mobile-menu-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: var(--transition);
}
.btn-mobile-menu:hover {
  color: #fff;
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  box-shadow: 0 6px 16px rgba(13,110,253,.3);
  transform: translateY(-1px);
}
.btn-mobile-menu:hover .mobile-menu-bar {
  background: #fff;
}
.btn-mobile-menu:hover .mobile-menu-bar:nth-child(1) { transform: translateY(0) rotate(0); }
.btn-mobile-menu:active .mobile-menu-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.btn-mobile-menu:active .mobile-menu-bar:nth-child(2) { opacity: 0; }
.btn-mobile-menu:active .mobile-menu-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Offcanvas Menu ─────────────────────────────── */
.mobile-menu {
  width: 340px !important;
  max-width: 92vw;
  border-left: 1px solid #eef1f5;
  box-shadow: -12px 0 40px rgba(26,34,56,.14);
}
.offcanvas-backdrop.show {
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.mobile-menu-header {
  border-bottom: 1px solid #e9ecef;
  padding: .9rem 1.1rem;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-menu-header .site-brand {
  padding: 0;
  min-width: 0;
}
.mobile-menu-header .brand-text {
  min-width: 0;
}
.mobile-menu-header .brand-name,
.mobile-menu-header .brand-tagline {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 220px;
}
.mobile-menu-header .btn-close {
  background-size: .9em;
  opacity: .6;
  transition: var(--transition);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
}
.mobile-menu-header .btn-close:hover {
  opacity: 1;
  background-color: #eef4ff;
  transform: rotate(90deg);
}
.mobile-menu .offcanvas-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Quick actions at the top of the mobile drawer */
.mobile-quick-actions {
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(180deg, #f8fbff 0%, #f4f8ff 100%);
  padding: .85rem 1rem !important;
}
.mobile-quick-actions .btn {
  white-space: nowrap;
  font-weight: 600;
  font-size: .88rem;
}

/* Sticky mobile navbar: brand + actions in one clean row */
.main-navbar .mobile-nav-brand-wrap {
  display: flex;
  align-items: center;
  margin-right: auto;
  margin-left: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.main-navbar .mobile-nav-brand-wrap .site-brand {
  padding: .4rem 0;
  gap: .5rem;
}
.main-navbar .mobile-nav-brand-wrap .brand-text {
  min-width: 0;
}
.main-navbar .mobile-nav-brand-wrap .brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .92rem;
}
.mobile-nav-actions {
  flex-shrink: 0;
  margin-left: .35rem;
}
.mobile-book-btn {
  white-space: nowrap;
  font-size: .8rem;
  padding: .4rem .75rem;
}

/* Very narrow phones — collapse the Book CTA to icon-only so the brand
   name keeps room and nothing wraps or clips. The icon is always shown
   on this range and the label hidden. */
@media (max-width: 399.98px) {
  .mobile-book-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-book-btn .d-sm-inline {
    display: none !important;
  }
  .mobile-book-btn i.d-sm-none {
    display: inline-block !important;
    margin: 0 !important;
  }
}

/* Hide the standalone brand row on mobile — navbar carries the logo now */
@media (max-width: 991.98px) {
  .site-header {
    display: none;
  }
}
.mobile-home-banner {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 600;
  padding: .85rem 1.1rem;
  font-size: .95rem;
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.mobile-home-banner i {
  font-size: 1.05rem;
}
.mobile-home-banner:hover {
  background: linear-gradient(135deg, #0b5ed7 0%, #0bbce0 100%);
  color: #fff;
  padding-left: 1.35rem;
}

.mobile-accordion {
  --bs-accordion-border-width: 0;
  --bs-accordion-border-radius: 0;
  --bs-accordion-inner-border-radius: 0;
}
.mobile-accordion .accordion-item {
  border-bottom: 1px solid #e9ecef;
  background: transparent;
}
.mobile-accordion .accordion-button {
  font-weight: 600;
  color: var(--brand-dark);
  padding: .95rem 1.1rem;
  box-shadow: none;
  font-size: .95rem;
  background: transparent;
}
.mobile-accordion .accordion-button::after {
  background-size: 1rem;
  transition: transform .3s ease;
}
.mobile-accordion .accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, #f4f8ff 0%, #eef4ff 100%);
  color: var(--brand-primary);
}
.mobile-accordion .accordion-button:not(.collapsed)::after {
  filter: invert(38%) sepia(92%) saturate(2200%) hue-rotate(200deg);
}
.mobile-accordion .accordion-body {
  padding: .6rem .9rem 1rem;
  max-height: 55vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.mobile-spec-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  padding: .65rem .9rem;
  border-radius: var(--radius-md);
  margin-bottom: .65rem;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(13,110,253,.22);
}
.mobile-spec-all i {
  transition: transform .25s ease;
}
.mobile-spec-all:hover {
  color: #fff;
  box-shadow: 0 6px 18px rgba(13,110,253,.32);
  transform: translateY(-1px);
}
.mobile-spec-all:hover i {
  transform: translateX(3px);
}
.mobile-spec-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-spec-item {
  padding: .5rem .65rem;
  color: #495057;
  font-size: .88rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.mobile-spec-item i {
  color: #b9ccf8;
  font-size: .68rem;
  transition: var(--transition);
  width: .9rem;
  flex-shrink: 0;
}
.mobile-spec-item:hover {
  background: #eef4ff;
  color: var(--brand-primary);
  padding-left: .85rem;
}
.mobile-spec-item:hover i {
  color: var(--brand-primary);
}
.mobile-spec-item:active {
  background: var(--brand-primary);
  color: #fff;
}
.mobile-spec-item:active i {
  color: #fff;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: .5rem 0;
  border-bottom: 1px solid #e9ecef;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: .75rem 1.1rem;
  color: #343a40;
  font-size: .92rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.mobile-nav-link i {
  color: var(--brand-primary);
  width: 1.5rem;
  text-align: center;
  font-size: 1.02rem;
}
.mobile-nav-link:hover {
  background: #f4f8ff;
  color: var(--brand-primary);
  border-left-color: var(--brand-primary);
  padding-left: 1.3rem;
}
.mobile-nav-link:active {
  background: var(--brand-primary);
  color: #fff;
}
.mobile-nav-link:active i {
  color: #fff;
}

.mobile-menu-footer {
  margin-top: auto;
  padding: 1rem 1.1rem 1.5rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}
.mobile-menu-footer .btn {
  font-weight: 600;
}

/* ── Specialty Category Panel (homepage) ──────────────── */
.spec-panel {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 16px rgba(13,110,253,.06);
  overflow: hidden;
}
.spec-panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e9ecef;
}
.spec-panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.spec-panel-title i { color: var(--brand-primary); }
.spec-panel-all {
  font-size: .85rem;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
}
.spec-panel-all:hover {
  text-decoration: underline;
  color: #0b5ed7;
}
.spec-panel-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .25rem .75rem;
  padding: .9rem 1rem;
  max-height: 340px;
  overflow-y: auto;
}
.spec-panel-item {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .6rem;
  border-radius: var(--radius-sm);
  color: #495057;
  font-size: .88rem;
  transition: var(--transition);
  text-decoration: none;
}
.spec-panel-item .spec-panel-caret {
  font-size: .65rem;
  color: #c2d4ff;
  transition: var(--transition);
  flex-shrink: 0;
}
.spec-panel-item:hover {
  background: #e8f0fe;
  color: var(--brand-primary);
}
.spec-panel-item:hover .spec-panel-caret {
  color: var(--brand-primary);
}
.spec-panel-item.active {
  background: #e8f0fe;
  color: var(--brand-primary);
  font-weight: 600;
}
.spec-panel-item.active .spec-panel-caret {
  color: var(--brand-primary);
}

/* Specialty panel responsive */
@media (max-width: 991.98px) {
  .spec-panel-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575.98px) {
  .spec-panel-list {
    grid-template-columns: 1fr;
    max-height: 320px;
  }
  .spec-panel-header {
    padding: .9rem 1rem;
  }
}

/* ── Hero Section ───────────────────────────────────────── */
.hero-section {
  min-height: 80vh;
  background: linear-gradient(135deg, var(--brand-dark) 0%, #1e3a5f 50%, #1a5276 100%);
  position: relative;
  display: flex; align-items: center;
  padding: 5rem 0 4rem;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-overlay { display: none; }
.min-vh-hero  { min-height: 70vh; }
.hero-badge {
  background: rgba(13,110,253,.18);
  color: #90caf9;
  border: 1px solid rgba(13,110,253,.3);
  padding: .3rem .85rem; border-radius: 2rem;
  font-size: .82rem; font-weight: 500;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700; color: #fff; line-height: 1.15;
}
.hero-subtitle { font-size: 1.05rem; color: #adb5bd; max-width: 500px; }

/* ── Quick Search / Hero Search ─────────────────────────── */
.quick-search-section { position: relative; z-index: 10; }
/* Branded hero backdrop — gives the search area visual depth whether
   or not a banner slide is currently active. */
.quick-search-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 420px at 15% -10%, rgba(13,202,240,.16) 0%, transparent 60%),
    radial-gradient(900px 380px at 90% 120%, rgba(25,135,84,.14) 0%, transparent 55%),
    linear-gradient(135deg, #eef4ff 0%, #f8fbff 45%, #eaf6f1 100%);
  border-bottom: 1px solid rgba(13,110,253,.10);
}
.quick-search-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: 0 10px 40px rgba(13,110,253,.14), 0 2px 8px rgba(0,0,0,.06);
  border: 1px solid rgba(13,110,253,.10);
}
.quick-search-card:hover { box-shadow: 0 14px 44px rgba(13,110,253,.18), 0 2px 8px rgba(0,0,0,.06); }
/* Soft floating badge above the search card (locale-aware text) */
.quick-search-title {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--brand-primary);
  font-weight: 600;
  font-size: .95rem;
  background: #fff;
  border: 1px solid #c2d4ff;
  border-radius: 2rem;
  padding: .4rem 1.1rem;
  box-shadow: 0 4px 14px rgba(13,110,253,.12);
}

/* ── Section Headers ────────────────────────────────────── */
.section-badge {
  display: inline-block;
  background: #e8f0fe; color: var(--brand-primary);
  padding: .3rem 1rem; border-radius: 2rem;
  font-size: .8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em;
}
.section-title { font-size: 1.9rem; font-weight: 700; color: var(--brand-dark); }

/* ── Service Cards ──────────────────────────────────────── */
.service-card {
  border-radius: var(--radius-lg) !important;
  transition: var(--transition);
  border: 1px solid #e9ecef !important;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow) !important;
  border-color: #c2d4ff !important;
}
.service-icon { font-size: 2rem; }
.service-icon-lg { font-size: 3.5rem; }
.lab-cta-icon { font-size: 3rem; }

/* ── Doctor Cards ───────────────────────────────────────── */
.doctor-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.doctor-card-link:hover .doctor-card {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow);
  border-color: #c2d4ff;
}
.doctor-card {
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid #e9ecef;
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  position: relative;
}
.doctor-card-link:hover {
  color: inherit;
}
.doctor-card-link:hover .doctor-name { color: var(--brand-primary); }
/* Clickable disease tags on the doctor profile */
.disease-tag {
  transition: var(--transition);
  border-color: #e2e8f0 !important;
}
.disease-tag:hover {
  background: var(--brand-light) !important;
  border-color: #c2d4ff !important;
  color: var(--brand-primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(13,110,253,.12);
}

/* ── Diseases Treated — responsive grid ─────────────────── */
.disease-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}
.disease-grid-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: .65rem .9rem;
  color: var(--brand-dark);
  text-decoration: none;
  min-width: 0;
}
.disease-grid-item:hover {
  background: #eef4ff;
  border-color: #c2d4ff;
  color: var(--brand-primary);
  text-decoration: none;
}
.disease-tag-name {
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}
.disease-tag-icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #e8f0fe;
  color: var(--brand-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem;
  transition: var(--transition);
}
.disease-grid-item:hover .disease-tag-icon {
  background: var(--brand-primary);
  color: #fff;
}
@media (max-width: 575.98px) {
  .disease-grid { grid-template-columns: 1fr; }
}
@media (min-width: 576px) and (max-width: 767.98px) {
  .disease-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* "Open profile" affordance that appears on hover */
.doctor-card-open {
  position: absolute;
  top: .6rem;
  left: .6rem;
  background: rgba(255,255,255,.92);
  color: var(--brand-primary);
  border: 1px solid #c2d4ff;
  border-radius: 50%;
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
  z-index: 2;
}
.doctor-card-link:hover .doctor-card-open,
.doctor-card-link:focus-visible .doctor-card-open {
  opacity: 1;
}
.doctor-avatar-wrap { position: relative; padding-top: 75%; overflow: hidden; background: var(--brand-light); }
.doctor-avatar {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top;
}
.doctor-avatar-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; color: #c2d4ff;
  background: linear-gradient(135deg, #e8f0fe 0%, #dce8ff 100%);
}
.doctor-badge-featured {
  position: absolute; top: .6rem; right: .6rem;
  background: var(--brand-primary); color: #fff;
  font-size: .7rem; padding: .2rem .5rem;
  border-radius: var(--radius-sm);
}
.doctor-name  { font-size: .95rem; font-weight: 600; color: var(--brand-dark); }
.doctor-spec  { font-size: .82rem; }
.doctor-inst  { font-size: .78rem; }

/* ── Scrollable Doctor Lists (related / more) ───────────── */
.doctor-scroll-list {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding-right: .25rem;
}
.doctor-scroll-list::-webkit-scrollbar { width: 6px; }
.doctor-scroll-list::-webkit-scrollbar-track { background: #f1f3f5; border-radius: 3px; }
.doctor-scroll-list::-webkit-scrollbar-thumb { background: #c2d4ff; border-radius: 3px; }
.doctor-scroll-list::-webkit-scrollbar-thumb:hover { background: var(--brand-primary); }
.doctor-scroll-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.doctor-scroll-item:hover { background: #f4f8ff; }
.doctor-scroll-item > .min-w-0 { flex: 1; }
.doctor-scroll-item a:hover { color: var(--brand-primary); }
.doctor-scroll-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c2d4ff;
  font-size: 1.4rem;
}
.doctor-scroll-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
@media (max-width: 991px) {
  .doctor-scroll-list { max-height: 320px; }
}
.fee-badge {
  background: #e8f8ee; color: #198754;
  padding: .15rem .55rem; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 600;
}

/* ── Filter Sidebar (right side) ────────────────────────── */
.filter-card { border-radius: var(--radius-lg) !important; border: 1px solid #e9ecef !important; }
.filter-sidebar {
  position: sticky;
  top: 84px;
}
.spec-filter-list {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: .25rem;
}
.spec-filter-list::-webkit-scrollbar { width: 6px; }
.spec-filter-list::-webkit-scrollbar-track { background: #f1f3f5; border-radius: 3px; }
.spec-filter-list::-webkit-scrollbar-thumb { background: #c2d4ff; border-radius: 3px; }
.spec-filter-list::-webkit-scrollbar-thumb:hover { background: var(--brand-primary); }
.spec-filter-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .75rem;
  border-radius: var(--radius-sm);
  color: #495057;
  font-size: .88rem;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.spec-filter-item i {
  font-size: .6rem;
  color: #c2d4ff;
  transition: var(--transition);
}
.spec-filter-item:hover { background: #e8f0fe; color: var(--brand-primary); }
.spec-filter-item:hover i { color: var(--brand-primary); }
.spec-filter-item.active { background: var(--brand-primary); color: #fff; }
.spec-filter-item.active i { color: #fff; }

/* Mobile filter panel */
@media (max-width: 991.98px) {
  .filter-sidebar { position: static; }
  #doctorFilterPanel.collapse:not(.show) { display: none; }
}

/* ── Lab Test Cards ─────────────────────────────────────── */
.lab-test-card {
  border-radius: var(--radius-md) !important;
  transition: var(--transition);
  border: 1px solid #e9ecef !important;
}
.lab-test-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow) !important;
  border-color: #c2d4ff !important;
}
.lab-test-icon { font-size: 2rem; }

/* ── Hospital / Diagnostic entity cards ─────────────────── */
.entity-card { transition: var(--transition); border: 1px solid #e9ecef !important; }
.entity-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow) !important;
  border-color: #c2d4ff !important;
}
.entity-logo {
  width: 60px; height: 60px;
  object-fit: contain;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.entity-logo-fallback {
  background: var(--brand-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: var(--brand-primary);
}
.empty-state-icon { font-size: 3rem; }

/* ── Page Header ────────────────────────────────────────── */
.page-header {
  background:
    radial-gradient(900px 300px at 85% -20%, rgba(13,202,240,.22) 0%, transparent 60%),
    linear-gradient(135deg, #1a2238 0%, #12306b 55%, #0d6efd 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 12px, transparent 12px 24px);
  pointer-events: none;
}
.page-header .container { position: relative; z-index: 1; }
.page-header .page-title { font-size: 1.6rem; font-weight: 700; color: #fff; }
.page-header .breadcrumb { margin-bottom: 0; }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }
.page-header .breadcrumb-item a { color: rgba(255,255,255,.8); }
.page-header .breadcrumb-item a:hover { color: #fff; }
.page-header .breadcrumb-item.active { color: #fff; }

/* ── Auth Pages ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0d6efd 0%, #0a4dbf 40%, #1a2238 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
}
.auth-wrapper { width: 100%; max-width: 480px; }
.auth-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
}

/* ── Why Section ────────────────────────────────────────── */
.why-item { padding: 1rem; }
.why-item i { display: block; }
.why-icon {
  width: 72px; height: 72px;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem;
  color: #fff;
  background: var(--brand-gradient);
  border-radius: 1.25rem;
  box-shadow: 0 8px 20px rgba(13,110,253,.22);
  transition: var(--transition);
}
.why-item:hover .why-icon { transform: translateY(-4px) rotate(-3deg); box-shadow: 0 12px 26px rgba(13,110,253,.32); }
.why-icon.why-icon-alt { background: var(--brand-deep); }

/* ── Lab CTA ────────────────────────────────────────────── */
.lab-cta-card { background: #fff; }
.lab-cta-graphic { background: linear-gradient(135deg, #198754 0%, #0d6efd 100%); color: #fff; min-height: 200px; }

/* ── Site Header (brand row) ────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eef1f5;
  position: relative;
  z-index: 1020;
}
.site-header .site-brand {
  padding: 0;
}
.site-header-right {
  min-width: 0;
}
.site-header-divider {
  width: 1px;
  height: 32px;
  background: #e9ecef;
}
.header-socials { gap: .4rem; }
.header-social {
  width: 34px; height: 34px;
  border: 1px solid #e9ecef;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #495057;
  font-size: .9rem;
  transition: var(--transition);
  background: #fff;
}
.header-social:hover {
  background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(13,110,253,.28);
}

/* ── Doctor profile social share ─────────────────────────── */
.doctor-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
}
.doctor-share-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted-soft);
}
.doctor-share-icons {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
}
.doctor-share-btn {
  width: 34px; height: 34px;
  border: 1px solid #e9ecef;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #495057;
  font-size: .9rem;
  background: #fff;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.doctor-share-btn:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(13,110,253,.28);
}
.doctor-share-btn.copied { background: var(--brand-secondary); border-color: var(--brand-secondary); color: #fff; }

/* ── Doctor public profile — responsive ─────────────────── */
/* Profile header avatar: square on desktop, keep a comfortable
   aspect ratio on mobile instead of a giant full-width square. */
.doctor-profile-avatar { padding-top: 100%; }
/* Full-width CTA on phones, auto width from md up (Bootstrap has no responsive width utility) */
.w-md-auto { width: 100%; }
@media (min-width: 768px) {
  .w-md-auto { width: auto; }
}
@media (max-width: 767.98px) {
  .doctor-profile-avatar { padding-top: 62%; }
  .doctor-profile-avatar + .card-body { padding: 1.25rem; }
  .doctor-profile-avatar + .card-body h2 { font-size: 1.35rem; }
  .doctor-share { align-items: flex-start; }
  .doctor-share-icons { width: 100%; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .doctor-profile-avatar { padding-top: 110%; }
}

/* Booking preview doctor card: avatar stays fixed-size, text wraps */
.doctor-preview-avatar {
  width: 72px; height: 72px; object-fit: cover; flex-shrink: 0;
}
@media (max-width: 575.98px) {
  .doctor-preview-avatar { width: 56px; height: 56px; }
}
.header-cta {
  white-space: nowrap; font-size: .9rem;
  box-shadow: 0 6px 18px rgba(13,110,253,.3);
  position: relative; overflow: hidden;
  border: none;
  background: var(--brand-gradient);
  background-size: 160% 160%;
  transition: background-position .4s ease, transform .25s ease, box-shadow .25s ease;
}
.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(13,110,253,.38);
  background-position: 100% 50%;
}
.header-cta:active {
  transform: translateY(0);
}
.header-cta::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.4) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform .55s ease;
}
.header-cta:hover::after { transform: translateX(120%); }

/* ── Footer ─────────────────────────────────────────────── */
.main-footer {
  background: linear-gradient(180deg, #141c30 0%, #1a2238 60%, #0d1b2a 100%);
  color: #adb5bd;
  position: relative;
}
.main-footer::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), #0dcaf0, #198754);
  opacity: .8;
}
.footer-emergency-strip {
  background: linear-gradient(90deg, #b91c1c 0%, #ef4444 60%, #f59e0b 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.emergency-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.emergency-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.emergency-note { font-size: .82rem; opacity: .9; }
.emergency-call {
  font-weight: 700;
  color: #b91c1c;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transition: var(--transition);
}
.emergency-call:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.25); color: #991b1b; }
.footer-heading { color: #e9ecef; font-weight: 600; font-size: .9rem; margin-bottom: .9rem; text-transform: uppercase; letter-spacing: .05em; position: relative; padding-bottom: .55rem; }
.footer-heading::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 32px; height: 3px;
  background: var(--brand-gradient);
  border-radius: 3px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .45rem; }
.footer-links a { color: #fff; font-size: .88rem; transition: var(--transition); display: inline-flex; align-items: center; gap: .35rem; }
.footer-links a::before {
  content: "";
  width: 0; height: 1.5px;
  background: var(--brand-accent);
  transition: width .25s ease;
  flex-shrink: 0;
}
.footer-links a:hover { color: #fff; }
.footer-links a:hover::before { width: 10px; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { display: flex; gap: .75rem; margin-bottom: .8rem; font-size: .88rem; align-items: flex-start; }
.footer-contact i { color: var(--brand-primary); flex-shrink: 0; margin-top: .15rem; }
.footer-contact a { color: #adb5bd; transition: var(--transition); }
.footer-contact a:hover { color: #fff; }
.footer-newsletter .form-control {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.14);
  color: #f1f5fb;
}
.footer-newsletter .form-control::placeholder { color: #8fa0ba; }
.footer-newsletter .form-control:focus {
  background: rgba(255,255,255,.12);
  border-color: var(--brand-primary, #0d6efd);
  color: #fff;
}
.footer-logo-icon {
  width: 40px; height: 40px;
  background: var(--brand-primary); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.3rem; flex-shrink: 0;
}
.footer-logo { max-width: 44px; max-height: 44px; object-fit: contain; }
.footer-brand-name { font-size: 1rem; font-weight: 700; color: #e9ecef; }
.footer-brand-sub  { font-size: .72rem; color: #6c757d; }
.footer-socials { gap: .5rem; }
.footer-social {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.08); color: #adb5bd;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.footer-social:hover { background: var(--brand-primary); color: #fff; transform: translateY(-2px); }
.social-links { display: flex; gap: .6rem; }
.social-links a {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.08); color: #adb5bd;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.social-links a:hover { background: var(--brand-primary); color: #fff; }
.footer-bottom { background: rgba(0,0,0,.3); border-top: 1px solid rgba(255,255,255,.06); }
.footer-bottom a { color: #6c757d; transition: var(--transition); }
.footer-bottom a:hover { color: #adb5bd; }
.footer-back-top {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  color: #adb5bd;
  text-decoration: none;
  transition: var(--transition);
}
.footer-back-top:hover { color: #fff; }
.footer-back-top i {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem;
  transition: var(--transition);
}
.footer-back-top:hover i { background: var(--brand-primary); color: #fff; transform: translateY(-2px); }

/* ── Floating back-to-top ──────────────────────────────── */
.scroll-top-btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(13,110,253,.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease, box-shadow .3s ease;
  z-index: 1040;
  cursor: pointer;
}
.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  box-shadow: 0 14px 30px rgba(13,110,253,.5);
  transform: translateY(-3px);
}
.scroll-top-btn:focus-visible {
  outline: 3px solid rgba(13,110,253,.5);
  outline-offset: 2px;
}

/* ── Confirmation Page ──────────────────────────────────── */
.confirmation-details { border-left: 4px solid var(--brand-primary); }

/* ── Booking page ───────────────────────────────────────── */
/* Main booking form layout */
.booking-page .booking-form-card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px rgba(17,28,51,.08);
  overflow: hidden;
}
.booking-page .booking-form-head {
  background:
    radial-gradient(700px 180px at 100% -30%, rgba(13,202,240,.14) 0%, transparent 60%),
    linear-gradient(135deg, #1a2238 0%, #12306b 60%, #0d6efd 100%);
  color: #fff;
  padding: 1.75rem 1.75rem 1.5rem;
}
.booking-page .booking-form-head .form-badge {
  display: inline-block;
  background: rgba(255,255,255,.16);
  color: #fff;
  padding: .28rem .85rem;
  border-radius: 2rem;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.booking-page .booking-form-head h2 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin: .6rem 0 .3rem;
}
.booking-page .booking-form-head p {
  color: rgba(255,255,255,.78);
  margin: 0;
  font-size: .92rem;
}
.booking-page .booking-form-body { padding: 1.75rem; }

/* Grouped form sections */
.booking-page .form-section {
  border: 1px solid #eef1f5;
  border-radius: 1rem;
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1.25rem;
  background: #fbfcfe;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.booking-page .form-section:focus-within {
  border-color: rgba(13,110,253,.45);
  box-shadow: 0 0 0 3px rgba(13,110,253,.08);
}
.booking-page .form-section-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .95rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 1rem;
}
.booking-page .form-section-title .step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.booking-page .form-section-title i {
  color: var(--brand-primary);
}

/* Booking sidebar */
.booking-page .booking-sidebar { width: 100%; }
.booking-page .booking-sidebar .sidebar-card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 40px rgba(17,28,51,.07);
}
.booking-page .booking-steps .step-item {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: .6rem 0;
}
.booking-page .booking-steps .step-item + .step-item {
  border-top: 1px dashed #e6eaf0;
}
.booking-page .booking-steps .step-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: #e8f0fe;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.booking-page .booking-steps .step-title {
  font-weight: 600;
  font-size: .93rem;
  color: var(--brand-dark);
}
.booking-page .booking-steps .step-text {
  font-size: .83rem;
  color: #6c757d;
}
.booking-page .booking-services li:last-child { border-bottom: 0 !important; }

/* Booking doctor preview */
.booking-page .booking-preview {
  border: 1px solid #eef1f5;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17,28,51,.06);
  transition: opacity .3s ease;
}
.booking-page .booking-preview.is-loading { opacity: .45; }
.booking-page .doctor-preview-avatar {
  width: 72px; height: 72px; object-fit: cover; flex-shrink: 0;
}

/* Booking responsive */
@media (max-width: 575.98px) {
  .booking-page .booking-form-head { padding: 1.5rem 1.25rem; }
  .booking-page .booking-form-head h2 { font-size: 1.3rem; }
  .booking-page .booking-form-body { padding: 1.25rem; }
  .booking-page .form-section { padding: 1rem; }
  .doctor-preview-avatar { width: 56px; height: 56px; }
}
@media (min-width: 992px) {
  .booking-page .booking-sidebar { position: sticky; top: 110px; }
}

/* ── Utilities ──────────────────────────────────────────── */
.z-1 { z-index: 1; }
.text-truncate-2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Scroll-reveal for card grids (JS adds .revealed when in view) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s cubic-bezier(.22,.61,.36,1), transform .55s cubic-bezier(.22,.61,.36,1);
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-section   { min-height: auto; padding: 3rem 0 3rem; }
  .hero-title     { font-size: 2rem; }
  .quick-search-card { padding: 1.25rem; }
  .auth-card      { padding: 1.75rem 1.25rem; }
}

/* ── Hero Carousel (premium framed) ─────────────────────── */
.hero-carousel {
  margin-bottom: 0;
  padding: 1.25rem 1.25rem 0;
}

/* Slide container — framed rounded card with a soft brand glow */
.carousel-slide {
  position: relative;
  width: 100%;
  height: 74vh;
  min-height: 420px;
  max-height: 680px;
  overflow: hidden;
  background: #1a2238;
  border-radius: 1.25rem;
  box-shadow:
    0 18px 50px rgba(13,110,253,.16),
    0 4px 14px rgba(0,0,0,.08),
    inset 0 0 0 1px rgba(255,255,255,.06);
}

/* Banner image — full-bleed, covers the slide, gentle Ken Burns drift */
.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: heroKenBurns 8s ease-out both;
  will-change: transform;
}
.carousel-item.active .carousel-image {
  animation: heroKenBurns 8s ease-out both;
}
.carousel-item:not(.active) .carousel-image {
  animation: none;
}

@keyframes heroKenBurns {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1) translate3d(0, 0, 0); }
}

/* Soft gradient scrims — keep indicators/controls legible on any image */
.carousel-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13,17,32,.18) 0%, transparent 32%),
    linear-gradient(0deg, rgba(13,17,32,.28) 0%, transparent 34%);
  border-radius: inherit;
}

/* Progress-pill indicators */
.hero-carousel .carousel-indicators {
  bottom: .9rem;
  gap: .45rem;
  margin-bottom: .4rem;
  z-index: 3;
}
.hero-carousel .carousel-indicators button {
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  padding: .45rem .3rem;
  background: transparent;
  opacity: 1;
}
.hero-carousel .carousel-indicators .indicator-pill {
  display: block;
  width: 22px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,.38);
  overflow: hidden;
  transition: width .3s ease, background .3s ease;
}
.hero-carousel .carousel-indicators .indicator-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #fff;
}
.hero-carousel .carousel-indicators button.active .indicator-pill {
  width: 34px;
  background: rgba(255,255,255,.22);
}
.hero-carousel .carousel-indicators button.active .indicator-fill {
  width: 100%;
  transition: width 5.5s linear;
}

/* Circular icon controls */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: auto;
  opacity: 0;
  transition: opacity .3s ease;
  z-index: 3;
}
.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next,
.hero-carousel:focus-within .carousel-control-prev,
.hero-carousel:focus-within .carousel-control-next {
  opacity: 1;
}
.hero-carousel .carousel-control-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-size: 1.25rem;
  color: #fff;
  background: rgba(13,17,32,.42);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .25s ease, transform .25s ease, border-color .25s ease;
}
.hero-carousel .carousel-control-prev { left: 1.1rem; }
.hero-carousel .carousel-control-next { right: 1.1rem; }
.hero-carousel .carousel-control-prev:hover .carousel-control-icon,
.hero-carousel .carousel-control-next:hover .carousel-control-icon {
  background: rgba(13,110,253,.92);
  border-color: rgba(255,255,255,.35);
  transform: scale(1.06);
}
.hero-carousel .carousel-control-prev:active .carousel-control-icon,
.hero-carousel .carousel-control-next:active .carousel-control-icon {
  transform: scale(.96);
}

/* Fade crossfade */
.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity .75s ease-in-out;
}
.carousel-fade .carousel-item.active {
  opacity: 1;
}

/* Respect reduced motion — no Ken Burns, no progress wipe */
@media (prefers-reduced-motion: reduce) {
  .carousel-image,
  .carousel-item.active .carousel-image {
    animation: none;
  }
  .hero-carousel .carousel-indicators button.active .indicator-fill {
    transition: none;
    width: 100%;
  }
}

/* ── Tablet ─────────────────────────────────────────────── */
@media (max-width: 992px) {
  .hero-carousel { padding: 1rem 1rem 0; }
  .carousel-slide {
    height: 60vh;
    min-height: 340px;
    max-height: 500px;
    border-radius: 1rem;
  }
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 576px) {
  .hero-carousel { padding: .75rem .75rem 0; }
  .carousel-slide {
    height: 52vh;
    min-height: 260px;
    max-height: 380px;
    border-radius: .875rem;
  }
  .hero-carousel .carousel-control-prev,
  .hero-carousel .carousel-control-next {
    display: none;
  }
  .hero-carousel .carousel-indicators {
    bottom: .55rem;
  }
  .hero-carousel .carousel-indicators .indicator-pill {
    width: 16px;
    height: 4px;
  }
  .hero-carousel .carousel-indicators button.active .indicator-pill {
    width: 26px;
  }
}
