/* ============================================================
   THE JOY IN LIVING — Component Library
   All reusable UI components
   ============================================================ */

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-soft);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1.4;
}

.btn-primary {
  background-color: var(--sage-dark);
  color: var(--white);
  border-color: var(--sage-dark);
}

.btn-primary:hover {
  background-color: var(--sage-deep);
  border-color: var(--sage-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--sage-dark);
  border-color: var(--sage-dark);
}

.btn-secondary:hover {
  background-color: var(--sage-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-accent {
  background-color: var(--terra);
  color: var(--white);
  border-color: var(--terra);
}

.btn-accent:hover {
  background-color: var(--terra-dark);
  border-color: var(--terra-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-white {
  background-color: var(--white);
  color: var(--sage-dark);
  border-color: var(--white);
}

.btn-white:hover {
  background-color: var(--cream);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
}

.btn-lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-base);
}

.btn-sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-xs);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

.btn svg, .btn .btn-arrow {
  transition: transform var(--duration-normal) var(--ease-soft);
}

.btn:hover svg, .btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ============================================================
   CRISIS BANNER
   ============================================================ */

.crisis-banner {
  background: linear-gradient(90deg, var(--sage-deep), var(--sage-dark));
  color: var(--white);
  padding: var(--space-2) var(--space-4);
  text-align: center;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  position: relative;
  z-index: var(--z-nav);
}

.crisis-banner a {
  color: var(--terra-light);
  text-decoration: underline;
  font-weight: 600;
}

.crisis-banner a:hover {
  color: var(--white);
}

.crisis-banner__close {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.7);
  font-size: var(--text-md);
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--space-1);
}

.crisis-banner__close:hover {
  color: var(--white);
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: var(--space-4) 0;
  transition: all var(--duration-slow) var(--ease-soft);
  background: transparent;
}

.nav.has-banner {
  top: 36px;
}

.nav.scrolled {
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3) 0;
}

.nav.scrolled .nav__logo-text {
  color: var(--charcoal);
}

.nav.scrolled .nav__link {
  color: var(--charcoal);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  z-index: calc(var(--z-nav) + 1);
}

.nav__logo-img {
  height: 100px;
  width: auto;
  transition: all var(--duration-normal) var(--ease-soft);
}

.nav.scrolled .nav__logo-img {
  height: 80px;
}

.footer .nav__logo-img {
  height: 85px;
}

/* Legacy SVG logo support — keep for backwards compat */
.nav__logo-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__logo-icon svg {
  width: 100%;
  height: 100%;
}

.nav__logo-text {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--white);
  transition: color var(--duration-normal) var(--ease-soft);
  line-height: 1.2;
}

.nav__logo-text span {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 400;
  margin-top: 2px;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Desktop nav — Logo left | Links CENTERED | EN/ES + CTA right */
@media (min-width: 769px) {
  .nav__toggle { display: none !important; }

  .nav__inner {
    display: flex !important;
    align-items: center;
    justify-content: flex-start; /* auto-margins handle centering */
    gap: var(--space-4);          /* space between logo, links, lang, cta */
  }

  /*
   * display:contents "unwraps" nav__menu so its children (links, dropdowns,
   * lang, cta) become direct flex items of nav__inner.
   * This lets us use margin-left:auto on the first link AND nav__lang to
   * split free space equally — centering the links between logo and actions.
   */
  .nav__menu {
    display: contents !important;
  }

  /* Auto-margin on first nav item pushes the link group away from the logo */
  .nav__menu > .nav__link:first-child,
  .nav__menu > .nav__dropdown:first-child {
    margin-left: auto;
  }

  /* Auto-margin on nav__lang pushes lang+CTA away from the links */
  /* Free space is now split: [logo][SPACE][links][SPACE][lang cta] */
  .nav__lang {
    margin-left: auto;
    margin-right: 0;
  }

  .nav__cta {
    margin-left: var(--space-3);
  }
}

.nav__link {
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: 400;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-soft);
  position: relative;
  white-space: nowrap;
}

.nav__link:hover {
  background: rgba(255,255,255,0.12);
}

.nav.scrolled .nav__link:hover {
  background: var(--sage-lighter);
  color: var(--sage-deep);
}

/* Dropdown */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav__dropdown-trigger svg {
  width: 12px;
  height: 12px;
  transition: transform var(--duration-fast) var(--ease-soft);
}

.nav__dropdown:hover .nav__dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal) var(--ease-soft);
  border: 1px solid var(--color-border-light);
}

.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown-item {
  display: block;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--charcoal);
  border-radius: var(--radius-md);
  transition: background var(--duration-fast) var(--ease-soft);
}

.nav__dropdown-item:hover {
  background: var(--sage-lighter);
  color: var(--sage-deep);
}

/* Language Switcher */
.nav__lang {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-full);
  padding: 2px;
  margin-left: var(--space-3);
}

.nav.scrolled .nav__lang {
  background: var(--cream-dark);
}

.nav__lang-btn {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  border-radius: var(--radius-full);
  color: rgba(255,255,255,0.95);
  transition: all var(--duration-fast) var(--ease-soft);
  cursor: pointer;
  border: none;
  background: none;
}

.nav.scrolled .nav__lang-btn {
  color: var(--stone);
}

.nav__lang-btn.active {
  background: var(--white);
  color: var(--sage-dark);
  box-shadow: var(--shadow-xs);
}

.nav.scrolled .nav__lang-btn.active {
  background: var(--white);
  color: var(--sage-dark);
}

/* CTA in Nav */
.nav__cta {
  margin-left: var(--space-4);
}

/* Mobile Toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: none;
  border: none;
  /* Must be above the overlay (z-overlay: 300) so iOS taps always register */
  z-index: 400;
  /* Prevent 300ms tap delay and blue flash on iOS */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--duration-normal) var(--ease-soft);
}

.nav__toggle span:nth-child(1) { margin-bottom: 6px; }
.nav__toggle span:nth-child(3) { margin-top: 6px; }

.nav.scrolled .nav__toggle span {
  background: var(--charcoal);
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile Navigation — phones only (iOS / Android ≤768px) */
@media (max-width: 768px) {
  .nav__toggle { display: flex; }

  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-24) var(--space-8) var(--space-8);
    transition: right var(--duration-slow) var(--ease-soft);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
    overscroll-behavior: contain;      /* stop scroll from leaking behind */
  }

  .nav__menu.open {
    right: 0;
  }

  .nav__link {
    color: var(--charcoal);
    font-size: var(--text-md);
    padding: var(--space-3) var(--space-4);
  }

  .nav__link:hover {
    background: var(--sage-lighter);
    color: var(--sage-deep);
  }

  .nav__dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    opacity: 1;
    visibility: visible;
    padding-left: var(--space-6);
    background: transparent;
    display: none;
  }

  .nav__dropdown.open .nav__dropdown-menu {
    display: block;
  }

  .nav__lang {
    margin: var(--space-4) 0;
    background: var(--cream-dark);
    align-self: flex-start;
  }

  .nav__lang-btn {
    color: var(--stone);
  }

  .nav__cta {
    margin: var(--space-4) 0 0 0;
    width: 100%;
  }

  .nav__cta .btn {
    width: 100%;
    justify-content: center;
  }

  /* Mobile overlay */
  .nav__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-soft);
    z-index: 300;
    /* Stay below the toggle so the X button is always tappable */
    pointer-events: none;
  }

  .nav__overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--sage-deep);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(61, 79, 61, 0.5) 0%,
    rgba(61, 79, 61, 0.3) 50%,
    rgba(61, 79, 61, 0.6) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: var(--space-32) var(--content-padding) var(--space-20);
}

.hero__label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--terra-light);
  margin-bottom: var(--space-6);
  opacity: 0;
  animation: heroFadeUp 0.8s var(--ease-soft) 0.3s forwards;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-6xl);
  color: var(--white);
  margin-bottom: var(--space-6);
  opacity: 0;
  animation: heroFadeUp 0.8s var(--ease-soft) 0.5s forwards;
}

@media (max-width: 768px) {
  .hero__title { font-size: var(--text-4xl); }
}

.hero__subtitle {
  font-family: var(--font-accent);
  font-size: var(--text-xl);
  color: rgba(255,255,255,0.85);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-10);
  font-style: italic;
  opacity: 0;
  animation: heroFadeUp 0.8s var(--ease-soft) 0.7s forwards;
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroFadeUp 0.8s var(--ease-soft) 0.9s forwards;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  animation: gentleBounce 2s infinite ease-in-out;
}

.hero__scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 100%);
  animation: scrollLine 2s infinite ease-in-out;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gentleBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* ============================================================
   TRUST BAR
   ============================================================ */

.trust-bar {
  background: var(--white);
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.trust-bar__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.trust-bar__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
}

.trust-bar__icon {
  width: 24px;
  height: 24px;
  color: var(--sage);
  flex-shrink: 0;
}

.trust-bar__divider {
  width: 1px;
  height: 24px;
  background: var(--color-border);
}

@media (max-width: 768px) {
  .trust-bar__inner {
    gap: var(--space-4);
  }
  .trust-bar__divider { display: none; }
  .trust-bar__item { flex: 1 1 calc(50% - var(--space-4)); justify-content: center; }
}

/* ============================================================
   SERVICE CARDS
   ============================================================ */

.service-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-8);
  text-align: center;
  transition: all var(--duration-normal) var(--ease-soft);
  border: 1px solid var(--color-border-light);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--sage-light);
}

.service-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage-lighter), var(--sage-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
  color: var(--sage-dark);
  transition: transform var(--duration-normal) var(--ease-soft);
}

.service-card:hover .service-card__icon {
  transform: scale(1.08);
}

.service-card__icon svg {
  width: 28px;
  height: 28px;
}

/* Image-variant service card — replaces circular icon with a photo */
.service-card__img-wrap {
  width: calc(100% + var(--space-16));
  height: 190px;
  margin: calc(-1 * var(--space-10)) calc(-1 * var(--space-8)) var(--space-6);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  flex-shrink: 0;
}

.service-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-soft);
}

.service-card:hover .service-card__img-wrap img {
  transform: scale(1.06);
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  color: var(--charcoal);
}

.service-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
  flex: 1;
}

.service-card__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--sage-dark);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: gap var(--duration-fast) var(--ease-soft);
}

.service-card:hover .service-card__link {
  gap: var(--space-3);
}

/* ============================================================
   SPECIALTY TAGS
   ============================================================ */

.specialty-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

.specialty-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: all var(--duration-normal) var(--ease-soft);
  text-decoration: none;
  cursor: pointer;
}

.specialty-tag:hover {
  border-color: var(--sage);
  background: var(--sage-lighter);
  color: var(--sage-deep);
  transform: translateY(-2px);
}

.specialty-tag svg {
  width: 16px;
  height: 16px;
  color: var(--sage);
}

/* ============================================================
   ABOUT PREVIEW / SPLIT SECTION
   ============================================================ */

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

@media (max-width: 768px) {
  .split-section {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

.split-section__image {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  position: relative;
}

.split-section__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/5;
}

.split-section__image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(255,255,255,0.2);
}

.split-section__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.split-section__content .label {
  margin-bottom: 0;
}

.split-section__content h2 {
  font-size: var(--text-3xl);
}

.split-section__content p {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  font-size: var(--text-md);
}

/* ============================================================
   GETTING STARTED JOURNEY
   ============================================================ */

.journey {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  position: relative;
}

@media (max-width: 768px) {
  .journey { grid-template-columns: 1fr; gap: var(--space-6); }
}

.journey__step {
  text-align: center;
  position: relative;
  padding: var(--space-8);
}

.journey__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage), var(--sage-dark));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin: 0 auto var(--space-6);
  position: relative;
  z-index: 1;
}

.journey__step h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.journey__step p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* Connector line between steps */
.journey__connector {
  display: none;
}

@media (min-width: 769px) {
  .journey__connector {
    display: block;
    position: absolute;
    top: calc(var(--space-8) + 28px);
    left: calc(50% + 36px);
    width: calc(100% - 72px);
    height: 2px;
    background: linear-gradient(90deg, var(--sage-light), var(--sand));
  }
  .journey__step:last-child .journey__connector { display: none; }
}

/* ============================================================
   TESTIMONIAL CAROUSEL
   ============================================================ */

.testimonials__wrapper {
  position: relative;
  overflow: hidden;
}

.testimonials__track {
  display: flex;
  transition: transform var(--duration-slow) var(--ease-soft);
}

.testimonial-card {
  flex: 0 0 100%;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .testimonial-card { flex: 0 0 50%; }
}

@media (min-width: 1024px) {
  .testimonial-card { flex: 0 0 33.333%; }
}

.testimonial-card__inner {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  border: 1px solid var(--color-border-light);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testimonial-card__stars {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
  color: var(--terra);
}

.testimonial-card__stars svg {
  width: 18px;
  height: 18px;
}

.testimonial-card__quote {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  flex: 1;
  margin-bottom: var(--space-6);
}

.testimonial-card__quote::before {
  content: '"';
  font-size: var(--text-3xl);
  color: var(--sage-light);
  line-height: 0.5;
  display: block;
  margin-bottom: var(--space-2);
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage-lighter), var(--blush));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-md);
  color: var(--sage-dark);
}

.testimonial-card__name {
  font-weight: 600;
  font-size: var(--text-sm);
}

.testimonial-card__role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.testimonials__controls {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.testimonials__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sand);
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-soft);
  padding: 0;
}

.testimonials__dot.active {
  background: var(--sage);
  transform: scale(1.3);
}

/* ============================================================
   INSURANCE GRID
   ============================================================ */

.insurance-grid {
  display: grid;
  grid-template-columns: repeat(4, 160px);
  gap: var(--space-5);
  justify-content: center;
  align-items: stretch;
}

.insurance-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 160px;
  padding: var(--space-5) var(--space-4);
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wide);
  text-align: center;
  transition: all var(--duration-normal) var(--ease-soft);
  cursor: pointer;
  text-decoration: none;
  min-height: 150px;
}

.insurance-grid__item:hover {
  border-color: var(--sage-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Logo image inside insurance card */
.insurance-grid__item img.insurance-logo,
.insurance-grid__item svg.insurance-logo {
  width: 110px;
  height: 52px;
  max-width: 110px;
  max-height: 52px;
  object-fit: contain;
  display: block;
  overflow: hidden;
}

/* Hide text labels — logos speak for themselves */
.insurance-grid__item span {
  display: none;
}

/* UHC logo is square — zoom in to fill card */
a[aria-label="UnitedHealthcare"] img.insurance-logo {
  width: 130px;
  height: 130px;
  max-width: 150px;
  max-height: 150px;
}

/* Aetna: very wide logo (185x36) — give full width */
a[aria-label="Aetna"] img.insurance-logo {
  width: 120px;
  height: auto;
  max-width: 130px;
}

/* BCBS: landscape PNG — fit width */
a[aria-label="Blue Cross Blue Shield"] img.insurance-logo {
  width: 120px;
  height: auto;
  max-width: 130px;
}

/* MVP: square-ish SVG (150x70) */
a[aria-label="MVP Health Care"] img.insurance-logo {
  width: 110px;
  height: auto;
  max-width: 120px;
}

/* Cigna logo is near-square — scale to fit full card height */
a[aria-label="Cigna"] img.insurance-logo {
  width: auto;
  height: 72px;
  max-width: 120px;
}

/* Oxford logo is square — zoom in to fill card */
a[aria-label="Oxford Health Plans"] img.insurance-logo {
  width: 130px;
  height: 130px;
  max-width: 150px;
  max-height: 150px;
}

/* ============================================================
   BLOG PREVIEW CARDS
   ============================================================ */

.blog-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  transition: all var(--duration-normal) var(--ease-soft);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.blog-card__image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-soft);
}

.blog-card:hover .blog-card__image img {
  transform: scale(1.05);
}

.blog-card__content {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--space-2);
}

.blog-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
  color: var(--charcoal);
}

.blog-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  flex: 1;
}

/* ============================================================
   STICKY CONSULTATION CTA
   ============================================================ */

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: var(--sage-deep);
  color: var(--white);
  padding: var(--space-3) var(--space-6);
  transform: translateY(100%);
  transition: transform var(--duration-slow) var(--ease-soft);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
}

.sticky-cta.visible {
  transform: translateY(0);
}

.sticky-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: var(--space-4);
}

.sticky-cta__text {
  font-size: var(--text-sm);
  font-weight: 500;
}

.sticky-cta__text span {
  display: block;
  font-size: var(--text-xs);
  opacity: 0.7;
  font-weight: 400;
}

@media (max-width: 640px) {
  .sticky-cta__inner {
    justify-content: center;
  }
  .sticky-cta__text { display: none; }
}

/* ============================================================
   CHATBOT WIDGET
   ============================================================ */

.chatbot {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-chatbot);
  opacity: 1;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Faded state — triggered when mouse is idle */
.chatbot--hidden {
  opacity: 0.15;
  transform: scale(0.92);
}

/* Never fully hide when panel is open */
.chatbot.panel-open {
  opacity: 1 !important;
  transform: none !important;
}

.chatbot__toggle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3D4F3D, #6B8C6B);
  color: var(--white);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(61,79,61,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-normal) var(--ease-soft);
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0;
}

.chatbot__toggle::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(107,140,107,0.4);
  animation: joy-ring 2.5s ease-in-out infinite;
}

@keyframes joy-ring {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.12); opacity: 0; }
}

.chatbot__toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 32px rgba(61,79,61,0.55);
}

.chatbot__toggle svg {
  width: 28px;
  height: 28px;
}

/* Joy header name styling */
.chatbot__header-name {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--white);
}

.chatbot__panel {
  position: absolute;
  bottom: calc(100% + var(--space-4));
  right: 0;
  width: 380px;
  max-height: 520px;
  background: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.95);
  transition: all var(--duration-normal) var(--ease-soft);
  border: 1px solid var(--color-border-light);
}

.chatbot__panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

@media (max-width: 480px) {
  .chatbot__panel {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  }
  .chatbot { bottom: var(--space-4); right: var(--space-4); }
}

.chatbot__header {
  background: linear-gradient(135deg, var(--sage), var(--sage-dark));
  color: var(--white);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot__header-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.chatbot__header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot__header-name {
  font-weight: 600;
  font-size: var(--text-sm);
}

.chatbot__header-status {
  font-size: var(--text-xs);
  opacity: 0.8;
}

.chatbot__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast) var(--ease-soft);
}

.chatbot__close:hover {
  background: rgba(255,255,255,0.3);
}

.chatbot__messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: 300px;
}

.chatbot__message {
  max-width: 85%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  animation: messageSlideIn 0.3s var(--ease-soft);
}

@keyframes messageSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chatbot__message--bot {
  background: var(--cream);
  color: var(--charcoal);
  align-self: flex-start;
  border-bottom-left-radius: var(--radius-sm);
}

.chatbot__message--user {
  background: var(--sage);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: var(--radius-sm);
}

.chatbot__message--emergency {
  background: #FFF5F5;
  border: 1px solid #FEB2B2;
  color: var(--charcoal);
  align-self: stretch;
  max-width: 100%;
  border-radius: var(--radius-lg);
}

.chatbot__message--emergency strong {
  color: var(--color-danger);
}

.chatbot__quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0 var(--space-6) var(--space-3);
}

.chatbot__quick-btn {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  cursor: pointer;
  background: var(--white);
  transition: all var(--duration-fast) var(--ease-soft);
  white-space: nowrap;
}

.chatbot__quick-btn:hover {
  border-color: var(--sage);
  background: var(--sage-lighter);
  color: var(--sage-deep);
}

.chatbot__input-area {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.chatbot__input {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  background: var(--cream);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-soft);
}

.chatbot__input:focus {
  border-color: var(--sage);
}

.chatbot__input::placeholder {
  color: var(--color-text-muted);
}

.chatbot__send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast) var(--ease-soft);
  flex-shrink: 0;
}

.chatbot__send:hover {
  background: var(--sage-dark);
}

.chatbot__send svg {
  width: 16px;
  height: 16px;
}

/* Chatbot typing indicator */
.chatbot__typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--cream);
  border-radius: var(--radius-lg);
  align-self: flex-start;
  border-bottom-left-radius: var(--radius-sm);
}

.chatbot__typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stone);
  animation: typingDot 1.4s infinite ease-in-out;
}

.chatbot__typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot__typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* ============================================================
   CONTACT FORM
   ============================================================ */

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  background: var(--white);
  color: var(--charcoal);
  transition: border-color var(--duration-fast) var(--ease-soft),
              box-shadow var(--duration-fast) var(--ease-soft);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(139, 158, 139, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */

.faq-item {
  border-bottom: 1px solid var(--color-border-light);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border-light);
}

.faq-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-6) 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: var(--space-4);
}

.faq-trigger h3 {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--charcoal);
  transition: color var(--duration-fast) var(--ease-soft);
}

.faq-trigger:hover h3 {
  color: var(--sage-dark);
}

.faq-trigger__icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--duration-normal) var(--ease-soft);
}

.faq-item.open .faq-trigger__icon {
  background: var(--sage);
  color: var(--white);
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-soft);
}

.faq-item.open .faq-answer {
  max-height: 400px;
}

.faq-answer__inner {
  padding: 0 0 var(--space-6);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  font-size: var(--text-base);
}

/* ============================================================
   THERAPIST PROFILE CARD
   ============================================================ */

.therapist-profile {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-12);
  align-items: start;
}

@media (max-width: 768px) {
  .therapist-profile {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

.therapist-profile__image {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  position: relative;
}

.therapist-profile__image img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.therapist-profile__badge {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  text-align: center;
}

.therapist-profile__badge p {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--sage-dark);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.therapist-profile__content h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
}

.therapist-profile__credentials {
  font-size: var(--text-sm);
  color: var(--sage);
  font-weight: 500;
  margin-bottom: var(--space-6);
}

.therapist-profile__bio {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

.therapist-profile__details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.therapist-profile__detail {
  padding: var(--space-4);
  background: var(--cream);
  border-radius: var(--radius-lg);
}

.therapist-profile__detail-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--sage);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.therapist-profile__detail-value {
  font-size: var(--text-sm);
  color: var(--charcoal);
  font-weight: 500;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--charcoal);
  color: var(--white);
  padding: var(--space-16) 0 var(--space-8);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.footer__brand p {
  color: rgba(255,255,255,0.6);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  margin-top: var(--space-4);
  max-width: 300px;
}

.footer__heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--terra-light);
  margin-bottom: var(--space-5);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__link {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  transition: color var(--duration-fast) var(--ease-soft);
}

.footer__link:hover {
  color: var(--white);
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-3);
}

.footer__contact-item svg {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
  color: var(--sage-light);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer__copyright {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}

.footer__legal {
  display: flex;
  gap: var(--space-6);
}

.footer__legal a {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  transition: color var(--duration-fast) var(--ease-soft);
}

.footer__legal a:hover {
  color: var(--white);
}

/* ============================================================
   PAGE HERO (Inner Pages)
   ============================================================ */

.page-hero {
  padding: var(--space-32) 0 var(--space-16);
  background: linear-gradient(135deg, var(--sage-deep), var(--sage-dark));
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: var(--space-4);
}

.page-hero p {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto;
}

.page-hero .label {
  color: var(--terra-light);
  margin-bottom: var(--space-4);
  display: block;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */

.breadcrumb {
  padding: var(--space-4) 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--sage);
  transition: color var(--duration-fast) var(--ease-soft);
}

.breadcrumb a:hover {
  color: var(--sage-dark);
}

.breadcrumb__separator {
  margin: 0 var(--space-2);
  opacity: 0.5;
}

/* ============================================================
   MOBILE / iOS / ANDROID OPTIMIZATIONS
   ============================================================ */

/* --- iOS Safari: fix 100vh bug with dynamic viewport height --- */
.hero {
  min-height: 100vh;
  min-height: 100dvh; /* dynamic viewport height — fixes iOS Safari bottom bar */
}

/* --- iOS Safe Area insets (iPhone home indicator / notch) --- */
.sticky-cta {
  padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  padding-left: calc(var(--space-4) + env(safe-area-inset-left, 0px));
  padding-right: calc(var(--space-4) + env(safe-area-inset-right, 0px));
}

.chatbot {
  bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  right: calc(var(--space-6) + env(safe-area-inset-right, 0px));
}

@media (max-width: 480px) {
  .chatbot {
    bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
    right: calc(var(--space-4) + env(safe-area-inset-right, 0px));
  }
  .chatbot__panel {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* --- Touch target minimums: 44x44px per Apple / Google guidelines --- */
.nav__link,
.nav__dropdown-trigger,
.nav__lang-btn,
.nav__toggle,
.footer__link,
.faq-trigger,
.testimonials__btn {
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* nav__dropdown-item stays display:block to avoid breaking dropdown layout */
.nav__dropdown-item {
  min-height: 44px;
  display: flex;
  align-items: center;
}

@media (min-width: 769px) {
  .nav__dropdown-item {
    min-height: unset;
    display: block;
  }
}

.nav__toggle {
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

.btn {
  min-height: 44px;
}

/* --- Prevent text overflow on small screens --- */
.hero__title,
.hero__subtitle,
.heading-1, .heading-2, .heading-3 {
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* --- Hero CTA buttons: stack on small phones --- */
@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
    padding: 0 var(--space-2);
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero__title {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .hero__subtitle {
    font-size: var(--text-base);
  }
}

/* --- Insurance & payment grids: better small screen wrapping --- */
@media (max-width: 640px) {
  .insurance-grid {
    grid-template-columns: repeat(2, 140px);
    gap: var(--space-3);
  }

  .insurance-grid__item {
    width: 140px;
    padding: var(--space-3) var(--space-2);
  }

  .insurance-grid__item svg.insurance-logo,
  .insurance-grid__item img.insurance-logo {
    width: 80px;
    height: 44px;
  }

  .payment-methods {
    gap: var(--space-3);
  }

  .payment-method {
    min-width: 80px;
    padding: var(--space-3) var(--space-3);
    font-size: 0.65rem;
  }

  .payment-logo {
    width: 42px !important;
  }
}

/* --- Prevent horizontal scroll on all mobile sizes --- */
body {
  overflow-x: hidden;
  max-width: 100vw;
}

section, .container, .container-narrow, .container-wide {
  max-width: 100%;
}

/* --- iOS tap highlight removal (keeps custom focus styles) --- */
a, button, [role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* prevents 300ms delay on iOS */
}

/* --- Smooth momentum scrolling on iOS --- */
.chatbot__messages,
.chatbot__panel {
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}

/* nav__menu only gets scroll on mobile — never clip dropdowns on desktop */
@media (max-width: 1024px) {
  .nav__menu {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
  }
}

/* --- Fix font sizing on iOS rotation --- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* --- Better inputs on mobile (prevents iOS zoom on focus) --- */
input, textarea, select {
  font-size: 16px; /* prevents iOS auto-zoom when input focused */
}

/* --- Footer grid: stack on mobile --- */
@media (max-width: 640px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }

  .footer__legal {
    justify-content: center;
  }
}

/* --- Pricing cards: single column on mobile --- */
@media (max-width: 600px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* --- Services / specialty cards: full width on small mobile --- */
@media (max-width: 480px) {
  .service-card,
  .specialty-card,
  .blog-card {
    padding: var(--space-6);
  }

  .pricing-card {
    padding: var(--space-6);
  }
}

/* --- Page hero heading: fluid size for all screen widths --- */
.page-hero h1 {
  font-size: clamp(1.75rem, 6vw, 3rem);
}

/* --- Nav logo: right size on very small phones --- */
@media (max-width: 380px) {
  .nav__logo-img {
    width: 180px !important;
    height: auto !important;
  }

  .nav__inner {
    padding: 0 var(--space-3);
  }
}

/* --- Section padding: tighter on small phones --- */
@media (max-width: 380px) {
  :root {
    --section-padding: var(--space-10);
    --content-padding: var(--space-3);
  }
}

/* --- Android Chrome: address bar resize smoothness --- */
@supports (height: 100svh) {
  .hero {
    min-height: 100svh;
  }
}

/* ============================================================
   DEVICE-ADAPTIVE STYLES  (driven by device.js html class flags)
   ============================================================ */

/* ── Visibility utilities ─────────────────────────────────── */
html.is-desktop .mobile-only  { display: none !important; }
html.is-mobile  .desktop-only { display: none !important; }
html.is-tablet  .desktop-only { display: none !important; }

/* ── Tap-to-call prominence ──────────────────────────────────
   device.js adds .tap-to-call to all tel: links on phones.
   The CSS hook is html.is-mobile for safety (no flash on desktop).
   ─────────────────────────────────────────────────────────── */
html.is-mobile a.tap-to-call {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

/* Inside footer / contact blocks: pill button style */
html.is-mobile .footer a.tap-to-call,
html.is-mobile .contact-info a.tap-to-call,
html.is-mobile [class*="contact"] a.tap-to-call {
  background: var(--sage-light, #c5d4be);
  color: var(--charcoal, #2d3028);
  padding: 0.45em 1.1em;
  border-radius: 999px;
  font-size: var(--text-sm);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: background 0.2s ease, transform 0.1s ease;
}

html.is-mobile .footer a.tap-to-call:active,
html.is-mobile .contact-info a.tap-to-call:active {
  background: var(--sage-dark, #4a6741);
  color: #fff;
  transform: scale(0.97);
}

/* Phone icon prepended via CSS to avoid HTML duplication */
html.is-mobile a.tap-to-call::before {
  content: '📞';
  font-size: 0.85em;
  line-height: 1;
}

/* ── Map link indicator on mobile ───────────────────────────
   [data-maps-link] elements get a small map pin icon on touch devices.
   ─────────────────────────────────────────────────────────── */
html.is-ios [data-maps-link]::after,
html.is-android [data-maps-link]::after {
  content: ' 📍';
  font-size: 0.85em;
}

/* ============================================================
   DEBUG BADGE  (#site-debug-badge)
   Only rendered when ?debugDevice=1 is in the URL.
   Zero performance cost in production — element never created.
   ============================================================ */
#site-debug-badge {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 99999;
  width: 280px;
  background: rgba(15, 17, 20, 0.96);
  color: #e2e8f0;
  border-radius: 12px;
  font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
  font-size: 11px;
  line-height: 1.5;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.sdb-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sdb-icon { font-size: 14px; }

.sdb-title {
  flex: 1;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.sdb-close {
  background: rgba(255,255,255,0.08);
  border: none;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1;
  transition: background 0.15s;
}
.sdb-close:hover { background: rgba(239,68,68,0.3); color: #fca5a5; }

.sdb-body {
  padding: 8px 4px;
  max-height: 280px;
  overflow-y: auto;
}

.sdb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 12px;
  gap: 8px;
}
.sdb-row:nth-child(even) { background: rgba(255,255,255,0.03); }

.sdb-key {
  color: #64748b;
  flex-shrink: 0;
  min-width: 90px;
}

.sdb-val {
  font-weight: 600;
  color: #e2e8f0;
  text-align: right;
  word-break: break-all;
}

.sdb-yes { color: #4ade80; }   /* true  → green  */
.sdb-no  { color: #f87171; }   /* false → red    */

.sdb-footer {
  padding: 6px 12px;
  font-size: 10px;
  color: #334155;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  letter-spacing: 0.05em;
}


/* ================================================================
   NAV ICON SYSTEM — Desktop
   Clean icon + label nav links. No bubbles/pills.
   Icons match .trust-bar__icon visual language (sage color, 13px).
   ================================================================ */

/* ── Icon container ───────────────────────────────────────────── */
.nav-badge__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-badge__icon svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

/* ── Label ────────────────────────────────────────────────────── */
.nav-badge__label {
  display: inline;
}

/* ── Desktop nav links — clean, no bubble ───────────────────── */
@media (min-width: 769px) {

  a.nav__link {
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
    padding: 0.25em 0;
    border: none;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.012em;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.18s ease, opacity 0.18s ease;
  }

  a.nav__link:hover {
    background: transparent;
    border: none;
    box-shadow: none;
    transform: none;
    opacity: 0.8;
  }

  a.nav__link:active { opacity: 0.7; }

  /* Active current-page link */
  a.nav__link.nav-badge--active {
    font-weight: 600;
    opacity: 1;
  }

  /* Focus ring */
  a.nav__link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 3px;
    border-radius: 4px;
  }

  /* ── Scrolled nav (white background) ────────────────────────── */
  .nav.scrolled a.nav__link {
    background: transparent;
    border: none;
    color: var(--charcoal, #2d3028);
  }

  .nav.scrolled a.nav__link:hover {
    color: var(--sage-dark, #4a6741);
    background: transparent;
    box-shadow: none;
  }

  .nav.scrolled a.nav__link.nav-badge--active {
    color: var(--sage-dark, #4a6741);
    font-weight: 600;
    background: transparent;
    box-shadow: none;
  }

  .nav.scrolled a.nav__link:focus-visible {
    outline-color: var(--sage-dark, #4a6741);
  }

  /* ── Chevron (dropdown trigger arrow) ────────────────────────── */
  a.nav__link svg:not(.nav-badge__icon svg) {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    opacity: 0.7;
    margin-left: 1px;
  }

  a.nav__link.nav-badge--active svg:not(.nav-badge__icon svg) { opacity: 1; }

  /* ── Icon colors ────────────────────────────────────────────── */
  .nav-badge__icon svg { color: inherit; }

  /* Scrolled: sage icon (mirrors trust-bar__icon) */
  .nav.scrolled a.nav__link .nav-badge__icon svg {
    color: var(--sage, #6a8f5f);
  }
  .nav.scrolled a.nav__link:hover .nav-badge__icon svg,
  .nav.scrolled a.nav__link.nav-badge--active .nav-badge__icon svg {
    color: var(--sage-dark, #4a6741);
  }

  /* ── Compact sizing for 769–1100px ──────────────────────────── */
  @media (max-width: 1100px) and (min-width: 769px) {
    a.nav__link {
      gap: 7px;
      font-size: 0.78rem;
    }
    .nav-badge__icon svg { width: 14px; height: 14px; }
  }

  /* ── Icon-only for very tight viewports (769–950px) ──────────── */
  @media (max-width: 950px) and (min-width: 769px) {
    .nav-badge__label { display: none; }
    a.nav__link { gap: 0; padding: 0.3em 0.25em; }
    a.nav__link[title] { position: relative; }
  }
}

