/* Core variables */
:root {
  --brand-emerald: #0f5f43;
  --brand-mint: #21a06b;
  --brand-gold: #ffd166;
  --brand-cream: #faf7f1;
  --brand-charcoal: #1f2a24;
  --brand-slate: #485752;
  --brand-white: #ffffff;
  /* UI tokens */
  --ui-surface: rgba(255, 255, 255, 0.96);
  --ui-muted: rgba(31, 41, 36, 0.06);
  --accent: var(--brand-mint);
  --accent-strong: var(--brand-emerald);
  --shadow-elev: 0 20px 50px rgba(15, 95, 67, 0.12);
  /* Type scale */
  --type-h1: clamp(3rem, 4.5vw + 1rem, 4.8rem);
  --type-h2: clamp(1.6rem, 2.6vw + 0.5rem, 2.4rem);
  --type-body: 1rem;
  --font-sans: "Tiro Bangla", "Noto Sans Bengali", "Poppins", "Segoe UI",
    sans-serif;
  --font-serif: "Tiro Bangla", "Playfair Display", "Times New Roman", serif;
  --shadow-soft: 0 20px 60px rgba(31, 58, 45, 0.1);
  --shadow-tight: 0 12px 30px rgba(31, 58, 45, 0.2);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --transition: all 0.3s ease;
  /* mobile fixed navbar height (approx). Used to push content down on small screens */
  --navbar-height-mobile: 110px;
}

/* Global resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--brand-cream);
  color: var(--brand-charcoal);
  line-height: 1.6;
  overflow-x: hidden;
  animation: pageLoadFadeIn 0.8s ease-out;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  word-wrap: break-word;
}

a:hover {
  color: var(--brand-mint);
}

img {
  max-width: 100%;
  display: block;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

main {
  overflow: hidden;
}

.wrapper {
  width: min(1180px, 90vw);
  margin: 0 auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  background: rgba(33, 160, 107, 0.1);
  color: var(--brand-emerald);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--brand-white);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.8rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn.primary {
  background: linear-gradient(120deg, var(--brand-emerald), var(--brand-mint));
  color: var(--brand-white);
  box-shadow: var(--shadow-tight);
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(15, 95, 67, 0.25);
}

.btn.secondary {
  background: var(--brand-white);
  color: var(--brand-emerald);
  border: 1px solid rgba(15, 95, 67, 0.2);
}

.btn.secondary:hover {
  background: rgba(33, 160, 107, 0.1);
}

.section-title {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.section-title span {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-mint);
  font-weight: 600;
  word-wrap: break-word;
}

.section-title h2 {
  font-size: clamp(1.8rem, 3vw + 1rem, 3.1rem);
  font-family: var(--font-serif);
  color: var(--brand-emerald);
  word-wrap: break-word;
  line-height: 1.2;
}

.section-title p {
  color: var(--brand-slate);
  max-width: 630px;
  word-wrap: break-word;
  line-height: 1.6;
}

.card-grid {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  background: var(--brand-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1.2rem;
  border: 1px solid rgba(31, 58, 45, 0.04);
}

.card h3 {
  font-size: 1.25rem;
  color: var(--brand-emerald);
}

.card p {
  color: var(--brand-slate);
}

.card .icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(33, 160, 107, 0.12);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: var(--brand-emerald);
}

/* Navigation styles - UNIFIED CONSISTENT NAVBAR */
.navbar {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, 90vw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250, 247, 241, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 9999px;
  padding: 0.8rem 1.5rem;
  z-index: 1000;
  box-shadow: 0 12px 24px rgba(15, 95, 67, 0.08);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(15, 95, 67, 0.2);
  background: var(--brand-white);
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  cursor: pointer;
  transition: var(--transition);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--brand-emerald);
  transition: transform 0.28s ease, opacity 0.28s ease;
  border-radius: 999px;
}

/* Spacer to offset the fixed navbar height on small screens */
.nav-spacer {
  display: none;
  height: 0;
}

.navbar.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.navbar.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.navbar.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.navbar .brand-identity {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.navbar .brand-logo img {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid rgba(33, 160, 107, 0.4);
}

/* Hide the brand name on mobile */
.navbar .brand-name {
  display: none;
  font-size: 1.1rem;
  color: var(--brand-emerald);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.navbar nav {
  flex: 1;
  display: flex;
  justify-content: center;
  margin-left: 1rem;
}

.navbar ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.navbar li a {
  display: inline-flex;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-weight: 600;
  color: var(--brand-slate);
  transition: var(--transition);
  white-space: nowrap;
}

.navbar li a:hover,
.navbar li a.active {
  background: rgba(33, 160, 107, 0.12);
  color: var(--brand-emerald);
}

.navbar.is-open {
  background: rgba(250, 247, 241, 0.98);
  box-shadow: 0 24px 60px rgba(15, 95, 67, 0.22);
}

.navbar nav ul {
  transition: opacity 0.3s ease;
}

.navbar nav ul {
  transition: opacity 0.3s ease;
}

/* Vertical nav (About page) */
body.about main {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  width: min(1180px, 92vw);
  margin: 0 auto;
  padding-top: 8rem;
}

body.about .sidebar-nav {
  position: sticky;
  top: 7.5rem;
  background: var(--brand-white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1rem;
  height: fit-content;
}

body.about .sidebar-nav strong {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-mint);
}

body.about .sidebar-nav a {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--brand-slate);
}

body.about .sidebar-nav a:hover,
body.about .sidebar-nav a.active {
  background: rgba(33, 160, 107, 0.12);
  color: var(--brand-emerald);
}

/* Hero */
.hero {
  position: relative;
  padding: 10rem 0 6rem;
  display: grid;
  gap: 3rem;
  align-items: center;
  overflow: hidden;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw + 1rem, 4.8rem);
  color: var(--brand-white);
  line-height: 1.15;
  margin-bottom: 0.4rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero p {
  word-wrap: break-word;
  line-height: 1.6;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* subtle overlay that can be customized per page */
  background: linear-gradient(
    130deg,
    rgba(15, 95, 67, 0.12),
    rgba(15, 95, 67, 0.55)
  );
  z-index: -1;
  border-bottom-left-radius: 96px;
  border-bottom-right-radius: 96px;
  pointer-events: none;
}

/* Video background */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    130deg,
    rgba(15, 95, 67, 0.12),
    rgba(15, 95, 67, 0.55)
  );
  z-index: -1;
}

/* Card micro-interaction */
.card {
  background: var(--brand-white);
  border-radius: 14px;
  padding: 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 8px 28px rgba(15, 95, 67, 0.06);
  overflow: hidden;
  word-wrap: break-word;
}

.card h3,
.card p,
.card strong {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-elev);
}
.card .icon {
  font-size: 1.6rem;
  transition: transform 0.36s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.card:hover .icon {
  transform: rotate(-6deg) scale(1.08);
}

/* Appointment modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 12, 12, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}
.modal {
  background: var(--brand-white);
  border-radius: 12px;
  padding: 1.5rem;
  width: min(720px, 92vw);
  box-shadow: var(--shadow-elev);
}
.modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.modal .modal-body {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
}
.modal .modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* Doctor card expanded state */
.doctor-card {
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  cursor: pointer;
}
.doctor-card.expanded {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(15, 95, 67, 0.12);
}
.doctor-card .more {
  display: none;
  margin-top: 0.8rem;
  color: var(--brand-slate);
}
.doctor-card.expanded .more {
  display: block;
}

/* Mobile quick actions (bottom bar) */
.mobile-quick-actions {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translate(-50%, 120%);
  width: calc(100vw - 2.5rem);
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(250, 247, 241, 0.98);
  padding: 0.7rem 1rem;
  border-radius: 9999px;
  box-shadow: 0 24px 50px rgba(15, 95, 67, 0.18);
  backdrop-filter: blur(18px);
  transition: transform 0.4s ease;
  z-index: 1200;
}

.mobile-quick-actions.is-visible {
  transform: translate(-50%, 0);
}

.mobile-quick-actions a,
.mobile-quick-actions button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 9999px;
  border: none;
  padding: 0.65rem 0.9rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--brand-emerald), var(--brand-mint));
  color: var(--brand-white);
  box-shadow: 0 12px 30px rgba(15, 95, 67, 0.28);
  white-space: nowrap;
}

.mobile-quick-actions a.secondary {
  background: var(--brand-white);
  color: var(--brand-emerald);
  border: 1px solid rgba(15, 95, 67, 0.22);
  box-shadow: none;
}

.mobile-quick-actions svg {
  width: 18px;
  height: 18px;
}

.hero-content {
  display: grid;
  gap: 1.5rem;
  max-width: 560px;
}

/* CTA row inside hero: center the buttons and keep the wrapping behavior */
.hero .cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center; /* center horizontally */
  align-items: center; /* center vertically */
}

/* For small screens, ensure buttons stretch nicely */
@media (max-width: 720px) {
  .hero .cta-row {
    gap: 0.85rem;
    justify-content: center;
  }
}

/* Extra-small screens (narrow phones) - keep everything compact */
@media (max-width: 420px) {
  .navbar nav ul {
    grid-template-columns: repeat(4, minmax(56px, 1fr));
    gap: 0.12rem;
  }
  .navbar nav a {
    font-size: 0.78rem;
    padding: 0.28rem 0.3rem;
  }
  :root {
    --navbar-height-mobile: 136px;
  }
  .nav-spacer {
    height: var(--navbar-height-mobile);
  }
  .hero {
    padding-top: calc(var(--navbar-height-mobile) + 0.45rem);
  }
}

/* Reveal animation utility */
.will-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.will-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 4.5vw + 1rem, 4.8rem);
  color: var(--brand-white);
  line-height: 1.15;
}

.hero p {
  color: rgba(255, 255, 255, 0.88);
}

.hero-visual .primary-visual {
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(15, 95, 67, 0.18);
  max-width: 480px;
}

/* Mobile-specific: Reduce hero top/bottom spacing on small screens only */
@media (max-width: 768px) {
  .hero {
    padding-top: 3.5rem; /* reduce top space on mobile */
    padding-bottom: 2.2rem; /* reduce bottom space on mobile */
  }
  /* Slightly reduce the hero-content max-width so the heading wraps better on narrow screens */
  .hero .hero-content {
    max-width: min(700px, 92vw);
  }
}

.hero-visual {
  display: grid;
  gap: 1.2rem;
  position: relative;
  width: 100%;
  max-width: 100%;
}

.hero-visual img.primary-visual {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-tight);
  object-fit: cover;
  aspect-ratio: 5 / 4;
  width: 100%;
  max-width: 100%;
}

.hero-visual .stats {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: calc(100% - 3rem);
  background: rgba(255, 255, 255, 0.92);
  padding: 1rem 1.4rem;
  border-radius: var(--radius-md);
  display: grid;
  gap: 0.5rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.hero-visual .stats strong {
  font-size: 1.2rem;
  color: var(--brand-emerald);
  word-wrap: break-word;
}

.hero-visual .stats span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-slate);
  word-wrap: break-word;
  line-height: 1.4;
}

/* Highlight band */
.highlight-band {
  margin: 4rem auto 0;
  width: min(1180px, 90vw);
  position: relative;
  background: linear-gradient(
      180deg,
      rgba(15, 95, 67, 0.12),
      rgba(15, 95, 67, 0.36)
    ),
    url("https://images.unsplash.com/photo-1559757148-5c350d0d3c56?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&h=800&q=80");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.5rem;
  display: grid;
  gap: 1.2rem;
  overflow: hidden;
  color: var(--brand-white);
}

.highlight-band h2 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--brand-white);
  text-shadow: 0 6px 18px rgba(12, 12, 12, 0.35);
}

/* Reduce font size on small mobile screens to keep title in one line */
@media (max-width: 480px) {
  .highlight-band h2 {
    font-size: 1.5rem !important;
  }
}

.highlight-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background-image: url("https://images.unsplash.com/photo-1559757148-5c350d0d3c56?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&h=800&q=80");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(8px);
}

.highlight-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
}

.highlight-band .wrapper,
.highlight-band > * {
  z-index: 2;
}

.feature-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(4, 1fr);
}

.feature-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 250ms ease, box-shadow 250ms ease,
    border-color 250ms ease;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.feature-card-link.full-width {
  grid-column: 1 / -1;
}

.feature-card-link:hover,
.feature-card-link:focus {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(15, 95, 67, 0.12);
  outline: none;
}

.feature-card-link:focus {
  outline: 3px solid rgba(33, 160, 107, 0.12);
  outline-offset: 2px;
}

.feature-card {
  background: transparent;
  color: var(--brand-charcoal);
  padding: 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 28px rgba(15, 95, 67, 0.06);
  display: grid;
  gap: 0.85rem;
  align-items: start;
  min-width: 0;
  border: 1px solid rgba(31, 58, 45, 0.06);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(15px);
  z-index: -2;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  z-index: -1;
}

.feature-card:nth-child(1)::before {
  background-image: url("https://images.unsplash.com/photo-1559757148-5c350d0d3c56?ixlib=rb-4.0.3&auto=format&fit=crop&w=400&h=300&q=80");
}

.feature-card:nth-child(2)::before {
  background-image: url("https://images.unsplash.com/photo-1505751172876-fa1923c5c528?ixlib=rb-4.0.3&auto=format&fit=crop&w=400&h=300&q=80");
}

.feature-card:nth-child(3)::before {
  background-image: url("https://images.unsplash.com/photo-1481627834876-b7833e8f5570?ixlib=rb-4.0.3&auto=format&fit=crop&w=400&h=300&q=80");
}

.feature-card:nth-child(4)::before {
  background-image: url("https://images.unsplash.com/photo-1576091160550-2173dba999ef?w=400&h=300&fit=crop");
}

.feature-card h3 {
  color: var(--brand-emerald);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}
.feature-card p {
  color: var(--brand-slate);
  line-height: 1.6;
  font-size: 0.985rem;
}
.feature-card .feature-icon {
  display: none;
}

/* Feature card icons layout */
.feature-card {
  grid-template-columns: 1fr;
  grid-template-areas: "title" "p";
  display: grid;
  gap: 0.6rem 0.9rem;
  align-items: start;
}
.feature-card .feature-icon {
  display: none;
}
.feature-card h3 {
  grid-area: title;
  margin: 0;
}
.feature-card p {
  grid-area: p;
  margin: 0;
}

/* mobile: stack the card content and center the icon */
@media (max-width: 720px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .feature-card {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "p";
    align-items: start;
  }
  .feature-card .feature-icon {
    display: none;
  }
}

/* slightly larger cards on big screens */
@media (min-width: 1200px) {
  .feature-card {
    padding: 1.6rem;
  }
}

.feature-card h3 {
  color: var(--brand-emerald);
  font-size: 1.15rem;
  word-wrap: break-word;
  line-height: 1.2;
}

/* Story timeline */
.timeline {
  display: grid;
  gap: 2rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 0.75rem;
  width: 2px;
  background: rgba(33, 160, 107, 0.2);
}

.timeline-item {
  background: var(--brand-white);
  padding: 1.8rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  border-left: 6px solid rgba(33, 160, 107, 0.4);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.timeline-item h3 {
  font-size: 1.2rem;
  color: var(--brand-emerald);
  word-wrap: break-word;
  line-height: 1.4;
}

.timeline-item p {
  word-wrap: break-word;
  line-height: 1.6;
}

.timeline-item span {
  font-size: 0.85rem;
  color: var(--brand-mint);
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* Treatment showcase */
.treatment-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.treatment-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  min-height: 360px;
}

.treatment-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
  transition: var(--transition);
}

.treatment-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 95, 67, 0.05),
    rgba(15, 95, 67, 0.78)
  );
}

.treatment-card:hover img {
  transform: scale(1.05);
}

.treatment-card .info {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  color: var(--brand-white);
  display: grid;
  gap: 0.5rem;
  z-index: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.treatment-card .info h3 {
  color: var(--brand-white);
  word-wrap: break-word;
  line-height: 1.3;
}

/* Doctor cards */
.doctor-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.doctor-card {
  background: var(--brand-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 2rem;
  display: grid;
  gap: 1rem;
  align-items: start;
  text-align: center;
}

.doctor-card img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  border: 6px solid rgba(33, 160, 107, 0.1);
}

.doctor-card h3 {
  color: var(--brand-emerald);
}

.doctor-card span {
  color: var(--brand-mint);
  font-weight: 600;
}

.doctor-card p {
  color: var(--brand-slate);
}

/* Gallery */
.mosaic {
  columns: 3;
  column-gap: 1.5rem;
}

.mosaic figure {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.mosaic img {
  width: 100%;
  border-radius: var(--radius-md);
  transform: scale(1.02);
  transition: var(--transition);
}

.mosaic figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem;
  background: linear-gradient(180deg, transparent, rgba(15, 95, 67, 0.85));
  color: var(--brand-white);
  font-size: 0.9rem;
}

.mosaic figure:hover img {
  transform: scale(1.08);
}

/* Resource cards */
.resource-grid {
  display: grid;
  gap: 1.5rem;
}

.resource-card {
  display: grid;
  gap: 1rem;
  background: var(--brand-white);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  box-shadow: var(--shadow-soft);
}

.resource-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resource-card header span {
  font-size: 0.8rem;
  color: var(--brand-mint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.resource-card footer {
  display: flex;
  justify-content: flex-end;
}

.resource-card a {
  color: var(--brand-emerald);
  font-weight: 600;
}

/* Appointment CTA */
.cta-banner {
  margin: 5rem auto;
  width: min(1180px, 90vw);
  background: linear-gradient(
      120deg,
      rgba(15, 95, 67, 0.92),
      rgba(33, 160, 107, 0.92)
    ),
    url("https://images.unsplash.com/photo-1576091160397-112c6c5ec4ae?w=1200&h=600&fit=crop")
      center/cover;
  color: var(--brand-white);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  display: grid;
  gap: 1rem;
  box-shadow: var(--shadow-tight);
  overflow: hidden;
}

.cta-banner h2 {
  font-size: clamp(1.8rem, 2vw + 1rem, 2.8rem);
  word-wrap: break-word;
  line-height: 1.2;
}

.cta-banner p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  word-wrap: break-word;
  line-height: 1.6;
}

.cta-banner .btn.secondary {
  background: rgba(255, 255, 255, 0.14);
  color: var(--brand-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-banner .btn.secondary:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* Contact page */
.contact-layout {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.contact-card {
  background: var(--brand-white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1.4rem;
  overflow: hidden;
}

.contact-card h3 {
  font-size: 1.3rem;
  color: var(--brand-emerald);
  word-wrap: break-word;
}

.contact-info {
  display: grid;
  gap: 1rem;
}

/* Clinic info styles */
.clinic-info {
  /* Style for the main container */
  padding: 20px;
  border-radius: 10px;
  background-color: var(--ui-muted); /* Light background matching theme */
}

.info-item {
  /* Use Flexbox for each item */
  display: flex;
  align-items: flex-start; /* Aligns items to the top */
  margin-bottom: 20px; /* Space between items */
}

.icon-container {
  margin-right: 15px; /* Space between icon and text */
  flex-shrink: 0; /* Prevents the icon from shrinking */
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(33, 160, 107, 0.12);
  color: var(--brand-emerald);
  font-weight: 700;
}

.text-container p {
  margin: 0; /* Removes default paragraph margins */
  line-height: 1.5;
}

.text-container .days {
  font-weight: bold;
  margin-bottom: 5px; /* Space between days and time/details */
}

form {
  display: grid;
  gap: 1.2rem;
}

form label {
  display: grid;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--brand-emerald);
  word-wrap: break-word;
}

form input,
form textarea,
form select {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(31, 58, 45, 0.15);
  background: rgba(255, 255, 255, 0.95);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

form input:focus,
form textarea:focus,
form select:focus {
  outline: 2px solid rgba(33, 160, 107, 0.4);
  border-color: transparent;
}

form textarea {
  min-height: 160px;
  resize: vertical;
}

.map-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: none;
  width: 100%;
  min-height: 360px;
}

/* Footer */
footer {
  background: var(--brand-charcoal);
  color: rgba(255, 255, 255, 0.84);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

footer .footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

footer h4 {
  color: var(--brand-white);
  margin-bottom: 1rem;
}

footer ul {
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

footer .credits {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Utility sections */
.section-pad {
  padding: 5rem 0;
}

.split {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
}

.gradient-border {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 3px;
  background: linear-gradient(
    135deg,
    rgba(15, 95, 67, 0.1),
    rgba(33, 160, 107, 0.6)
  );
}

.gradient-border > div {
  background: var(--brand-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.badge-grid span {
  display: inline-flex;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(33, 160, 107, 0.12);
  color: var(--brand-emerald);
  font-weight: 600;
  font-size: 0.85rem;
}

/* Testimonials */
.testimonials {
  position: relative;
  overflow: hidden;
}

.testimonial-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.8rem;
  flex-wrap: nowrap;
  max-height: 400px;
}

.testimonial-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--brand-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1.2rem;
  max-height: 350px;
  overflow: hidden;
}

.testimonial-card .client {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-card p {
  margin: 0;
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  line-clamp: 4;
}

/* Hero variations */
body.treatments .hero::before {
  background: linear-gradient(
    130deg,
    rgba(33, 160, 107, 0.2),
    rgba(15, 95, 67, 0.85)
  );
}

body.doctors .hero::before {
  background: linear-gradient(
    130deg,
    rgba(255, 209, 102, 0.2),
    rgba(15, 95, 67, 0.85)
  );
}

body.resources .hero::before {
  background: linear-gradient(
    130deg,
    rgba(15, 95, 67, 0.4),
    rgba(72, 87, 82, 0.9)
  );
}

body.contact .hero::before {
  background: linear-gradient(
    130deg,
    rgba(31, 58, 45, 0.15),
    rgba(33, 160, 107, 0.75)
  );
}

/* Floating appointment button */
.float-cta {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 999;
  background: linear-gradient(140deg, var(--brand-mint), var(--brand-emerald));
  color: var(--brand-white);
  padding: 0.9rem 1.4rem;
  border-radius: 9999px;
  box-shadow: var(--shadow-tight);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.float-cta svg {
  width: 20px;
  height: 20px;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .navbar {
    flex-wrap: wrap;
    gap: 0.6rem;
    border-radius: var(--radius-lg);
    top: 0.6rem;
    left: 0;
    transform: none;
    padding: 0.6rem 0.8rem;
    width: 100%;
    justify-content: center;
  }

  /* Small screens: hide brand identity (logo & name) to free space */
  .navbar .brand-identity {
    display: none;
  }

  .nav-toggle {
    display: none;
  }

  .navbar nav {
    position: static;
    margin-left: 0;
    width: 100%;
    background: transparent;
    box-shadow: none;
    padding: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    max-height: none;
    overflow: visible;
  }

  /* Show the menu as a grid so it spans two rows (8 items => 4 columns x 2 rows) */
  .navbar nav ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(84px, 1fr));
    gap: 0.2rem;
    align-items: center;
  }

  .navbar li a {
    justify-content: center;
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    text-align: center;
  }

  body.about main {
    grid-template-columns: 1fr;
  }

  body.about .sidebar-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Add a spacer equal to navbar height so content doesn't slide under it */
  .nav-spacer {
    display: block;
    height: var(--navbar-height-mobile);
  }
  .hero {
    padding-top: calc(var(--navbar-height-mobile) + 0.6rem);
  }
}

@media (max-width: 720px) {
  /* Keep the menu in 4 columns to maintain 2 rows for 8 items, but allow smaller min width */
  .navbar nav ul {
    grid-template-columns: repeat(4, minmax(64px, 1fr));
    gap: 0.18rem;
  }
  .navbar nav a {
    font-size: 0.82rem;
    padding: 0.36rem 0.36rem;
  }
  /* Bump up the spacer for very small screens */
  :root {
    --navbar-height-mobile: 126px;
  }
  .nav-spacer {
    height: var(--navbar-height-mobile);
  }
  .hero {
    padding-top: calc(var(--navbar-height-mobile) + 0.5rem);
  }
}

@media (min-width: 992px) {
  .mobile-quick-actions {
    display: none;
  }

  /* Desktop-only: increase hero title size and keep it on a single line */
  .hero .hero-content {
    max-width: min(1200px, 95vw);
  }
  /* Center the hero text block in the page middle on desktop */
  .hero .hero-content {
    justify-self: center; /* center horizontally within grid column */
    align-self: center; /* center vertically within grid row */
    margin: 0 auto; /* fallback centering */
    text-align: center; /* center heading and buttons horizontally */
  }
  .hero h1 {
    font-size: clamp(3.8rem, 3.6vw + 2rem, 6.4rem); /* larger and responsive */
    white-space: nowrap; /* force single-line */
    overflow: hidden; /* hide overflow if the text exceeds container */
    text-overflow: ellipsis; /* visual fallback should it ever be needed */
    margin-bottom: 0.2rem;
    letter-spacing: -0.02em;
  }
}

@media (max-width: 720px) {
  .float-cta {
    display: none;
  }

  .hero {
    text-align: center;
    padding: 8rem 0 4rem;
  }

  .hero-content {
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
  }

  .hero-visual {
    order: -1;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
  }

  .hero-visual .stats {
    position: static;
    margin-top: 1rem;
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
    grid-template-columns: 1fr 1fr;
    text-align: center;
    padding: 1rem;
    gap: 1rem;
  }

  .hero-visual .stats strong {
    font-size: 1.5rem;
    display: block;
  }

  .hero-visual .stats span {
    font-size: 0.75rem;
    display: block;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cta-banner {
    padding: 2rem 1.5rem;
    margin: 3rem auto;
  }

  .cta-banner h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .highlight-band {
    padding: 1.5rem;
    margin: 2rem auto 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-card {
    padding: 1.5rem;
  }

  .mosaic {
    columns: 1;
  }

  .testimonials {
    overflow: hidden;
  }

  .testimonial-card {
    flex: 0 0 90%;
  }

  .btn {
    width: 100%;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .section-pad {
    padding: 3rem 0;
  }
}

@media (max-width: 540px) {
  .navbar {
    width: calc(100vw - 1.4rem);
    left: 50%;
    transform: translateX(-50%);
  }

  .navbar nav {
    left: 0.75rem;
    right: 0.75rem;
  }

  .card {
    padding: 1.5rem;
  }

  .float-cta {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .mobile-quick-actions {
    width: calc(100vw - 1.4rem);
    padding: 0.6rem 0.8rem;
  }

  .mobile-quick-actions a,
  .mobile-quick-actions button {
    font-size: 14px;
    padding: 0.5rem 0.6rem;
  }

  .hero-visual .stats {
    padding: 0.8rem;
    gap: 0.8rem;
  }

  .hero-visual .stats strong {
    font-size: 1.3rem;
  }

  .hero-visual .stats span {
    font-size: 0.7rem;
  }

  .cta-banner {
    padding: 1.5rem 1rem;
  }

  .cta-banner h2 {
    font-size: 1.3rem;
  }

  .highlight-band {
    padding: 1.25rem;
    width: calc(100vw - 1rem);
  }

  .contact-card {
    padding: 1.25rem;
  }

  .wrapper {
    width: min(1180px, 95vw);
  }
}

@media (max-width: 480px) {
  .testimonial-card .client {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 768px) {
  .navbar .brand-name {
    display: inline;
  }
}

.tiro-bangla-regular {
  font-family: "Tiro Bangla", serif;
  font-weight: 400;
  font-style: normal;
}

.tiro-bangla-regular-italic {
  font-family: "Tiro Bangla", serif;
  font-weight: 400;
  font-style: italic;
}

@keyframes pageLoadFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Override: Reduce hero spacing on mobile devices (<= 768px) only */
@media (max-width: 768px) {
  .hero {
    padding-top: 3.5rem; /* reduced top padding for mobile */
    padding-bottom: 2.2rem; /* reduced bottom padding for mobile */
  }
  /* keep hero-content centered and readable */
  .hero .hero-content {
    margin: 0 auto;
    text-align: center;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
