/* ============================================================
   Dakshina Bangladesh 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;
}

/* ── 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: var(--brand-dark);
  color: rgba(255,255,255,.75);
  font-size: .78rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.top-bar-item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.top-bar-item i {
  color: var(--brand-accent);
  font-size: .72rem;
}
.top-bar-user {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #e9ecef;
  font-weight: 500;
  font-size: .78rem;
}
.top-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: rgba(255,255,255,.75);
  font-size: .78rem;
  padding: .2rem .65rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
}
.top-bar-btn:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}
.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: .15rem .5rem;
  color: rgba(255,255,255,.75);
  border-color: rgba(255,255,255,.15);
}
.top-bar .dropdown .btn:hover,
.top-bar .dropdown .btn:focus {
  color: #fff;
  border-color: rgba(255,255,255,.3);
}

/* ── Main Navbar ────────────────────────────────────────── */
.main-navbar {
  background: #fff;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  padding: 0;
  z-index: 1030;
  min-height: 68px;
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem 0;
  text-decoration: none;
}
.brand-icon-wrap {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #0dcaf0 100%);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.3rem;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-dark);
  line-height: 1.2;
}
.brand-tagline {
  font-size: .68rem;
  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 8px 32px rgba(0,0,0,.12);
  padding: .5rem;
  margin-top: .5rem !important;
}
.main-navbar .dropdown-item {
  border-radius: var(--radius-sm);
  padding: .45rem .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;
}

/* 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);
  }
}

/* ── 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; }

/* Hero Stats Card */
.hero-stats-card {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  display: flex; flex-direction: column; gap: 1.4rem;
  min-width: 260px;
}
.stat-item { display: flex; align-items: center; gap: 1rem; }
.stat-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.bg-primary-light { background: rgba(13,110,253,.15); }
.bg-success-light { background: rgba(25,135,84,.15); }
.bg-warning-light { background: rgba(255,193,7,.18); }
.bg-info-light    { background: rgba(13,202,240,.15); }
.stat-number { font-size: 1.3rem; font-weight: 700; color: #fff; line-height: 1; }
.stat-label  { font-size: .75rem; color: #adb5bd; }

/* ── Quick Search ───────────────────────────────────────── */
.quick-search-section { margin-top: -2.5rem; position: relative; z-index: 10; }
.quick-search-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.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; }

/* ── Doctor Cards ───────────────────────────────────────── */
.doctor-card {
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid #e9ecef;
  overflow: hidden;
  transition: var(--transition);
}
.doctor-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow);
  border-color: #c2d4ff;
}
.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; }
.fee-badge {
  background: #e8f8ee; color: #198754;
  padding: .15rem .55rem; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 600;
}

/* ── Filter Sidebar ─────────────────────────────────────── */
.filter-card { border-radius: var(--radius-lg) !important; border: 1px solid #e9ecef !important; }
.spec-filter-list { display: flex; flex-direction: column; gap: .2rem; }
.spec-filter-item {
  padding: .35rem .75rem; border-radius: var(--radius-sm);
  color: #495057; font-size: .88rem;
  transition: var(--transition); cursor: pointer;
}
.spec-filter-item:hover { background: #e8f0fe; color: var(--brand-primary); }
.spec-filter-item.active { background: var(--brand-primary); color: #fff; }

/* ── Lab Test Cards ─────────────────────────────────────── */
.lab-test-card {
  border-radius: var(--radius-md) !important;
  transition: var(--transition);
}
.lab-test-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow) !important;
}

/* ── Page Header ────────────────────────────────────────── */
.page-header .page-title { font-size: 1.6rem; font-weight: 700; color: var(--brand-dark); }

/* ── 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; }

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

/* ── Footer ─────────────────────────────────────────────── */
.main-footer { background: #1a2238; color: #adb5bd; }
.footer-heading { color: #e9ecef; font-weight: 600; font-size: .9rem; margin-bottom: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: #adb5bd; font-size: .88rem; transition: var(--transition); }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { display: flex; gap: .75rem; margin-bottom: .75rem; font-size: .88rem; align-items: flex-start; }
.footer-contact i { color: var(--brand-primary); flex-shrink: 0; margin-top: .15rem; }
.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-brand-name { font-size: 1rem; font-weight: 700; color: #e9ecef; }
.footer-brand-sub  { font-size: .72rem; color: #6c757d; }
.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,.2); border-top: 1px solid rgba(255,255,255,.06); }
.footer-bottom a { color: #6c757d; transition: var(--transition); }
.footer-bottom a:hover { color: #adb5bd; }

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

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

/* ── 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 ──────────────────────────────────────── */
.hero-carousel { margin-bottom: -2rem; }

/* Slide container — defines the visible area */
.carousel-slide {
  position: relative;
  width: 100%;
  height: 75vh;
  min-height: 400px;
  max-height: 700px;
  overflow: hidden;
  background: #1a2238;
}

/* Background image — covers the full slide */
.carousel-bg {
  position: absolute;
  inset: 0;
}
.carousel-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay gradient */
.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,34,56,.88) 0%, rgba(30,58,95,.55) 50%, transparent 100%);
}

/* Caption — positioned over the slide */
.carousel-caption-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 3rem 0;
}

.carousel-title {
  font-size: clamp(1.4rem, 4.5vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.carousel-subtitle {
  font-size: clamp(.85rem, 1.6vw, 1.1rem);
  color: rgba(255,255,255,.75);
  max-width: 480px;
  margin-top: .75rem;
  line-height: 1.6;
  text-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.carousel-cta { margin-top: 1.5rem; }

/* Indicators */
.hero-carousel .carousel-indicators {
  bottom: 1.5rem;
  gap: .5rem;
}
.hero-carousel .carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0;
  border: 2px solid rgba(255,255,255,.5);
  background: transparent;
  opacity: 1;
  transition: all .3s ease;
}
.hero-carousel .carousel-indicators button.active {
  width: 28px;
  border-radius: 5px;
  background: #fff;
  border-color: #fff;
}

/* Controls */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 8%;
  opacity: 0;
  transition: opacity .3s ease;
}
.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next {
  opacity: 1;
}
.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
  width: 2.8rem;
  height: 2.8rem;
  background-color: rgba(0,0,0,.35);
  border-radius: 50%;
  background-size: 50%;
  backdrop-filter: blur(4px);
}

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

/* ── Tablet ─────────────────────────────────────────────── */
@media (max-width: 992px) {
  .carousel-slide {
    height: 60vh;
    min-height: 340px;
    max-height: 500px;
  }
  .carousel-overlay {
    background: linear-gradient(135deg, rgba(26,34,56,.9) 0%, rgba(30,58,95,.7) 100%);
  }
  .carousel-title {
    font-size: clamp(1.3rem, 4vw, 2.2rem);
  }
  .carousel-subtitle {
    max-width: 90%;
  }
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 576px) {
  .carousel-slide {
    height: 55vh;
    min-height: 280px;
    max-height: 400px;
  }
  .carousel-caption-wrap {
    padding: 2rem 0;
    text-align: center;
  }
  .carousel-title {
    font-size: clamp(1.1rem, 5vw, 1.6rem);
  }
  .carousel-subtitle {
    max-width: 100%;
    font-size: .85rem;
  }
  .carousel-cta .btn {
    width: 100%;
    font-size: .9rem;
  }
  .hero-carousel .carousel-control-prev,
  .hero-carousel .carousel-control-next {
    display: none;
  }
  .hero-carousel .carousel-indicators {
    bottom: .75rem;
  }
  .hero-carousel .carousel-indicators button {
    width: 8px;
    height: 8px;
  }
  .hero-carousel .carousel-indicators button.active {
    width: 22px;
  }
}
