/* Home page: insurance network announcement + "is my insurance accepted?" lookup (template-parts/insurance-network.php). */
.emg-net {
  --net-ground: #273C92;
  --net-surface: #31479f;
  --net-surface-hover: #3a52ad;
  --net-ink: #ffffff;
  --net-ink-soft: #d5dbf2;
  --net-accent: #00A5AE;
  --net-paper: #E8F5F0;
  --net-paper-ink: #1d2c6b;
  background: var(--net-ground);
  color: var(--net-ink);
  padding: 120px 0;
}
.emg-net, .emg-net * { text-transform: none; }

.emg-net__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 72px;
  align-items: start;
}

/* Story column */
.emg-net__title {
  font-family: norsal-bold;
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.2;
  color: var(--net-ink);
  margin: 0 0 24px;
}
html[lang^="en"] .emg-net__title { letter-spacing: -0.02em; line-height: 1.08; }

.emg-net__lead {
  font-size: 19px;
  line-height: 1.75;
  color: var(--net-ink);
  margin: 0 0 40px;
}

.emg-net__deal {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--net-paper);
  color: var(--net-paper-ink);
  border-radius: 20px;
  padding: 24px;
  margin: 0 0 40px;
}
.emg-net__deal-logo {
  flex: 0 0 88px;
  height: 88px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.emg-net__deal-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.emg-net__deal-title {
  font-family: norsal-bold;
  font-size: 21px;
  line-height: 1.45;
  color: var(--net-paper-ink);
  margin: 0 0 8px;
}
.emg-net__deal p { font-size: 16px; line-height: 1.7; margin: 0; color: var(--net-paper-ink); }

.emg-net__close {
  font-size: 17px;
  line-height: 1.75;
  margin: 0 0 32px;
  color: var(--net-ink);
}
.emg-net__close strong {
  display: block;
  font-family: norsal-bold;
  font-weight: normal;
  font-size: 22px;
  margin-top: 12px;
}

.emg-net__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 32px;
  border-radius: 999px;
  background: #fff;
  color: var(--net-ground);
  font-family: norsal-bold;
  font-size: 17px;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
.emg-net__cta:hover { background: var(--net-paper); color: var(--net-ground); transform: translateY(-2px); text-decoration: none; }
.emg-net__cta:active { transform: translateY(0) scale(.98); }

/* Lookup column */
.emg-net__label {
  display: block;
  font-family: norsal-bold;
  font-size: 24px;
  line-height: 1.4;
  margin: 0 0 14px;
  color: var(--net-ink);
}
.emg-net__field { position: relative; }
.emg-net__field svg {
  position: absolute;
  inset-inline-start: 22px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--net-ground);
  stroke-width: 2.2;
  stroke-linecap: round;
  pointer-events: none;
}
.emg-net__field input {
  width: 100%;
  height: 62px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--net-paper-ink);
  font-size: 18px;
  padding-inline: 58px 24px;
  -webkit-appearance: none;
  appearance: none;
}
.emg-net__field input::placeholder { color: #5d6683; }
.emg-net__field input:focus { outline: 3px solid var(--net-accent); outline-offset: 3px; }
.emg-net__field input::-webkit-search-cancel-button { cursor: pointer; }

.emg-net__status {
  font-size: 16px;
  line-height: 1.6;
  margin: 16px 0 20px;
  color: var(--net-ink);
}

.emg-net__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.emg-net__item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--net-surface);
  transition: background-color .18s ease, transform .18s ease;
}
.emg-net__item[hidden] { display: none; }
.emg-net__item:hover { background: var(--net-surface-hover); transform: translateY(-2px); }
.emg-net__logo {
  flex: 0 0 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emg-net__logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.emg-net__logo:has(.emg-net__shield) { background: var(--net-paper); }
.emg-net__shield {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--net-ground);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.emg-net__others {
  display: flex;
  align-items: center;
  min-height: 84px;
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--net-paper);
  color: var(--net-paper-ink);
  font-size: 15px;
  line-height: 1.6;
}
.emg-net__others[hidden] { display: none; }
.emg-net__more {
  display: none;
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--net-surface);
  color: var(--net-ink);
  font-family: norsal-bold;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  transition: background-color .18s ease;
}
.emg-net__more:hover { background: var(--net-surface-hover); }
.emg-net__more:focus-visible { outline: 3px solid var(--net-accent); outline-offset: 3px; }
.emg-net__name { font-size: 16px; line-height: 1.5; color: var(--net-ink); }
.emg-net__name small { display: block; font-size: 14px; line-height: 1.5; color: var(--net-ink-soft); margin-top: 2px; }

.emg-net__empty {
  margin: 4px 0 0;
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--net-paper);
  color: var(--net-paper-ink);
  font-size: 17px;
  line-height: 1.7;
}
.emg-net__empty[hidden] { display: none; }
.emg-net__empty a { color: var(--net-ground); font-family: norsal-bold; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

.emg-net a:focus-visible { outline: 3px solid var(--net-accent); outline-offset: 3px; }

/* Entrance: only when the script runs and motion is allowed; content is visible without it. */
@media (prefers-reduced-motion: no-preference) {
  .emg-net.is-armed [data-reveal],
  .emg-net.is-armed .emg-net__item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1), background-color .18s ease;
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  .emg-net.is-in [data-reveal],
  .emg-net.is-in .emg-net__item { opacity: 1; transform: none; }
  .emg-net.is-in .emg-net__item:hover { transform: translateY(-2px); transition-delay: 0s; }
}

@media (max-width: 991.98px) {
  .emg-net { padding: 80px 0; }
  /* One column: the lookup moves up under the intro, since "is my insurance accepted?" comes first on a phone. */
  .emg-net__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .emg-net__story { display: contents; }
  .emg-net__title { order: 1; }
  .emg-net__lead { order: 2; }
  .emg-net__lookup { order: 3; margin-bottom: 56px; }
  .emg-net__deal { order: 4; }
  .emg-net__close { order: 5; }
  .emg-net__cta { order: 6; justify-self: start; }
}
@media (max-width: 575.98px) {
  .emg-net { padding: 64px 0; }
  .emg-net__lead { font-size: 17px; }
  .emg-net__deal { padding: 18px; gap: 14px; }
  .emg-net__deal-logo { flex-basis: 64px; height: 64px; }
  .emg-net__deal-title { font-size: 18px; }
  .emg-net__label { font-size: 21px; }
  .emg-net__list { grid-template-columns: minmax(0, 1fr); }
  .emg-net__item { min-height: 72px; }
  .emg-net__logo { flex-basis: 56px; height: 56px; }
  .emg-net__cta { width: 100%; }
  /* Long list on a phone: first rows, then "show all" (the script marks the rest; searching always shows matches). */
  .emg-net__list:not(.is-open):not(.is-searching) .is-more,
  .emg-net__list:not(.is-open):not(.is-searching) [data-others] { display: none; }
  .emg-net__more:not([hidden]) { display: block; }
}
