/* Mental health & teletherapy page — builds on home.css + telehealth.css */

.btn--danger {
  background: #D92D20;
  border-color: #D92D20;
  color: #FFFFFF;
}

.btn--danger:hover {
  background: #B42318;
  border-color: #B42318;
}

/* ---------- Hero ---------- */

.mh-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(420px, 52vw, 540px);
  overflow: hidden;
  color: #FFFFFF;
}

.mh-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 35%;
}

.mh-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(23, 87, 184, 0.94) 0%, rgba(29, 108, 224, 0.82) 45%, rgba(29, 108, 224, 0.25) 100%);
}

.mh-hero__inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(3rem, 7vw, 5rem);
}

.mh-hero__tag {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 3px 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.mh-hero__title {
  max-width: 14ch;
  color: #FFFFFF;
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.mh-hero__lede {
  margin-top: 1rem;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 500;
}

.mh-hero__sub {
  max-width: 34rem;
  margin: 0.5rem 0 2rem;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Crisis banner ---------- */

.crisis {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding: 0.875rem 1rem 0.875rem 1.25rem;
  background: #FEF3F2;
  border: 1px solid #FECDCA;
  border-radius: 12px;
  color: #912018;
  font-size: 0.9375rem;
}

.crisis > .icon {
  flex: none;
  color: #D92D20;
}

.crisis p {
  flex: 1;
  color: inherit;
}

.crisis .btn {
  flex: none;
}

/* ---------- Intro ---------- */

.mh-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.mh-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.mh-stats > div {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.35rem;
  padding: 1.75rem 1.25rem;
  background: #FFFFFF;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: var(--shadow-xs);
  text-align: center;
}

.mh-stats dd {
  color: var(--blue-600);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
}

.mh-stats dt {
  color: var(--gray-500);
  font-size: 0.875rem;
}

.mh-soft {
  background: var(--bg-soft);
}

.mh-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.mh-pill .icon {
  width: 14px;
  height: 14px;
}

/* ---------- Conditions ---------- */

.cond-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.cond-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding: 1.25rem 0.75rem;
  background: #FFFFFF;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  color: var(--gray-900);
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.cond-grid li:hover {
  border-color: #A9C6FA;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cond-grid .icon {
  color: var(--blue-600);
}

/* ---------- AI tools ---------- */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.tool {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: #FFFFFF;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s, transform 0.2s;
}

.tool:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.tool h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
}

.tool p {
  margin-bottom: 1.5rem;
}

.tool .btn {
  justify-content: center;
  margin-top: auto;
}

/* ---------- Therapists ---------- */

.th-filter {
  display: flex;
  gap: 0.75rem;
  max-width: 720px;
  margin: 0 auto 2rem;
}

.th-search,
.th-select select {
  min-height: 48px;
  background: #FFFFFF;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
}

.th-search {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 0.875rem;
  color: var(--gray-400);
}

.th-search:focus-within,
.th-select select:focus-visible {
  border-color: var(--blue-600);
  outline: 3px solid var(--blue-100);
}

.th-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--gray-900);
  font: inherit;
}

.th-select select {
  height: 100%;
  padding: 0 2.25rem 0 0.875rem;
  color: var(--gray-700);
  font: inherit;
  cursor: pointer;
}

.th-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.th-grid .doc[hidden] {
  display: none;
}

.match {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.375rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  color: var(--gray-500);
  font-size: 0.8125rem;
  font-weight: 700;
}

.match__label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--gray-700);
}

.match__label .icon {
  width: 14px;
  height: 14px;
  color: var(--blue-600);
}

.match__bar {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  background: var(--blue-100);
  border-radius: 999px;
}

.match__bar span {
  display: block;
  height: 100%;
  background: var(--blue-600);
  border-radius: inherit;
}

.th-empty {
  padding: 2rem;
  text-align: center;
}

/* ---------- How it works ---------- */

.mh-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .cond-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .th-grid,
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .mh-intro {
    grid-template-columns: minmax(0, 1fr);
  }

  .mh-hero::before {
    background: linear-gradient(180deg, rgba(23, 87, 184, 0.9), rgba(29, 108, 224, 0.8));
  }
}

@media (max-width: 640px) {
  .cond-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .th-grid,
  .tool-grid,
  .mh-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .th-filter {
    flex-direction: column;
  }

  .crisis {
    flex-wrap: wrap;
  }

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

  .mh-stats > div {
    padding: 1.25rem 0.75rem;
  }
}
