/*
 * /our-insurance-partners redesign (PAWC-385), from the Figma "Partners" frame.
 *
 * Badges and pill buttons come from redesign-common.css (rd-*), loaded before this file. What is
 * particular to this page is prefixed ip- and scoped under .ip-page so it can't reach other pages
 * through style.css's shared classes. The content column is 1100px (.ip-container); the hero and
 * the payers card are 1376px wide, the closing band 1278px. Breakpoints: 1199 (tablet), 991
 * (two-column blocks stack) and 767 (phone).
 */

.ip-page {
  --ip-heading: #111827;
  --ip-text: #3f4a63;
  --ip-text-dark: #1f2937;
  --ip-green: var(--bg-base-green, #10393e);
  --ip-green-hover: #0b2a2e;
  --ip-sage: var(--button-primary-bg, #5c7a5a);
  --ip-surface-card: #eaf0ea;
  --ip-surface-soft: #eaefe9;
  --ip-surface-panel: #d5e0d5;
  --ip-border: #dfe3df;
  --ip-border-card: #dce5db;
  --ip-radius-xl: 22px;
  --ip-radius-lg: 16px;
  --ip-radius-md: 12px;
  /* Same gradient as the /find-your-provider CTA (find-your-provider.css, .fyp-cta). */
  --ip-gradient: linear-gradient(90deg, #6a8462 0%, #4a6a58 40%, #10393e 100%);
  /* Height of the fixed .modern-navbar plus a little air, so #insurance-plans and #health-plans
     reached from a shared link don't land under it. */
  --ip-anchor-offset: 96px;

  padding-bottom: 82px;
  font-family: var(--font-intel);
}

/* :where() keeps these resets at zero specificity, so each component's own margin wins. */
:where(.ip-page) p,
:where(.ip-page) h1,
:where(.ip-page) h2,
:where(.ip-page) h3,
:where(.ip-page) dl,
:where(.ip-page) dd {
  margin: 0;
}

:where(.ip-page) ul,
:where(.ip-page) ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ip-icon {
  flex-shrink: 0;
}

/* DM Serif ships only weight 400; inside the 500-weight headings the browser would fake a bold. */
.ip-page .dm-style-text {
  font-weight: 400;
}

/* rd-badge carries a bottom margin for the pages that stack it over a heading; here the heading
   sets the gap. */
.ip-page .rd-badge {
  margin: 0;
}

.ip-container {
  max-width: 1100px;
  margin-inline: auto;
}

.ip-section {
  margin-top: 120px;
}

/* The hero's two links point here (ids in content.php). */
.ip-plans,
.ip-health-plans {
  scroll-margin-top: var(--ip-anchor-offset);
}

.ip-h2 {
  margin-top: 12px;
  color: var(--ip-heading);
  font-size: 38px;
  font-weight: 500;
  line-height: 48px;
  letter-spacing: -0.4px;
}

.ip-h2-sm {
  margin-top: 14px;
  font-size: 34px;
  line-height: 44px;
}

.ip-h2-light {
  color: #fff;
  line-height: 46px;
}

.ip-lead {
  margin-top: 19px;
  color: var(--ip-text);
  font-size: 17px;
  line-height: 27px;
}

.ip-link {
  color: var(--ip-green);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.ip-link:hover {
  color: var(--ip-sage);
}

.ip-page a:focus-visible,
.ip-page button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Pill variants rd-* doesn't have. */
.ip-page .ip-pill-icon {
  gap: 9px;
}

.ip-page .ip-pill-sm {
  min-height: 42px;
  padding: 0 24px;
  font-size: 14px;
}

.ip-page .ip-pill-dark {
  background-color: var(--ip-green);
  color: #fff;
}

.ip-page .ip-pill-dark:hover,
.ip-page .ip-pill-dark:focus-visible {
  background-color: var(--ip-green-hover);
  color: #fff;
}

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

.ip-hero {
  display: grid;
  grid-template-columns: minmax(0, 696fr) minmax(0, 680fr);
  max-width: 1376px;
  min-height: 740px;
  margin: 5px 32px 0;
  overflow: hidden;
  border-radius: var(--ip-radius-xl);
  background: var(--ip-green);
}

.ip-hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 48px;
}

.ip-hero-title {
  max-width: 580px;
  margin-top: 22px;
  color: #fff;
  font-size: 46px;
  font-weight: 500;
  line-height: 56px;
  letter-spacing: -0.5px;
}

.ip-hero-lead {
  max-width: 524px;
  margin-top: 25px;
  color: #fff;
  font-size: 17px;
  line-height: 27px;
}

.ip-hero-note {
  max-width: 462px;
  margin-top: 19px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 16px;
  line-height: 26px;
}

.ip-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 35px;
}

.ip-page .ip-arrow-link-light,
.ip-page .ip-arrow-link-light:hover {
  color: #fff;
}

.ip-hero-media {
  position: relative;
  min-height: 100%;
}

.ip-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Figma crops the 1100x1443 photo to the frame a little above centre. */
  object-position: 50% 30%;
}

/* ---------- Insurer grid ---------- */

.ip-plans {
  margin-top: 100px;
}

.ip-plans-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  column-gap: 64px;
}

.ip-plans-header .ip-lead {
  max-width: 510px;
}

.ip-plans-contact p {
  max-width: 470px;
  margin-bottom: 21px;
  color: var(--ip-text);
  font-size: 16.5px;
  line-height: 26px;
}

.ip-plans-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 52px;
}

.ip-plan-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: var(--ip-surface-card);
}

.ip-plan-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 92px;
  padding: 12px 20px;
}

/* The <img> carries width/height of this slot (168x64); the logo is fitted inside it. */
.ip-plan-logo img {
  display: block;
  width: 100%;
  max-width: 168px;
  height: 64px;
  object-fit: contain;
}

.ip-plan-logo img[hidden] {
  display: none;
}

.ip-plan-name {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 10px 12px;
  border-top: 1px solid var(--ip-border-card);
  color: var(--ip-green);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
}

/* ---------- For Health Plans & Payers ---------- */

.ip-dark-card {
  max-width: 1376px;
  margin: 110px 32px 0;
  padding: 96px 32px;
  border-radius: var(--ip-radius-xl);
  background: var(--ip-green);
}

.ip-health-plans-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  align-items: center;
  column-gap: 48px;
  max-width: 1100px;
  margin-inline: auto;
}

.ip-health-plans-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Narrow enough to break the lines where Figma does ("…Partner / for Access, Quality, / and…"). */
.ip-health-plans .ip-h2 {
  max-width: 400px;
  margin-top: 20px;
}

.ip-health-plans-text {
  max-width: 495px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16.5px;
  line-height: 27px;
}

.ip-feature-pills,
.ip-mode-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.ip-feature-pills li,
.ip-mode-pills li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.ip-feature-pills li {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
}

.ip-health-plans .rd-pill {
  margin-top: 28px;
}

.ip-glance {
  padding: 20px;
  border-radius: var(--ip-radius-lg);
  background: var(--ip-surface-panel);
}

.ip-glance-title {
  margin-bottom: 14px;
  color: var(--ip-green);
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
}

.ip-glance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* The label is the <dt> and comes first in the markup; the figure is shown on top. */
.ip-glance-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 90px;
  padding: 18px 20px;
  border-radius: var(--ip-radius-md);
  background: #fff;
}

/* The first row: the clinician count (metrics[0], pinned by InsurancePartnersContentTest) and
   "Who We Treat". */
.ip-glance-tile:nth-child(-n + 2) {
  min-height: 141px;
}

.ip-glance-value {
  order: -1;
  color: var(--ip-sage);
  font-size: 28px;
  font-weight: 500;
  line-height: 34px;
  letter-spacing: -0.5px;
}

.ip-glance-label {
  color: #374151;
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
}

.ip-glance-ages {
  gap: 6px;
}

.ip-glance-heading {
  margin-bottom: 4px;
  color: var(--ip-sage);
  font-size: 24px;
  font-weight: 500;
  line-height: 29px;
  letter-spacing: -0.4px;
}

.ip-glance-ages dd {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ip-text-dark);
  font-size: 12.5px;
  line-height: 18px;
}

.ip-age-pill {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border: 1px solid #b9cbb8;
  border-radius: 999px;
  color: #3d5a3c;
  font-size: 11px;
}

/* ---------- Therapy | Psychiatry ---------- */

.ip-services {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.ip-service:first-child {
  padding-right: 56px;
}

.ip-service + .ip-service {
  padding-left: 57px;
  border-left: 1px solid var(--ip-border);
}

.ip-service-text {
  margin-top: 24px;
  color: var(--ip-text);
  font-size: 17px;
  line-height: 28px;
}

.ip-service-text + .ip-service-text {
  margin-top: 14px;
}

.ip-checklist {
  margin-top: 26px;
  border-top: 1px solid var(--ip-border);
}

.ip-checklist li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 55px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ip-border);
  color: var(--ip-green);
  font-size: 17px;
  font-weight: 500;
  line-height: 22px;
}

.ip-check {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: var(--ip-sage);
  color: #fff;
}

.ip-mode-pills li {
  border: 1px solid var(--ip-border);
  background: #fff;
  color: var(--ip-green);
  font-size: 13.5px;
}

.ip-mode-pills .ip-icon {
  color: var(--ip-sage);
}

.ip-gradient-band {
  border-radius: var(--ip-radius-xl);
  background: var(--ip-gradient);
  color: #fff;
}

.ip-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-height: 186px;
  margin-top: 56px;
  padding: 36px 56px;
}

.ip-match > div {
  max-width: 640px;
}

/* The copy here starts at the light end of the gradient, where white body text on Figma's #6a8462
   is about 4.1:1 (under AA's 4.5:1). Start at the site's sage (#5c7a5a, 4.8:1) and drop the
   text's transparency; the closing band keeps Figma's gradient, its copy sits on the dark half. */
.ip-gradient-band.ip-match {
  background: linear-gradient(90deg, #5c7a5a 0%, #4a6a58 40%, #10393e 100%);
}

.ip-match-title {
  color: #fff;
  font-size: 28px;
  font-weight: 500;
  line-height: 36px;
  letter-spacing: -0.3px;
}

.ip-match-text {
  margin-top: 10px;
  color: #fff;
  font-size: 16.5px;
  line-height: 26px;
}

.ip-match .rd-pill {
  flex-shrink: 0;
  min-height: 46px;
  padding: 0 26px;
}

/* ---------- Getting started ---------- */

.ip-steps-title {
  max-width: 760px;
  margin-top: 22px;
}

.ip-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 40px;
  margin-top: 28px;
}

.ip-step-number {
  display: block;
  color: var(--ip-sage);
  font-family: var(--font-dm-serif);
  font-size: 44px;
  line-height: 46px;
}

.ip-step p {
  margin-top: 30px;
  color: var(--ip-text-dark);
  font-size: 16.5px;
  line-height: 27px;
}

.ip-step strong {
  color: var(--ip-green);
  font-weight: 600;
}

.ip-own-provider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 66px;
  padding: 36px;
  border-radius: 20px;
  background: var(--ip-surface-soft);
}

.ip-own-provider-title {
  color: var(--ip-green);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -0.3px;
}

.ip-own-provider p {
  max-width: 603px;
  margin-top: 10px;
  color: var(--ip-text);
  font-size: 16.5px;
  line-height: 26px;
}

.ip-own-provider .rd-pill {
  flex-shrink: 0;
  min-height: 46px;
  padding: 0 26px;
}

/* ---------- FAQ ---------- */

.ip-faq {
  display: grid;
  grid-template-columns: 436px minmax(0, 1fr);
}

.ip-faq-title {
  margin-top: 6px;
  color: var(--ip-heading);
  font-size: 42px;
  line-height: 50px;
}

.ip-faq-list.customfaq-button {
  margin-bottom: 0;
}

.customfaq-button.ip-faq-list .accordion-item {
  margin-bottom: 12px;
  overflow: hidden;
  border: 0;
  border-radius: var(--ip-radius-md);
  background: #fff;
}

.customfaq-button.ip-faq-list .accordion-item:last-child {
  margin-bottom: 0;
}

.customfaq-button.ip-faq-list button.accordion-button,
.customfaq-button.ip-faq-list button.accordion-button.collapsed,
.customfaq-button.ip-faq-list .accordion-button:not(.collapsed) {
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--ip-radius-md) !important;
  background: #fff;
  color: var(--ip-heading);
  font-size: 16.5px;
  line-height: 24px;
}

/* Bootstrap's :focus shadow would draw a second ring next to this one. */
.customfaq-button.ip-faq-list button.accordion-button:focus {
  box-shadow: none;
}

.customfaq-button.ip-faq-list button.accordion-button:focus-visible {
  outline: 2px solid var(--ip-green);
  outline-offset: -2px;
}

/* Figma's circle plus / minus (grey closed, sage open) instead of style.css's icons. */
.ip-faq-list .accordion-button::after {
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none' stroke='%238a94a6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16.5 9C16.5 13.1421 13.1421 16.5 9 16.5C4.85786 16.5 1.5 13.1421 1.5 9C1.5 4.85786 4.85786 1.5 9 1.5C13.1421 1.5 16.5 4.85786 16.5 9Z'/%3E%3Cpath d='M6 9H12'/%3E%3Cpath d='M9 6V12'/%3E%3C/svg%3E");
  background-size: 18px;
  transform: none;
}

.ip-faq-list .accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none' stroke='%235c7a5a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16.5 9C16.5 13.1421 13.1421 16.5 9 16.5C4.85786 16.5 1.5 13.1421 1.5 9C1.5 4.85786 4.85786 1.5 9 1.5C13.1421 1.5 16.5 4.85786 16.5 9Z'/%3E%3Cpath d='M6 9H12'/%3E%3C/svg%3E");
  transform: none;
}

.customfaq-button.ip-faq-list .accordion-body {
  padding: 0 22px 22px;
  color: var(--ip-text);
  font-size: 16px;
  line-height: 26px;
}

/* ---------- Closing band ---------- */

.ip-cta {
  display: grid;
  grid-template-columns: 455px minmax(0, 1fr);
  align-items: center;
  max-width: 1278px;
  margin: 120px auto 0;
  padding: 64px 183px 64px 194px;
}

.ip-cta-title {
  color: #fff;
  font-size: 32px;
  font-weight: 500;
  line-height: 40px;
  letter-spacing: -0.3px;
}

.ip-cta-title .dm-style-text {
  display: block;
}

.ip-cta-body p {
  margin-bottom: 21px;
  color: #fff;
  font-size: 16.5px;
  line-height: 26px;
}

/* ---------- Wide screens ---------- */

@media (min-width: 1440px) {
  .ip-hero,
  .ip-dark-card {
    margin-inline: auto;
  }
}

/* The closing band is 1278px wide: below that plus the 32px page gutters it would touch the edges,
   and Figma's 183/194px side padding would squeeze the text column; trim both. */
@media (max-width: 1341px) {
  .ip-cta {
    margin-inline: 32px;
    padding-inline: 96px;
  }
}

/* ---------- Tablet ---------- */

@media (max-width: 1199px) {
  .ip-container {
    padding-inline: 32px;
  }

  .ip-hero {
    min-height: 640px;
  }

  .ip-hero-content {
    padding: 64px 40px;
  }

  .ip-hero-title {
    font-size: 40px;
    line-height: 48px;
  }

  .ip-plans-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ip-dark-card {
    padding: 72px 40px;
  }

  .ip-health-plans-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 40px;
  }

  .ip-cta {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 48px;
    margin-inline: 32px;
    padding: 64px 56px;
  }
}

/* ---------- Two-column blocks stack ---------- */

@media (max-width: 991px) {
  .ip-section {
    margin-top: 80px;
  }

  .ip-hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .ip-hero-media {
    height: 420px;
  }

  .ip-plans-header {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 28px;
  }

  .ip-plans-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 40px;
  }

  .ip-dark-card {
    margin-top: 80px;
  }

  .ip-health-plans-inner {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 48px;
  }

  .ip-services {
    grid-template-columns: minmax(0, 1fr);
  }

  .ip-service:first-child {
    padding-right: 0;
  }

  .ip-service + .ip-service {
    margin-top: 56px;
    padding-top: 56px;
    padding-left: 0;
    border-top: 1px solid var(--ip-border);
    border-left: 0;
  }

  /* Stacked, the copy runs across the light start of the gradient, where white text falls under
     4.5:1; start it one stop darker (as .fyp-cta does). */
  .ip-gradient-band,
  .ip-gradient-band.ip-match {
    background: linear-gradient(160deg, #4a6a58 0%, #10393e 100%);
  }

  .ip-match,
  .ip-own-provider {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .ip-match {
    padding: 40px;
  }

  .ip-steps {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 32px;
  }

  .ip-step p {
    margin-top: 12px;
  }

  .ip-own-provider {
    margin-top: 48px;
  }

  .ip-faq {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .ip-cta {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 20px;
    margin-top: 80px;
    padding: 56px 40px;
  }
}

/* ---------- Phone ---------- */

@media (max-width: 767px) {
  .ip-page {
    --ip-anchor-offset: 88px;

    padding-bottom: 56px;
  }

  .ip-container {
    padding-inline: 16px;
  }

  .ip-section {
    margin-top: 64px;
  }

  .ip-hero {
    margin-inline: 16px;
  }

  .ip-hero-content {
    padding: 40px 24px;
  }

  .ip-hero-title {
    font-size: 32px;
    line-height: 40px;
  }

  .ip-hero-media {
    height: 320px;
  }

  .ip-h2 {
    font-size: 28px;
    line-height: 36px;
  }

  .ip-h2-sm {
    font-size: 26px;
    line-height: 34px;
  }

  .ip-plans {
    margin-top: 64px;
  }

  .ip-plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .ip-plan-logo {
    height: 80px;
    padding: 10px 14px;
  }

  .ip-plan-logo img {
    height: 52px;
  }

  .ip-dark-card {
    margin: 64px 16px 0;
    padding: 48px 20px;
  }

  .ip-glance {
    padding: 16px;
  }

  .ip-glance-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ip-glance-tile,
  .ip-glance-tile:nth-child(-n + 2) {
    min-height: 0;
  }

  .ip-match {
    padding: 32px 24px;
  }

  .ip-match-title {
    font-size: 24px;
    line-height: 32px;
  }

  .ip-own-provider {
    padding: 28px 24px;
  }

  .ip-faq-title {
    font-size: 34px;
    line-height: 42px;
  }

  .ip-cta {
    margin: 64px 16px 0;
    padding: 40px 24px;
  }

  .ip-cta-title {
    font-size: 28px;
    line-height: 36px;
  }
}
