/* ========= Tokens ========= */
:root {
  --brand-700: var(--mc-blue-700, #004F83);   /* darker blue */
  --brand-600: var(--mc-blue-600, #0065A4);   /* hero left panel */
  --hero-height: 500px;
  --hero-img-pos: 70% center;                 /* focal point for bg image */
  /* fallback if Bootstrap’s --bs-primary-bg-subtle isn’t present */
  --btn-subtle: var(--bs-primary-bg-subtle, color-mix(in oklab, #ffffff 86%, var(--brand-600) 14%));
}

/* ========= HERO (container-aligned) ========= */
.mc-hero {
  position: relative;
  background: var(--brand-600);
  color: #fff;
  overflow: hidden;
}

.mc-hero h1,
.mc-hero p {
  color: #fff;
}

.mc-hero p {
  font-size: 1.25rem;
  line-height: 1.6;
}

.mc-hero .container {
  position: relative;
  z-index: 2;
  padding-top: 3rem;
  padding-bottom: 3rem;
  display: grid;
  grid-template-columns: 1fr; /* mobile default */
  align-items: center;
  column-gap: 2rem;
}

/* ===== Breadcrumbs (desktop: pinned to top of left column) ===== */
.mc-crumbs {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9375rem;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 1rem;
}

.mc-crumbs a {
  color: #fff;
  text-decoration: none;
}

.mc-crumbs a:hover {
  text-decoration: underline;
}

.mc-crumbs .sep {
  opacity: .7;
  padding: 0 .25rem;
}

.mc-crumbs .home-ico {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -3px;
}

/* desktop vs mobile breadcrumb variants */
.mc-crumbs-mobile {
  display: none;
}

/* CTA row spacing */
.mc-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 1.25rem;
}

/* ===== Desktop (≥992px): 50/50 split; image via ::after ===== */
@media (min-width: 992px) {
  .mc-hero {
    min-height: var(--hero-height);
  }

  .mc-hero::after {
    content: "";
    position: absolute;
    inset: 0 0 0 auto;     /* stick to right */
    width: 50%;
    /* Fallback color only */
    background-color: #003a5c;
    /* Image comes from per-page CSS var */
    background-image: var(--hero-bg);
    background-repeat: no-repeat;
    background-position: var(--hero-img-pos);
    background-size: cover;
    z-index: 1;
  }

  .mc-hero .container {
    min-height: var(--hero-height);
    grid-template-columns: 1fr 1fr;    /* left | right spacer */
  }

  /* Left side becomes a two-row grid: crumbs on top, copy centered below */
  .mc-left {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: var(--hero-height);
  }

  .mc-hero-copy {
    align-self: center;                /* vertical center under the crumbs */
    max-width: 42rem;
  }

  .mc-hero-img-holder {
    display: block;                    /* reserves right half */
  }

  /* Hide mobile-only pieces on desktop */
  .mc-mobile-stage,
  .mc-mobile-banner {
    display: none !important;
  }
}

/* ===== Mobile/Tablet (≤991.98px): full-bleed image then banner ===== */
@media (max-width: 991.98px) {
  .mc-hero {
    background: none;
  }

  .mc-hero .container {
    padding: 0;
  }

  .mc-hero-copy {
    display: none;       /* desktop copy hidden on mobile */
  }

  .mc-left {
    display: block;      /* allow crumbs to flow normally if kept */
  }

  /* swap breadcrumb variants */
  .mc-crumbs-desktop {
    display: none;
  }

  .mc-crumbs-mobile {
    display: flex;
  }

  .mc-mobile-stage,
  .mc-mobile-banner {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    max-width: none;
  }

  @supports (width: 100dvw) {
    .mc-mobile-stage,
    .mc-mobile-banner {
      width: 100dvw;
    }
  }

  .mc-mobile-stage {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
  }

  .mc-mobile-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--hero-img-pos);
  }

  .mc-mobile-banner {
    background: var(--brand-600);
    color: #fff;
    padding: 1.5rem 1rem 2rem;
  }

  .mc-mobile-banner .mc-copy {
    max-width: 42rem;
    margin: 0 auto;
  }
}

/* ========= Hero CTAs (white pill, blue text + subtle hover) ========= */
.mc-hero .btn.btn-outline-primary.btn-pill {
  background: #fff;                              /* solid white */
  color: var(--brand-600) !important;            /* blue text */
  border: 1px solid var(--brand-600) !important;
  border-radius: 999px !important;
  padding: .6rem 1rem !important;                /* per your spec */
  font-weight: 700 !important;
  line-height: 1;
  text-decoration: none;
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease,
    transform .02s ease;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}

.mc-hero .btn.btn-outline-primary.btn-pill:hover,
.mc-hero .btn.btn-outline-primary.btn-pill:focus {
  background: #015c8f;
  color: #ffffff !important;
  border-color: var(--brand-700) !important;
}

.mc-hero .btn.btn-outline-primary.btn-pill:focus-visible {
  outline: 3px solid rgba(0, 79, 131, .35);         /* brand-700 focus ring */
  outline-offset: 2px;
}

.mc-hero .btn.btn-outline-primary.btn-pill:active {
  transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
  .mc-hero .btn.btn-outline-primary.btn-pill {
    transition: none;
  }
}

/* ========= Service Page Zip Code CTA ========= */
#find-provider.card.form-card {
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
}

#find-provider .card-body.form-card {
  padding: 16px 0 !important;
}

#find-provider .nav-primary {
  display: flex;
  justify-content: space-between;
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
}

#find-provider .nav-primary .nav-item {
  flex: 1;
  text-align: center;
}

#find-provider .nav-primary .nav-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border-radius: 0 !important;
  color: #64748b !important;
  font-weight: 600;
  padding: 14px 10px;
  margin-bottom: -1px;
  border-bottom: 3px solid transparent;
  box-shadow: none !important;
  transition: color .15s ease, border-color .15s ease;
}

#find-provider .nav-primary .nav-link:hover,
#find-provider .nav-primary .nav-link:focus {
  color: #00446a !important;
  border-bottom-color: rgba(0, 68, 106, .25);
}

#find-provider .nav-primary .nav-link.active {
  color: #1e9fda !important;
  background: transparent !important;
  border-bottom-color: #1e9fda;
}

#find-provider .card-body.form-card > hr {
  display: none !important;
}

#find-provider .form-control,
#find-provider .form-select {
  border: 1px solid #e2e8f0;
  border-radius: .5rem;
}

#cpweb_GoogleMap_689 {
  height: 100% !important;
}

@media (max-width: 768px) {
  #cpweb_GoogleMap_689 {
    display: none !important;
  }
}

/* ========= Sleep Conditions list (specific instance) ========= */
#sleep-conditions .mc-cond-list {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
  row-gap: 1rem;
  column-gap: 1rem;
  grid-template-columns: 1fr;              /* 1 column by default (mobile / tablet) */
}

@media (min-width: 1024px) {
  #sleep-conditions .mc-cond-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 columns on desktop (unchanged) */
  }
}

#sleep-conditions .mc-cond-list li {
  display: list-item;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.4;
}

@media (min-width: 1024px) {
  #sleep-conditions .mc-cond-list li {
    font-size: 1.25rem;
    padding: .5rem 0;
  }
}

/* Non-link condition text (spans in the Conditions list) */
#sleep-conditions .cond-link {
  color: var(--cond-color, #0065A4);
  cursor: default;
}

/* Collapsed state: show only first 10 items */
#sleep-conditions .mc-cond-list:not(.is-expanded) li:nth-child(n+11) {
  display: none;
}

/* Controls visible on all breakpoints */
#sleep-conditions .mc-linklist-controls {
  display: block;
}

/* ========= Shared link-list pattern (Conditions + Treatments) ========= */
.mc-linklist {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
  row-gap: 1rem;
  column-gap: 1rem;
  grid-template-columns: 1fr;              /* 1 column by default (mobile / tablet) */
}

@media (min-width: 1024px) {
  .mc-linklist {
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 columns on desktop */
  }
}

.mc-linklist li {
  display: list-item;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.4;
}

@media (min-width: 1024px) {
  .mc-linklist li {
    font-size: 1.25rem;
    padding: .5rem 0;
  }
}

/* ===== Link styling rules ===== */
/* Non-link condition text (spans in the Conditions list) */
span.cond-link {
  color: #00446a !important;
  font-weight: bold;
  cursor: default;
  text-decoration: none;
}

/* Actual links (e.g., Treatments & Procedures or any mc-linklist links) */
a.cond-link,
a.mc-linklist-link {
  color: var(--cond-color, #0065A4) !important;
  cursor: pointer;
  text-decoration: underline !important;
}

a.cond-link:hover,
a.mc-linklist-link:hover {
  text-decoration: underline;
}

/* Collapsed state: show only first 10 items on any mc-linklist */
.mc-linklist:not(.is-expanded) li:nth-child(n+11) {
  display: none;
}

/* Controls visible on all breakpoints */
.mc-linklist-controls {
  display: block;
}

/* ========= Fix checkmark alignment in ZIP code search band ========= */
#find-care li.d-flex.flex-row.align-items-center {
  align-items: flex-start !important;
}

#find-care li.d-flex.flex-row.align-items-center > span:first-child svg {
  margin-top: 0.2rem; /* nudge icon down to match first line */
}
