/* ============================================================
   CST Academy Home v3 (private preview) — hero + stat strip
   Loaded after home1/cst-home-base.css + home1/cst-home1.css.
   Scoped under .cst-home-page. GF's own CSS is active on the
   homepage, so the form rules below use !important to win.
   ============================================================ */

/* ===== Hero (photo fills the right half of the page) ===== */
/* position/z-index keep the form's open dropdown layered above the stat strip;
   no overflow:hidden so a dropdown near the hero's bottom isn't clipped. */
.cst-home-page .h3-hero { background: #E9F1FB; padding: 0; position: relative; z-index: 2; }
.cst-home-page .h3-hero-grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 1000px) {
  .cst-home-page .h3-hero-grid { grid-template-columns: 1fr 1fr; align-items: stretch; min-height: 600px; }
}

/* Left copy: left edge aligns with the site container (.wrap = 88% / max 1200px) */
.cst-home-page .h3-hero-copy { padding: 40px 24px 44px; align-self: center; }
@media (min-width: 1000px) {
  .cst-home-page .h3-hero-copy {
    padding-top: 52px; padding-bottom: 52px; padding-right: 28px;
    padding-left: max(6vw, calc((100vw - var(--maxw, 1200px)) / 2));
  }
}

/* H1 = SEO heading, shown as a small kicker above the decorative headline */
.cst-home-page .h3-eyebrow {
  display: flex; align-items: center; gap: 7px;
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 13px; line-height: 1.2; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--purple, #49264F); margin: 0 0 14px;
}
.cst-home-page .h3-eyebrow-ico { display: inline-flex; flex: 0 0 auto; }
.cst-home-page .h3-eyebrow-ico svg { width: 17px; height: 17px; stroke-width: 2; }

/* headline (decorative; no longer the page H1) */
.cst-home-page .h3-hero-headline {
  font-family: 'Poppins', sans-serif; font-weight: 800;
  color: #163A4C; line-height: 1.04; letter-spacing: -0.01em;
  font-size: clamp(30px, 3.4vw, 48px); margin: 0 0 22px;
}
/* Rotating (typed) service word: one line, tight highlighter + blinking caret */
.cst-home-page .h3-rotate {
  display: inline-block; white-space: nowrap;
  background: #FFE16A; color: #49264F;
  padding: 0.04em 0.16em; border-radius: 7px; line-height: 1.1;
}
.cst-home-page .h3-rotate::after {
  content: '|'; margin-left: 3px; color: #49264F; font-weight: 700;
  animation: h3caret 1.05s steps(1) infinite;
}
@keyframes h3caret { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cst-home-page .h3-rotate::after { display: none; } }

.cst-home-page .h3-hero-sub {
  color: #4A5875; font-size: 18px; line-height: 1.6;
  max-width: 34em; margin: 0 0 26px;
}

.cst-home-page .h3-hero-pills { display: flex; flex-wrap: wrap; gap: 12px; }
.cst-home-page .h3-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: #22314F;
  border: 1px solid #CFDCEC; border-radius: 999px;
  padding: 11px 15px; font-family: 'Poppins', sans-serif;
  font-weight: 600; font-size: 15px; text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.cst-home-page .h3-pill:hover { border-color: #49264F; box-shadow: 0 6px 18px rgba(73,38,79,.16); transform: translateY(-1px); }
.cst-home-page .h3-pill span { color: #3B7EAB; }
.cst-home-page .h3-pill-arr { display: inline-flex; align-items: center; }
.cst-home-page .h3-pill-arr svg { width: 15px; height: 15px; }

/* ===== Right column: photo full-bleed to the viewport right edge ===== */
.cst-home-page .h3-hero-media {
  position: relative;
  background: #163A4C url("CST_ABA-050.webp") center 24% / cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  padding: 30px; min-height: 360px;
}
@media (min-width: 1000px) { .cst-home-page .h3-hero-media { min-height: 0; padding: 40px; justify-content: flex-end; } }

.cst-home-page .h3-hero-card {
  background: #3B7EAB; color: #fff;              /* form blue */
  border-radius: 18px; padding: 26px 24px 22px;
  width: 100%; max-width: 380px;
  box-shadow: 0 20px 50px rgba(0,0,0,.34);
}
.cst-home-page .h3-hero-card h2 { font-family: 'Poppins', sans-serif; font-weight: 800; color: #fff; font-size: 24px; line-height: 1.15; margin: 0 0 6px; }
.cst-home-page .h3-hero-card-sub { color: rgba(255,255,255,.9); font-size: 14.5px; margin: 0 0 16px; }
.cst-home-page .h3-hero-card-foot { color: rgba(255,255,255,.92); font-size: 14px; text-align: center; margin: 12px 0 0; }
.cst-home-page .h3-hero-card-foot a { color: #fff; font-weight: 700; }

/* ===== Gravity Form 29 inside the card — overrides (GF CSS active) ===== */
.cst-home-page .h3-hero-gf .gform_heading { display: none; }
.cst-home-page .h3-hero-gf .gfield_label,
.cst-home-page .h3-hero-gf legend.gfield_label { color: #fff !important; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 13px; margin: 0 0 5px; }
.cst-home-page .h3-hero-gf .gfield_required { color: #FFD27A !important; }

.cst-home-page .h3-hero-gf input[type="text"],
.cst-home-page .h3-hero-gf input[type="email"],
.cst-home-page .h3-hero-gf input[type="tel"],
.cst-home-page .h3-hero-gf input[type="number"],
.cst-home-page .h3-hero-gf textarea {
  width: 100% !important; box-sizing: border-box !important;
  background: #fff !important; color: #22314F !important;
  border: 1px solid #d7e0ec !important; border-radius: 10px !important;
  padding: 12px 14px !important; font-size: 15px !important; line-height: 1.3 !important; height: auto !important;
}
.cst-home-page .h3-hero-gf select {
  width: 100% !important; box-sizing: border-box !important;
  color: #22314F !important; font-size: 15px !important; line-height: 1.3 !important;
  border: 1px solid #d7e0ec !important; border-radius: 10px !important;
  padding: 12px 38px 12px 14px !important; height: auto !important;
  -webkit-appearance: none !important; -moz-appearance: none !important; appearance: none !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2322314F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 13px center !important; background-size: 14px !important;
}
.cst-home-page .h3-hero-gf input::placeholder,
.cst-home-page .h3-hero-gf textarea::placeholder { color: #8494ab; }
.cst-home-page .h3-hero-gf input:focus,
.cst-home-page .h3-hero-gf select:focus,
.cst-home-page .h3-hero-gf textarea:focus { outline: none !important; border-color: #fff !important; box-shadow: 0 0 0 3px rgba(255,255,255,.35) !important; }

.cst-home-page .h3-hero-gf .gform_footer { margin: 14px 0 0 !important; padding: 0 !important; }
.cst-home-page .h3-hero-gf .gform_footer input[type="submit"],
.cst-home-page .h3-hero-gf .gform_button {
  width: 100% !important; background: #163A4C !important; color: #fff !important;
  border: 0 !important; border-radius: 12px !important; padding: 15px 18px !important;
  font-family: 'Poppins', sans-serif !important; font-weight: 700 !important; font-size: 16px !important;
  cursor: pointer !important; transition: background .15s ease;
}
.cst-home-page .h3-hero-gf .gform_footer input[type="submit"]:hover,
.cst-home-page .h3-hero-gf .gform_button:hover { background: #0F2A38 !important; }
.cst-home-page .h3-hero-gf .gform_validation_container,
.cst-home-page .h3-hero-gf .gfield_visibility_hidden { display: none !important; }
.cst-home-page .h3-hero-gf .gform_confirmation_message { color: #fff; }

/* ============================================================
   Stat strip (navy, count-up, each stat clickable)
   ============================================================ */
.cst-home-page .h3-stats { background: #163A4C; padding: 30px 0; }
.cst-home-page .h3-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cst-home-page a.h3-stat {
  display: flex; flex-direction: column; gap: 4px; padding: 8px 12px;
  text-decoration: none; color: inherit; border-radius: 12px;
  transition: background .15s ease;
}
.cst-home-page a.h3-stat:hover { background: rgba(255,255,255,.07); }
.cst-home-page .h3-stat { border-left: 1px solid rgba(255,255,255,.14); }
.cst-home-page .h3-stat-num {
  font-family: 'Poppins', sans-serif; font-weight: 800;
  color: #fff; font-size: clamp(30px, 3.4vw, 42px); line-height: 1;
}
/* 97% and 8 -> light violet; 387% and In-network -> light blue */
.cst-home-page .h3-stat:nth-child(1) .h3-stat-num,
.cst-home-page .h3-stat:nth-child(3) .h3-stat-num { color: #FFE16A; }
.cst-home-page .h3-stat:nth-child(2) .h3-stat-num { color: #6CB2E6; }
.cst-home-page .h3-stat-num.h3-stat-word { font-size: clamp(26px, 3vw, 38px); color: #6CB2E6; }
.cst-home-page .h3-stat-label { font-family: 'Poppins', sans-serif; font-weight: 700; color: #fff; font-size: 15px; margin-top: 4px; }
.cst-home-page .h3-stat-sub { color: rgba(255,255,255,.72); font-size: 13px; }
.cst-home-page .h3-stars { color: #F5A623; letter-spacing: 1px; }

@media (max-width: 860px) {
  .cst-home-page .h3-stats-row { grid-template-columns: repeat(2, 1fr); gap: 22px 18px; }
  .cst-home-page .h3-stat:nth-child(odd) { border-left: 0; }
}
@media (max-width: 480px) {
  .cst-home-page .h3-stats-row { grid-template-columns: 1fr; }
  .cst-home-page .h3-stat { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); padding-top: 16px; }
  .cst-home-page .h3-stat:first-child { border-top: 0; padding-top: 8px; }
}

/* ============================================================
   Custom styled dropdown (hero form, desktop only).
   JS replaces the native <select> popup with this so the open
   list matches the form AND long options wrap instead of
   spilling past the card. The real <select> stays in the DOM
   (hidden) so Gravity Forms submits/validates as normal.
   On touch devices the native picker is kept (no JS enhance).
   ============================================================ */
.cst-home-page .h3-sel { position: relative; }
.cst-home-page .h3-sel > select { display: none !important; }

.cst-home-page .h3-sel-btn {
  width: 100% !important; box-sizing: border-box !important;
  display: flex !important; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff !important; color: #22314F !important; text-align: left !important;
  border: 1px solid #d7e0ec !important; border-radius: 10px !important;
  padding: 12px 14px !important; height: auto !important; min-height: 0 !important;
  font-family: 'Poppins', sans-serif !important; font-size: 15px !important; font-weight: 400 !important; line-height: 1.3 !important;
  cursor: pointer; box-shadow: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.cst-home-page .h3-sel-btn:hover { background: #fff !important; border-color: #b9c9dc !important; }
.cst-home-page .h3-sel.is-open .h3-sel-btn,
.cst-home-page .h3-sel-btn:focus-visible {
  outline: none !important; border-color: #fff !important; box-shadow: 0 0 0 3px rgba(255,255,255,.35) !important;
}
.cst-home-page .h3-sel-txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cst-home-page .h3-sel-txt.is-placeholder { color: #8494ab; }
.cst-home-page .h3-sel-chev { flex: 0 0 auto; display: inline-flex; color: #22314F !important; transition: transform .18s ease; }
.cst-home-page .h3-sel-chev svg { width: 16px; height: 16px; display: block; }
.cst-home-page .h3-sel.is-open .h3-sel-chev { transform: rotate(180deg); }

.cst-home-page .h3-sel-list {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0;
  margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid #d7e0ec; border-radius: 12px;
  box-shadow: 0 16px 42px rgba(10,30,50,.32);
  max-height: 264px; overflow-y: auto;
}
.cst-home-page .h3-sel-opt {
  padding: 10px 12px; border-radius: 8px; color: #22314F;
  font-family: 'Poppins', sans-serif; font-size: 14.5px; line-height: 1.35;
  cursor: pointer; white-space: normal;           /* long options wrap, never overflow */
}
.cst-home-page .h3-sel-opt + .h3-sel-opt { margin-top: 2px; }
.cst-home-page .h3-sel-opt.is-active { background: #163A4C; color: #fff; }
.cst-home-page .h3-sel-opt.is-selected { font-weight: 600; }
.cst-home-page .h3-sel-opt.is-selected.is-active { color: #fff; }
