/*==================================================
  Medivana — styles.css
  Section-specific styles ONLY.

  Rules:
  • Bootstrap utilities first.
  • Reuse base.css components and tokens next.
  • Add CSS here only when neither can achieve the design.
  • Group every section under a clear comment.
  • If a style becomes reusable, move it to base.css.
==================================================*/

/*------------------------------------
  Components page — header state previews
------------------------------------*/
.component-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.badge-active,
.badge-muted {
  padding: 0.3125rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--bs-border-radius-pill);
}

.badge-active {
  color: var(--bs-secondary);
  background-color: var(--bs-primary);
}

.badge-muted {
  color: var(--bs-secondary-color);
  background-color: var(--bs-secondary-bg);
}

/* Framed, non-sticky preview strip for each header variant. */
.component-stage {
  border-block: var(--bs-border-width) solid var(--bs-border-color);
}

.component-stage .site-header {
  position: static;
  z-index: auto;
}

/*------------------------------------
  Hero Section
------------------------------------*/
.hero {
  isolation: isolate;
}

/* Copy block is narrower than the stats card below it (614px in design) */
.hero .lead {
  max-width: 38.5rem;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.hero::before {
  top: 1.5rem;
  right: 0;
  bottom: 1.5rem;
  display: none;
  width: min(48.375rem, 40%);
  background: url("../images/hero/hero-panel.jpg") left top / cover no-repeat;
}

.hero::after {
  top: 0;
  bottom: 0;
  left: 0;
  width: calc((100% - 1530px) / 2);
  background: url("../images/hero/hero-pattern.png") right center / auto 100%
    no-repeat;
  mix-blend-mode: luminosity;
  opacity: 0.5;
}

@media (min-width: 992px) {
  .hero::before {
    display: block;
  }

  .hero-visual-col {
    position: absolute;
    right: 0;
    bottom: -2.5rem;
  }

  .hero-visual {
    width: 118%;
    margin-left: -18%;
  }
}

@media (min-width: 1400px) {
  .hero-visual {
    width: 126%;
    margin-left: -26%;
  }
}

/* Below lg the photo carries its own lime panel (the same artwork as the
   desktop bleed) so phones and tablets keep the premium look. */
.hero-visual {
  isolation: isolate;
}

.hero-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 12% 0 -1.5rem 8%;
  background: url("../images/hero/hero-panel.jpg") left top / cover no-repeat;
}

@media (min-width: 992px) {
  .hero-visual::before {
    display: none;
  }
}

/* Tilted feature pills pinned over the photo; they scale with the
   viewport (13px on phones up to 16px on desktop). */
.hero-badge {
  position: absolute;
  padding: 0.5em 1em;
  font-size: clamp(0.8125rem, 0.55rem + 0.6vw, 1rem);
}

.hero-badge:nth-child(1) {
  top: 32%;
  right: 2%;
  transform: rotate(-35deg);
}

.hero-badge:nth-child(2) {
  top: 83%;
  right: 0;
  transform: rotate(-7.5deg);
}

.hero-badge:nth-child(3) {
  top: 87%;
  left: 42%;
  transform: rotate(-17.5deg);
}

.hero-tour {
  flex: 1 1 13.75rem;
  height: 10rem;
}

.hero-stats {
  flex: 4 1 22rem;
}

/*------------------------------------
  About Section
------------------------------------*/

.about {
  isolation: isolate;
  background-image:
    radial-gradient(
      circle at 50% calc(100% + 98px),
      rgba(255, 255, 255, 0.3) 411px,
      rgba(255, 255, 255, 0.47) 411px 413px,
      rgba(255, 255, 255, 0.2) 413px 504px,
      rgba(255, 255, 255, 0.47) 504px 506px,
      rgba(255, 255, 255, 0.1) 506px 581px,
      rgba(255, 255, 255, 0.47) 581px 583px,
      transparent 583px
    ),
    radial-gradient(
      circle at 50% calc(100% + 98px),
      var(--bs-primary) 192px,
      rgba(206, 239, 116, 0) 960px
    );
}

.about::before,
.about::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 24rem;
  height: 23rem;
  background: url("../images/about/stethoscope.webp") center / contain no-repeat;
  opacity: 0.1;
  pointer-events: none;
}

.about::before {
  top: 9.5rem;
  left: -3rem;
  transform: rotate(-7deg);
}

.about::after {
  top: 1rem;
  right: -14rem;
  transform: rotate(50deg);
}

.about-stats {
  max-width: 36rem;
}

/* Building sits behind the doctors, slightly narrower as in the design */
.about-building {
  width: 93%;
}

.ratio-3x1 {
  --bs-aspect-ratio: 33.333%;
}

.ratio-2x1 {
  --bs-aspect-ratio: 50%;
}

.ratio-3x2 {
  --bs-aspect-ratio: 66.667%;
}

/*------------------------------------
  Marquee sliders (client strip, testimonials, highlights)
------------------------------------*/
.client-slider .swiper-wrapper,
.testimonial-slider .swiper-wrapper,
.highlight-slider .swiper-wrapper {
  transition-timing-function: linear;
}

/*------------------------------------
  Testimonials Section
------------------------------------*/

.testimonial-slider .swiper-slide {
  width: min(25.8rem, calc(100vw - 3rem));
}

/*------------------------------------
  Features Section
------------------------------------*/
.feature-card {
  isolation: isolate;
  min-height: 29.75rem;
}

/* Oversized, faint copy of the card's icon behind the content */
.feature-card-decor {
  top: 3rem;
  right: -5rem;
  z-index: -1;
  width: 24rem;
  height: auto;
  opacity: 0.02;
  transform: rotate(-25deg);
  pointer-events: none;
}

.feature-card-media {
  min-width: 0;
  margin: 1rem -1.5rem -1.5rem auto;
}

/*------------------------------------
  How It Works Section
------------------------------------*/

.how-it-works {
  --bs-heading-color: var(--bs-white);
  color: rgba(var(--bs-white-rgb), 0.85);
  background-image:
    linear-gradient(
      rgba(var(--bs-secondary-rgb), 0.9),
      rgba(var(--bs-secondary-rgb), 0.9)
    ),
    url("../images/backgrounds/footer-bg.jpg");
  background-size: cover;
  background-position: center;
  background-blend-mode: normal, luminosity;
}

/* Lime promo banner carries the same faded photo over bg-primary. */
.how-it-works-promo {
  background-image:
    linear-gradient(
      rgba(var(--bs-primary-rgb), 0.9),
      rgba(var(--bs-primary-rgb), 0.9)
    ),
    url("../images/backgrounds/footer-bg.jpg");
  background-size: cover;
  background-position: center;
  background-blend-mode: normal, luminosity;
}

/*------------------------------------
  App Download Section
------------------------------------*/

.app-banner {
  min-height: 16rem;
  object-position: right center;
}

@media (min-width: 992px) {
  .app-banner {
    min-height: 0;
  }
}

/*------------------------------------
  Page Hero (inner-page title banner)
------------------------------------*/

.page-hero {
  isolation: isolate;
}

.page-hero::before,
.page-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.page-hero::before {
  inset: 0;
  opacity: 0.1;
  background: url("../images/backgrounds/molecule-pattern.png") center / 80%
    auto no-repeat;
}

.page-hero::after {
  top: 0;
  right: 0;
  bottom: 0;
  display: none;
  width: 10rem;
  background: url(../images/hero/hero-pattern.png) left center / auto 100%
    no-repeat;
  transform: scaleX(-1);
  mix-blend-mode: luminosity;
  opacity: 0.5;
}

@media (min-width: 992px) {
  .page-hero {
    background-image:
      linear-gradient(
        rgba(var(--bs-light-rgb), 0.5),
        rgba(var(--bs-light-rgb), 0.5)
      ),
      url("../images/hero/hero-pattern.png");
    background-position: left center;
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-blend-mode: normal, luminosity;
  }

  .page-hero::after {
    display: block;
  }
}

/*------------------------------------
  Why Choose Us Section
------------------------------------*/

@media (min-width: 992px) {
  .row-bleed-end {
    margin-right: calc(50% - 50vw - var(--bs-border-radius-xxl));
  }
}

/*------------------------------------
  Layout helpers
------------------------------------*/

.min-w-0 {
  min-width: 0 !important;
}

/* Grid items default to min-width:auto, so a card with nowrap/truncated
   text inside a .d-grid list would widen the list past its column instead
   of truncating. Let grid children shrink to their track. */
.d-grid > * {
  min-width: 0;
}

/* Small phones (320-359px): the three-up stat tiles and the photo-collage
   badge are a few pixels too wide for their slots. */
@media (max-width: 359.98px) {
  .about-stats .fw-semibold,
  .branch-stats .fw-semibold {
    font-size: 0.875rem;
  }

  .photo-collage-badge {
    left: auto;
    right: 0.5rem;
  }
}

.overflow-x-clip {
  overflow-x: clip !important;
}

/* Bootstrap's row-cols stop at 6; eight equal columns for the widest
   container (specialty tiles), written the way Bootstrap writes its own. */
@media (min-width: 1400px) {
  .row-cols-xxl-8 > * {
    flex: 0 0 auto;
    width: 12.5%;
  }
}

/*------------------------------------
  Stepper (multi-step flows: booking, checkout)
------------------------------------*/

.stepper-scroll {
  overflow-x: auto;
  scrollbar-width: none;
}

.stepper-scroll::-webkit-scrollbar {
  display: none;
}

.stepper {
  --bs-nav-link-padding-x: 0;
  --bs-nav-link-padding-y: 0;
  --bs-nav-link-font-size: 0.9375rem;
  --bs-nav-link-font-weight: 500;
  --bs-nav-link-color: var(--bs-secondary-color);
  --bs-nav-link-hover-color: var(--bs-secondary);
  width: max-content;
  margin-inline: auto;
  flex-wrap: nowrap;
  gap: 1rem;
}

.stepper .nav-item {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 1rem;
}

/* Connector line in front of every step but the first */
.stepper .nav-item + .nav-item::before {
  content: "";
  width: 2.5rem;
  border-top: 2px solid var(--bs-border-color);
}

.stepper-step {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
}

.stepper-step.active,
.stepper-step.is-complete {
  color: var(--bs-secondary);
  font-weight: 600;
}

.stepper-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--bs-secondary-color);
  background-color: var(--bs-light);
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: 50%;
}

.stepper-num .lucide {
  display: none;
  width: 1rem;
  height: 1rem;
}

.stepper-step.active .stepper-num {
  color: var(--bs-secondary);
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.stepper-step.is-complete .stepper-num {
  color: var(--bs-white);
  background-color: var(--bs-secondary);
  border-color: var(--bs-secondary);
}

.stepper-step.is-complete .stepper-index {
  display: none;
}

.stepper-step.is-complete .stepper-num .lucide {
  display: block;
}

.stepper-progress span {
  flex: 1 1 0;
  height: 0.25rem;
  background-color: var(--bs-border-color);
  border-radius: var(--bs-border-radius-pill);
  transition: background-color 0.2s ease;
}

.stepper-progress span.is-done {
  background-color: var(--bs-primary);
}

/*------------------------------------
  Option Cards (selectable radio / checkbox cards)
------------------------------------*/

.option-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem;
  color: var(--bs-body-color);
  background-color: var(--bs-white);
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-xl);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.option-card-stack {
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 1rem 0.5rem;
  text-align: center;
}

.option-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.option-card-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: var(--bs-white);
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: 50%;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.option-card-check .lucide {
  width: 0.75rem;
  height: 0.75rem;
  opacity: 0;
}

.option-card:hover {
  border-color: var(--bs-primary);
}

.btn-check:focus-visible + .option-card {
  box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.btn-check:checked + .option-card {
  background-color: rgba(var(--bs-primary-rgb), 0.08);
  border-color: var(--bs-primary);
  box-shadow: inset 0 0 0 1px var(--bs-primary);
}

.btn-check:checked + .option-card-stack {
  color: var(--bs-secondary);
}

.btn-check:checked:focus-visible + .option-card {
  box-shadow:
    inset 0 0 0 1px var(--bs-primary),
    0 0 0 0.25rem var(--bs-focus-ring-color);
}

.btn-check:checked + .option-card .option-card-check {
  background-color: var(--bs-secondary);
  border-color: var(--bs-secondary);
}

.btn-check:checked + .option-card .option-card-check .lucide {
  opacity: 1;
}

.btn-check:checked + .option-card .icon-box-light {
  background-color: var(--bs-primary);
}

.btn-check:disabled + .option-card {
  color: var(--bs-secondary-color);
  background-color: var(--bs-secondary-bg);
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Tighter cards on phones and tablets, matching the compact mobile layout */
@media (max-width: 991.98px) {
  .option-card {
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .option-card-stack {
    padding: 0.875rem 0.5rem;
  }
}

/* Phones: the price drops under the text so the title keeps its width;
   the icon (shrunk to the small size) and the check span both rows. */
@media (max-width: 575.98px) {
  .option-card:not(.option-card-stack) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 0.75rem;
    row-gap: 0.25rem;
  }

  .option-card:not(.option-card-stack) > .icon-box {
    grid-row: 1 / span 2;
    width: 2.75rem;
    height: 2.75rem;
    align-self: start;
  }

  .option-card-price {
    grid-column: 2;
  }

  .option-card:not(.option-card-stack) > .option-card-check {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

/* Visit-type variant */
.option-card.option-card-type {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas:
    "icon title price check"
    "icon desc price check"
    "icon meta price check";
  row-gap: 0.25rem;
  align-items: center;
}

.option-card.option-card-type > .icon-box {
  grid-area: icon;
}

.option-card-title {
  grid-area: title;
  font-size: 1.125rem;
}

.option-card.option-card-type > .option-card-price {
  grid-area: price;
}

.option-card-desc {
  grid-area: desc;
}

.option-card-meta {
  grid-area: meta;
  max-width: 100%;
  justify-self: start;
  text-align: left;
  white-space: normal;
}

.option-card-meta .lucide {
  width: 0.75rem;
  height: 0.75rem;
}

.option-card.option-card-type > .option-card-check {
  grid-area: check;
}

@media (max-width: 991.98px) {
  .option-card.option-card-type {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "icon title price"
      "desc desc desc"
      "meta meta check";
    row-gap: 0.625rem;
  }

  .option-card.option-card-type > .icon-box {
    width: 2.25rem;
    height: 2.25rem;
    align-self: center;
  }

  /* The price column is wider than the check, so push the check to its
     right edge */
  .option-card.option-card-type > .option-card-check {
    justify-self: end;
  }

  .option-card-title {
    font-size: 1rem;
  }

  .option-card-desc {
    font-size: 0.875rem;
  }
}

/* Stacked cards get a short lime bar under the content when selected, so
   the active date or payment method reads at a glance even in a strip. */
.option-card-stack::after {
  content: "";
  width: 1.5rem;
  height: 0.1875rem;
  margin-top: 0.25rem;
  background-color: transparent;
  border-radius: var(--bs-border-radius-pill);
  transition: background-color 0.2s ease;
}

.btn-check:checked + .option-card-stack::after {
  background-color: var(--bs-primary);
}

/*------------------------------------
  Dropdown Select (custom select on the Bootstrap dropdown)
------------------------------------*/

.dropdown-select .form-select {
  position: relative;
  cursor: pointer;
  background-image: none;
}

.dropdown-select .form-select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 16px;
  height: 12px;
  margin-top: -6px;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")
    center / 16px 12px no-repeat;
  transition: transform 0.2s ease;
}

.dropdown-select .form-select.show {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.dropdown-select .form-select.show::after {
  transform: rotate(180deg);
}

/* Menu: kept as a block (invisible, non-interactive) so it can fade and
   slide both open and closed; Bootstrap's .show reveals it. The slide uses
   the standalone `translate` property rather than transform, because Popper
   positions the menu with transform and animating that made the menu jump
   into place at the end of the animation. */
.dropdown-select .dropdown-menu {
  --bs-dropdown-padding-x: 0.5rem;
  --bs-dropdown-item-padding-x: 1rem;
  --bs-dropdown-item-padding-y: 0.625rem;
  --bs-dropdown-item-border-radius: var(--bs-border-radius);
  --bs-dropdown-link-active-color: var(--bs-secondary);
  --bs-dropdown-link-active-bg: var(--bs-primary);
  display: block;
  min-width: 100%; /* never wider than its button: Bootstrap's 10rem floor
                      would push a short select at the container's right
                      edge into sideways overflow (blog sort) */
  max-height: 18rem;
  overflow-y: auto;
  margin-top: 0.375rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  translate: 0 -0.375rem;
  transition:
    opacity 0.18s ease,
    translate 0.18s ease,
    visibility 0.18s;
}

.dropdown-select .dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  translate: 0 0;
}

.dropdown-select .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.dropdown-select .dropdown-item + .dropdown-item,
.dropdown-select li + li .dropdown-item {
  margin-top: 0.125rem;
}

/* Tick at the end of the active (lime) row, drawn the way Bootstrap draws
   .form-select's chevron so dark option icons stay visible on it */
.dropdown-select .dropdown-item.active::after {
  content: "";
  width: 1rem;
  height: 1rem;
  margin-left: auto;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d2f21' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M20 6 9 17l-5-5'/%3e%3c/svg%3e")
    center / contain no-repeat;
}

/*------------------------------------
  Page Tabs (doctor profile sections)
------------------------------------*/

.page-tabs {
  --bs-nav-link-padding-x: 1.5rem;
  --bs-nav-link-padding-y: 1rem;
  --bs-nav-link-font-size: 1.25rem;
  --bs-nav-link-font-weight: 700;
  --bs-nav-link-color: var(--bs-body-color);
  --bs-nav-link-hover-color: var(--bs-secondary);
  --bs-nav-pills-link-active-color: var(--bs-body-color);
  --bs-nav-pills-link-active-bg: var(--bs-light);
  --bs-nav-pills-border-radius: var(--bs-border-radius-pill);
  flex-wrap: nowrap;
  gap: 0.625rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.page-tabs::-webkit-scrollbar {
  display: none;
}

/* Sticky bar */
.sticky-bar {
  position: sticky;
  top: var(--site-header-height, 0px);
  z-index: 1020;
}

/* Sticky aside */
@media (min-width: 992px) {
  .sticky-aside {
    position: sticky;
    top: calc(
      var(--site-header-height, 0px) + var(--sticky-bar-height, 0px) + 1.5rem
    );
  }

  /* Sticky column that can be taller than the viewport (policy pages: table
     of contents plus contact card). Cap it at the visible height and let it
     scroll inside itself so the bottom card stays reachable on short laptop
     screens. The padding/negative margin keeps card shadows from clipping. */
  .sticky-aside-fit {
    max-height: calc(
      100vh - var(--site-header-height, 0px) - var(--sticky-bar-height, 0px) -
        3rem
    );
    margin: -0.5rem;
    padding: 0.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
}

.page-tabs .nav-link {
  white-space: nowrap;
  background-color: rgba(var(--bs-white-rgb), 0.2);
  border: var(--bs-border-width) solid var(--bs-white);
}

.page-tabs .nav-link:hover,
.page-tabs .nav-link:focus-visible,
.page-tabs .nav-link.active {
  border-color: var(--bs-primary);
}

/*------------------------------------
  Timeline (education, career history)
------------------------------------*/
/* Vertical list with a lime dot beside each entry and a lime connector
   down to the next one; the last entry ends at its dot. Reusable on any
   list: add .timeline to the list and .timeline-item to each item. */
.timeline {
  --timeline-dot: 0.875rem;
}

.timeline-item {
  position: relative;
  padding-left: 2.5rem;
}

.timeline-item:not(:last-child) {
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: 0;
  width: var(--timeline-dot);
  height: var(--timeline-dot);
  border: 2px solid var(--bs-secondary);
  border-radius: 50%;
  background-color: var(--bs-primary);
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(0.4rem + var(--timeline-dot) + 0.25rem);
  bottom: 0.25rem;
  left: calc(var(--timeline-dot) / 2 - 1px);
  width: 2px;
  background-color: var(--bs-primary);
}

/*------------------------------------
  Fee Table (price lists)
------------------------------------*/
/* Bootstrap's striped table re-skinned through its own variables: roomy
   24px cells, theme border colour, the off-white stripe from the tokens
   and cells vertically centred so the price sits beside the copy. The
   backgrounds are swapped so the first row is white (Bootstrap stripes
   odd rows; the design stripes even ones). */
.fee-table {
  --bs-table-bg: var(--bs-secondary-bg);
  --bs-table-striped-bg: var(--bs-white);
  --bs-table-border-color: var(--bs-border-color);
  --bs-table-color: var(--bs-body-color);
  --bs-table-striped-color: var(--bs-body-color);
}

.fee-table > :not(caption) > * > * {
  padding: 1.5rem;
  vertical-align: middle;
}

.fee-table tbody tr:last-child > * {
  border-bottom: 0;
}

/* Phones: the two-column layout crushes the description against the nowrap
   price. Stack each row so the service (title + description) sits above its
   fee, trim the padding, and left-align the price under the description. */
@media (max-width: 575.98px) {
  .fee-table > :not(caption) > * > * {
    padding: 1.25rem;
  }

  .fee-table tbody tr,
  .fee-table tbody th,
  .fee-table tbody td {
    display: block;
  }

  .fee-table tbody th[scope="row"] {
    padding-bottom: 0.5rem;
    border-bottom: 0;
  }

  .fee-table tbody td {
    padding-top: 0;
    text-align: left !important;
  }
}

/*------------------------------------
  Schedule Table (weekly availability)
------------------------------------*/

.schedule-table {
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--bs-border-color);
  border-collapse: separate;
  border-spacing: 0 1rem;
  margin-top: -1rem;
}

.schedule-table > :not(caption) > * > * {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border: 0;
}

.schedule-table tbody tr > * {
  padding-block: 1.5rem;
  background-color: var(--bs-white);
  border-top: var(--bs-border-width) solid var(--bs-table-border-color);
  border-bottom: var(--bs-border-width) solid var(--bs-table-border-color);
  transition: background-color 0.2s ease;
}

.schedule-table tbody tr:hover > * {
  background-color: var(--bs-tertiary-bg);
}

@media (min-width: 992px) {
  .schedule-table thead th:first-child,
  .schedule-table tbody th {
    width: 15rem;
  }

  .schedule-table tbody tr > :first-child {
    padding-left: 1.5rem;
    border-left: var(--bs-border-width) solid var(--bs-table-border-color);
    border-radius: var(--bs-border-radius-lg) 0 0 var(--bs-border-radius-lg);
  }

  .schedule-table tbody tr > :last-child {
    padding-right: 1.5rem;
    border-right: var(--bs-border-width) solid var(--bs-table-border-color);
    border-radius: 0 var(--bs-border-radius-lg) var(--bs-border-radius-lg) 0;
  }
}

@media (max-width: 991.98px) {
  .schedule-table,
  .schedule-table tbody,
  .schedule-table tbody th,
  .schedule-table tbody td {
    display: block;
  }

  .schedule-table thead {
    display: none;
  }

  .schedule-table tbody tr {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem 0.5rem;
    margin-bottom: 1rem;
    padding: 1.25rem 1.5rem 1.5rem;
    background-color: var(--bs-white);
    border: var(--bs-border-width) solid var(--bs-table-border-color);
    border-radius: var(--bs-border-radius-lg);
    box-shadow: var(--bs-box-shadow-sm);
  }

  .schedule-table tbody tr > * {
    padding: 0;
    border: 0;
  }

  .schedule-table tbody th {
    grid-column: 1 / -1;
    padding-bottom: 0.75rem;
    border-bottom: var(--bs-border-width) solid var(--bs-table-border-color);
  }

  .schedule-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
  }
}

@media (max-width: 575.98px) {
  .schedule-table tbody tr {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .schedule-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 0.625rem;
    border-bottom: var(--bs-border-width) solid var(--bs-table-border-color);
  }

  .schedule-table tbody td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .schedule-table tbody td::before {
    margin-bottom: 0;
  }
}

/* Accent surface (pale lime) from the token; pairs with bg-primary CTAs. */
.bg-accent {
  background-color: var(--color-accent);
}

/*------------------------------------
  Article (blog detail, long-form copy)
------------------------------------*/

.prose {
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose > p,
.prose > ul,
.prose > ol,
.prose > figure,
.prose > .card {
  margin-bottom: 1.5rem;
}

.prose > h2 {
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 1.25rem + 0.75vw, 1.875rem);
}

.prose > h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose > figure {
  margin-top: 2rem;
}

.article-cover {
  width: 100%;
  height: auto;
  max-height: 27.5rem;
  object-fit: cover;
}

.toc-nav {
  --bs-nav-link-padding-x: 1rem;
  --bs-nav-link-padding-y: 0.5rem;
  --bs-nav-link-font-size: 0.9375rem;
  --bs-nav-link-font-weight: 500;
  --bs-nav-link-color: var(--bs-secondary-color);
  --bs-nav-link-hover-color: var(--bs-secondary);
}

.toc-nav .nav-link {
  border-left: 3px solid var(--bs-border-color);
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.toc-nav .nav-link:hover,
.toc-nav .nav-link:focus-visible,
.toc-nav .nav-link.active {
  border-color: var(--bs-primary);
}

.toc-nav .nav-link.active {
  font-weight: 700;
  color: var(--bs-secondary);
  background-color: var(--bs-light);
}

/* Policy tables (privacy, terms, legal notice): a normal three-column table
   from sm up. Below that the columns have no room, so each row stacks into a
   labelled block; the label comes from the cell's data-label attribute and
   the column headers stay in the DOM for screen readers. */
@media (min-width: 576px) {
  .table-policy th[scope="row"] {
    white-space: nowrap;
  }
}

@media (max-width: 575.98px) {
  .table-policy thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .table-policy,
  .table-policy tbody,
  .table-policy tr,
  .table-policy th,
  .table-policy td {
    display: block;
    width: 100%;
  }

  .table-policy tr {
    padding: 1rem;
    border-bottom: var(--bs-border-width) solid var(--bs-border-color);
  }

  .table-policy tr:last-child {
    border-bottom: 0;
  }

  .table-policy tbody th,
  .table-policy tbody td {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .table-policy tbody th {
    margin-bottom: 0.5rem;
    font-size: 1rem;
  }

  .table-policy tbody td + td {
    margin-top: 0.625rem;
  }

  .table-policy tbody td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.125rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
  }
}

/*------------------------------------
  Search Bar (doctors listing)
------------------------------------*/

.search-bar .form-control {
  padding: 1.25rem 4.75rem 1.25rem 5.25rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.search-bar .form-control::placeholder {
  color: rgba(var(--bs-secondary-rgb), 0.5);
}

/*------------------------------------
  Branches Section / corner sketch
------------------------------------*/
.branches,
.sketch-corner {
  isolation: isolate;
}

.branches::before,
.sketch-corner::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -3rem;
  left: -6rem;
  width: 24rem;
  height: 23rem;
  background: url("../images/about/stethoscope.webp") center / contain no-repeat;
  opacity: 0.08;
  transform: rotate(-25deg);
  pointer-events: none;
}

.page-hero.dr-details::before {
  opacity: 0;
}

/*------------------------------------
  Photo Collage (service intro, feature banners)
------------------------------------*/
.photo-collage {
  position: relative;
  aspect-ratio: 680 / 520;
}

.photo-collage-main,
.photo-collage-inset {
  position: absolute;
  object-fit: cover;
}

.photo-collage-main {
  top: 0;
  left: 0;
  width: 61.8%;
  height: 92.3%;
}

.photo-collage-inset {
  top: 12.1%;
  left: 50%;
  width: 42.2%;
  height: 72.7%;
  object-position: top;
}

.photo-collage-badge {
  position: absolute;
  top: 73%;
  left: 35.3%;
  white-space: nowrap;
}

/*------------------------------------
  Account Nav (dashboard / profile sidebar)
------------------------------------*/
.account-nav {
  --bs-nav-link-padding-x: 0.75rem;
  --bs-nav-link-padding-y: 0.75rem;
  --bs-nav-link-color: var(--bs-secondary-color);
  --bs-nav-link-hover-color: var(--bs-secondary);
  --bs-nav-pills-link-active-color: var(--bs-emphasis-color);
  --bs-nav-pills-link-active-bg: var(--bs-primary);
  --bs-nav-pills-border-radius: var(--bs-border-radius);
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.account-nav::-webkit-scrollbar {
  display: none;
}

.account-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  white-space: nowrap;
  border: var(--bs-border-width) solid var(--bs-border-color);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.account-nav .nav-link:hover,
.account-nav .nav-link:focus-visible {
  background-color: var(--bs-light);
  border-color: var(--bs-primary);
}

.account-nav .nav-link.active {
  font-weight: 600;
  border-color: var(--bs-primary);
}

/* The account sidebar only becomes a side column from xl. Between 992 and
   1199px a 4-column sidebar left ~615px for six-column data tables, which
   crushed their text columns and pushed the action column off-screen, so
   the nav stays a horizontal strip above full-width content there. */
@media (min-width: 1200px) {
  .account-nav {
    flex-direction: column;
    overflow: visible;
  }
}

/* Sticky variant for that sidebar: only sticks once it is a side column. */
@media (min-width: 1200px) {
  .sticky-aside-xl {
    position: sticky;
    top: calc(
      var(--site-header-height, 0px) + var(--sticky-bar-height, 0px) + 1.5rem
    );
  }
}

/* Data tables: keep columns at a readable width and let the wrapper scroll
   sideways instead of crushing cells to one word per line. Widths scale
   with the column count (5, 6 and 7+ columns). Browsers without :has()
   simply keep Bootstrap's default behaviour. */
.table-responsive > .table:has(> thead th:nth-child(5)) {
  min-width: 44rem;
}

.table-responsive > .table:has(> thead th:nth-child(6)) {
  min-width: 54rem;
}

.table-responsive > .table:has(> thead th:nth-child(7)) {
  min-width: 58rem;
}

/* Sideways-scroll cue: script.js adds .has-overflow-end to a
   .table-responsive or .account-nav strip whose content continues past its
   right edge, and removes it once scrolled to the end. */
.table-responsive.has-overflow-end,
.account-nav.has-overflow-end {
  -webkit-mask-image: linear-gradient(
    to right,
    #000 calc(100% - 3rem),
    rgba(0, 0, 0, 0.15)
  );
  mask-image: linear-gradient(
    to right,
    #000 calc(100% - 3rem),
    rgba(0, 0, 0, 0.15)
  );
}

/*------------------------------------
  Segmented control (Patient / Doctor switch)
------------------------------------*/
.segmented {
  display: flex;
  padding: 0.375rem;
  background-color: var(--bs-tertiary-bg);
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-pill);
}

/* Never let a long segment set push into the neighbouring column: scroll the
   track instead (matters at phone widths and in narrow filter columns). */
.segmented {
  overflow-x: auto;
  scrollbar-width: thin;
}

.btn-segment {
  --bs-btn-padding-y: 0.75rem;
  --bs-btn-font-size: 1rem;
  --bs-btn-color: var(--bs-emphasis-color);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--bs-secondary);
  --bs-btn-hover-bg: rgba(var(--bs-secondary-rgb), 0.06);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--bs-white);
  --bs-btn-active-bg: var(--bs-secondary);
  --bs-btn-active-border-color: var(--bs-secondary);
  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
  flex: 1 1 0;
}

/* Phones: three segments ("Upcoming / Completed / Cancelled") must fit a
   351px track, so trim the button padding and type a step. */
@media (max-width: 575.98px) {
  .btn-segment {
    --bs-btn-padding-x: 0.5rem;
    --bs-btn-font-size: 0.9375rem;
  }
}

/*------------------------------------
  Auth screens (login, register, forgot password)
------------------------------------*/

.auth-form {
  max-width: 32.5rem;
}

.auth-promo-stage {
  min-height: 20rem;
  isolation: isolate;
}

.auth-promo-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse 70% 100% at calc(50% - 26px) 100%,
    var(--bs-primary) 20%,
    rgba(var(--bs-primary-rgb), 0) 100%
  );
}

.auth-promo-photo {
  position: absolute;
  bottom: 0;
  left: 50%;
  height: 80%;
  max-height: 28.875rem;
  max-width: 90%;
  aspect-ratio: 651 / 462;
  object-fit: cover;
  object-position: center bottom;
  transform: translateX(-50%);
}

@media (min-width: 992px) {
  .auth-promo {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
  }
}

/*------------------------------------
  Chat (messaging screen)
------------------------------------*/

.chat-pane {
  display: flex;
  flex-direction: column;
}

.chat-window {
  height: min(51.25rem, calc(100vh - var(--site-header-height, 0px) - 4.5rem));
  height: min(51.25rem, calc(100dvh - var(--site-header-height, 0px) - 4.5rem));
  min-height: 26rem;
}

.chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-drawer {
  --bs-offcanvas-width: min(24rem, calc(100vw - 3rem));
}

@media (min-width: 992px) {
  .chat-pane {
    height: min(
      51.25rem,
      calc(100vh - var(--site-header-height, 0px) - 4.5rem)
    );
    height: min(
      51.25rem,
      calc(100dvh - var(--site-header-height, 0px) - 4.5rem)
    );
    min-height: 26rem;
  }
}

.chat-thread {
  border: var(--bs-border-width) solid transparent;
}

.chat-bubble {
  max-width: 30rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  border-radius: var(--bs-border-radius-lg);
  border-end-start-radius: 0.25rem;
}

.chat-bubble-out {
  border-end-start-radius: var(--bs-border-radius-lg);
  border-end-end-radius: 0.25rem;
}

/*------------------------------------
  Call screens (voice and video call modals)
------------------------------------*/
.call-ring {
  position: relative;
  display: inline-flex;
}

.call-ring::before,
.call-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--bs-primary);
  border-radius: 50%;
  animation: call-ring 2.4s ease-out infinite;
}

.call-ring::after {
  animation-delay: 1.2s;
}

@keyframes call-ring {
  from {
    transform: scale(1);
    opacity: 0.8;
  }

  to {
    transform: scale(1.6);
    opacity: 0;
  }
}

.call-stage {
  position: relative;
  height: 100%;
  min-height: 24rem;
  background-color: var(--bs-dark);
}

@media (min-width: 768px) {
  .call-stage {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* height: auto overrides the img's height attribute so aspect-ratio wins */
.call-self {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: clamp(5rem, 20%, 10rem);
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

@media (min-width: 768px) {
  .call-self {
    right: 1.5rem;
    bottom: 1.5rem;
  }
}

.call-live {
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--bs-danger);
  border-radius: 50%;
  animation: call-live 1.2s ease-in-out infinite;
}

@keyframes call-live {
  50% {
    opacity: 0.3;
  }
}

/*------------------------------------
  Trending list (blog): compact numbered thumbnail rows
------------------------------------*/

/* Phones: the rank number and the 96px thumbnail together leave the title too
   little room, breaking words mid-way on the narrowest screens. Trim both so
   the title keeps a readable column while the row stays on one line. */
@media (max-width: 575.98px) {
  .trending-list .trending-rank {
    font-size: 1.375rem;
  }

  .trending-list .card-lift-media,
  .trending-list .card-lift-media > img {
    width: 4.5rem;
    height: 4.5rem;
  }
}

@media (max-width: 359.98px) {
  .trending-list .card-lift-media,
  .trending-list .card-lift-media > img {
    width: 4rem;
    height: 4rem;
  }
}

@media (max-width: 426px) {
  .border-strats-mo {
    border: none !important;
    padding-left: 0 !important;
  }
}

@media (max-width: 374.98px) {
  .site-header .navbar-brand img {
    max-width: 140px;
  }
}
