/* ==========================================================================
   CAP Landing — Responsive overrides (tablet + mobile)
   ========================================================================== */

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .section-heading { font-size: 40px; }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; padding-bottom: 130px; }
  .hero__headline { font-size: 48px; }
  .what-is__inner, .how__grid, .plans__grid, .pricing-strip__grid { grid-template-columns: 1fr; }
  .what-is__media img { height: 380px; }
  .compare-table__row { grid-template-columns: 1.2fr 1fr 1fr 1.1fr; }
  .compare-table--5cols .compare-table__row { grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr; }

  .site-footer__inner { grid-template-columns: 1fr; gap: 40px; }
  .backed-by__inner { grid-template-columns: 1fr; gap: 40px; }
  .what-is__copy{max-width: 100% !important;}
    .hero__badge--pocket { left: 12px; }

}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .container { padding: 5px 16px; }
  .section-heading { font-size: 32px; }
  .section-lede { font-size: 16px; }


  input[type="date"], input[type="text"] {
    -webkit-appearance: none;
    appearance: none;
    height:50px !important;
    min-height:50px !important;
    max-height:50px !important;
      
}

.hero__decor--dot-green {
  left: 20px !important; 
}

.hero__decor--dot-yellow {
  right: 20px !important;
}

  /* Utilities */
  .hide-on-mobile { display: none !important; }

  /* Header */
  .site-header__inner { gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--brand-teal-dark); padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.12);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .site-header__menu-btn { display: inline-flex; }
  .site-header__cta { 
    display: inline-flex; 
    margin-left: auto; 
    padding: 8px 14px; 
    font-size: 13px; 
    height: auto; 
    white-space: nowrap;
  }

  /* Hero */
  .hero { overflow: hidden; }
  .hero__inner { padding-top: 32px; padding-bottom: 64px; gap: 32px; }
  .hero__copy { display: contents; }
  .hero__copy-top { order: 1; }
  .hero__media { order: 2; }
  .hero__copy-bottom { order: 3; }
  .hero__ctas { flex-direction: column; width: 100%; gap: 12px; }
  .hero__ctas .btn { width: 100%; justify-content: center; }
  .hero__headline { font-size: 40px; }
  .hero__subhead { font-size: 16px; }
  .hero__photo { height: 280px; }
  .hero__media-ring { display: none; }
  .hero__badge--pocket { left: 12px; bottom: 12px; padding: 12px 14px; }
  .hero__badge--live { top: 12px; right: 12px; }
  /* Mobile uses the form after the hero, so it has natural spacing above and below. */
  .hero__quote-wrap--desktop { display: none; }
  .hero__quote-mobile { display: block; margin-top: 24px; margin-bottom: 32px; }
  .quote-widget { flex-direction: column; align-items: stretch; }
  .quote-widget__field, .quote-widget__toggle, .quote-widget__submit { width: auto; }

  /* What is CAP */
  .what-is { padding: 64px 0; }
  .what-is__copy .section-heading { font-size: 36px; }
  .what-is__media { display: none; }
  .compare-mini { grid-template-columns: 1fr; gap: 20px; }
  .compare-mini__card > div:not(.compare-mini__label) {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .compare-mini__vs { top: 50%; left: 50%; }
  /* Reviews */
  .reviews__card { min-width: calc((100% - 20px) / 2); width: calc((100% - 20px) / 2); }

  /* How */
  .how { padding: 64px 0; }
  .how__phone-wrapper { display: none; }
  .how__step { flex-wrap: nowrap; padding: 24px 20px; gap: 16px; align-items: flex-start; }
  .how__cta { width: 100%; justify-content: center; margin-top: 12px; }

  /* Plans — stack, Complete on top per spec */
  .plans { padding: 64px 0; }
  .plans__grid { grid-template-columns: 1fr; gap: 20px; }
  .plan-card--complete { order: -1; transform: none; }
  .plan-card__features { grid-template-columns: 1fr; }

  /* Covered — mobile pill toggle */
  .covered { padding: 64px 0; }
  .covered__pills { display: flex; }
  .covered__grid { grid-template-columns: 1fr; gap: 0; }
  .covered__col { display: none; }
  .covered__col.is-active { display: block; }
  .covered__col[data-plan-panel="medical"] { display: block; } /* default */
  .covered__col.is-active + .covered__col:not(.is-active) { display: none; }
  /* When toggling, JS adds .is-active to one panel; hide the sibling explicitly */
  .covered__col:not(.is-active) { display: none; }

  /* Scenarios */
  .scenarios { padding: 64px 0; }
  .scenarios__badge-out-of-pocket { display: none !important; }
  .scenarios__filters {
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 24px;
    border-bottom: 5px solid var(--border);
  }
  .scenarios__filters .filter-pill {
    font-size: 13px;
    padding: 8px 16px;
  }


  /* Compare tables — stacked mobile cards */
  .compare-teaser { padding: 64px 0; }
  .compare-teaser__head { flex-direction: column; align-items: flex-start; gap: 24px; }
  .compare-table-wrapper { display: none; }
  .compare-mobile { display: flex; flex-direction: column; gap: 12px; }
  .compare-mobile__legend {
    display: flex; gap: 24px; margin-bottom: 8px; font-size: 14px; color: var(--ink-body);
  }
  .compare-mobile__legend-item { display: flex; align-items: center; gap: 8px; }
  .compare-mobile__card {
    background: #fff; border:1px solid rgb(220, 231, 242);
    border-radius: 14px; padding: 20px;
    box-shadow: 0 2px 8px rgba(31,78,121,0.04);
  }
  .compare-mobile__card-title {
    margin: 0 0 14px; font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.35;
  }
  .compare-mobile__pills { display: flex; gap: 8px; }
  .compare-mobile__pills--4col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .compare-mobile__pill {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    border-radius: 10px; padding: 10px 4px;
    text-align: center;
  }
  .compare-mobile__pill-label {
    font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--ink-body); line-height: 1.2;
  }
  .compare-mobile__pill-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
  }
  /* CAP Medical Assist — white box with subtle border */
  .compare-mobile__pill--included {
    background: var(--sky-100); border: 1px solid var(--border-soft);
  }
  .compare-mobile__pill--included .compare-mobile__pill-icon {
    background: #EAF6E8; color: var(--brand-green);
  }
  /* CAP Total Assist — blue emphasized box */
  .compare-mobile__pill--included-complete {
    background: #DAE8F5; border: 1px solid #B8D2EA;
  }
  .compare-mobile__pill--included-complete .compare-mobile__pill-label {
    color: var(--ink);
  }
  .compare-mobile__pill--included-complete .compare-mobile__pill-icon {
    background: #EAF6E8; color: var(--brand-green);
  }
  /* Excluded — subtle box, gray dash */
  .compare-mobile__pill--excluded {
    background: #fff; border: 1px solid var(--border-soft);
  }
  .compare-mobile__pill--excluded .compare-mobile__pill-icon {
    background: #F1F4F7; color: #D1D8DF;
  }
  .compare-mobile__pill--excluded .compare-mobile__pill-label {
    color: var(--ink-mute);
  }
  /* Text-value pill (prices, TBD, N/A) — no bg box */
  .compare-mobile__pill--text {
    background: transparent; border: 1px solid var(--border-soft);
  }
  .compare-mobile__pill--text .compare-mobile__pill-label {
    color: var(--ink-mute);
  }

  /* Pricing strip */
  .pricing-strip { padding: 64px 0; }
  .pricing-strip__grid { grid-template-columns: 1fr; }
  .price-card--complete { order: -1; transform: none; }

  /* FAQ */
  .faq { padding: 64px 0; }
  .faq__item summary { padding: 16px 18px; font-size: 15.5px; }
  .faq__a { padding: 0 18px 18px; font-size: 14.5px; }

  /* Final CTA */
  .final-cta { padding: 40px 0; }
  .final-cta__copy h2 { font-size: 48px; }
  .final-cta .quote-widget { display: flex; }

  /* Footer */
  .site-footer__cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .site-footer__meta { flex-direction: column; gap: 8px; text-align: left; }
  
  /* Backed By */
  .backed-by { padding: 64px 0; }
  .backed-by__stats { grid-template-columns: 1fr 1fr; gap: 24px; }
  .backed-by__media-box { height: 320px; }
  
  /* Reviews */
  .reviews { padding: 64px 0; }
  .reviews__top { flex-direction: column; align-items: flex-start; gap: 20px; }
  .reviews__featured { flex-direction: column; text-align: left; padding: 32px 24px; gap: 20px; }
  .reviews__trustpilot {
    width: 100%; display: grid; grid-template-columns: 1fr auto;
    row-gap: 6px; align-items: center;
  }
  .reviews__tp-title { margin-bottom: 0; }
  .reviews__tp-stars { margin-bottom: 0; }
  .reviews__tp-score {
    grid-column: 2; grid-row: 1 / span 2;
    display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  }

  .reviews__featured-left { 
    border-right: none; border-bottom: none; 
    padding-right: 0; padding-bottom: 0; min-width: auto; 
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; 
    column-gap: 16px; align-items: center; justify-content: start; justify-items: start; text-align: left; width: 100%;
  }
  .reviews__avatar--lg { margin-bottom: 0; grid-column: 1; grid-row: 1 / span 2; }
  .reviews__featured-name { margin-bottom: 2px; grid-column: 2; grid-row: 1; align-self: end; text-align: left; width: 100%; }
  .reviews__featured-stars { grid-column: 2; grid-row: 2; align-self: start; justify-content: flex-start; }
  .reviews__featured-right { font-size: 17px; }
  .reviews__featured-right blockquote { text-align: left; }
  .reviews__card { min-width: calc(100% - 4px); width: calc(100% - 4px); }
  
  /* Pricing Dynamic */
  .pricing-dynamic { padding: 64px 0; }
  .pricing-dynamic__grid { grid-template-columns: 1fr; gap: 40px; }
  .pricing-dynamic__sub-cards { grid-template-columns: 1fr; }


    .what-is__copy{max-width: 100% !important;}

  /* Tooltip Mobile Fix - Centered relative to list item */
  .tooltip-wrap {
    position: static;
  }
  .plan-card__features li,
  .covered__row {
    position: relative;
  }
  .tooltip-content {
    left: 0;
    right: 0;
    margin: 0 auto;
            border: 1px solid #efefef;
    transform: none;
    width: max-content;
    max-width: 100%;
    text-align: center;
    bottom: calc(100% + 8px);
  }
  .tooltip-content::after {
    display: none;
  }
}

/* Default: on desktop, both covered columns visible; JS state has no effect. */
@media (min-width: 769px) {
  .covered__col { display: block !important; }

span.hl.hl--yellow.desktop:before {
    display: none !important;
}
}
/* ---------- Gap section ---------- */
@media (max-width: 768px) {
  .gap { padding: 56px 0; }
  .gap__head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 28px; }
  .gap__lede { margin-left: 0; justify-self: start; }
  .gap__title { font-size: 30px; }
  .gap__cards { grid-template-columns: 1fr; gap: 16px; }
  .gap-card { padding: 24px; }
  .gap-strip { display: none; }
}

