/* === NATIONAL PAGE === */

/* CITY PICKER */
.city-picker { max-width: 760px; margin: 0; }
.city-picker-label { font-size: var(--type-ui); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue-dark); margin-bottom: 14px; text-align: left; }
.city-search-row { margin-bottom: 20px; }
.city-search-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 1.05rem;
  font-family: var(--font);
  background: #fff;
  border: 2px solid var(--blue);
  border-radius: 12px;
  color: var(--text);
  box-shadow: 0 4px 16px rgba(64,126,201,0.12);
  transition: box-shadow var(--transition), border-color var(--transition);
  -webkit-appearance: none;
}
.city-search-input::placeholder { color: var(--text-faint); }
.city-search-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 6px 24px rgba(246,141,46,0.18);
}
.city-grid-empty {
  text-align: center;
  padding: 24px 20px;
  background: rgba(64,126,201,0.06);
  border: 1px dashed rgba(64,126,201,0.35);
  border-radius: 12px;
  color: var(--text);
  margin-bottom: 32px;
}
.city-grid-empty p { margin: 0; }
.city-grid-empty .text-link { color: var(--blue); font-weight: 700; text-decoration: underline; }
/* The homepage JS toggles .hidden on these two; without this rule the
   "no city matches" box was visible on first load before anyone typed. */
.city-grid.hidden, .city-grid-empty.hidden { display: none; }
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.city-card.hidden { display: none; }
.city-card { min-width: 0; background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 24px; cursor: pointer; transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition); text-align: center; text-decoration: none; color: var(--text); display: block; overflow-wrap: anywhere; }
.city-card:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); text-decoration: none; }
.city-card.live { border-color: rgba(64,126,201,0.3); }
.city-card.building { border-style: dashed; opacity: 0.7; }
.city-name { min-width: 0; overflow-wrap: anywhere; font-size: 1.15rem; font-weight: 700; color: var(--heading); margin-bottom: 4px; }
.city-state { max-width: 100%; font-size: var(--type-ui); color: var(--text-faint); margin-bottom: 10px; overflow-wrap: anywhere; }
.city-programs { max-width: 100%; font-size: var(--type-ui); font-weight: 600; color: var(--green); background: rgba(42,157,62,0.08); border: 1px solid rgba(42,157,62,0.2); border-radius: 4px; padding: 3px 10px; display: inline-block; white-space: normal; overflow-wrap: anywhere; }
.status-live { color: #fff; background: var(--green); }
.status-building { color: var(--orange-text); background: rgba(246,141,46,0.12); border: 1px solid rgba(246,141,46,0.3); }

/* HOMEPAGE BROWSE: popular metros + state-grouped accordion (replaces 575-wall) */
.popular-label { font-size: var(--type-ui); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin: 4px 0 12px; }
.popular-cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 28px; }
.popular-cities .city-card { padding: 16px; }
.browse-state-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--border); padding-top: 20px; margin-bottom: 14px; }
.browse-state-heading { font-size: 1.05rem; font-weight: 700; color: var(--heading); margin: 0; }
.browse-all-link { color: var(--blue); font-weight: 700; }
.state-accordion { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; align-items: start; }
.state-section { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); overflow: hidden; }
.state-section[open] { border-color: rgba(64,126,201,0.4); }
.state-toggle { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--heading); display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; min-height: 44px; box-sizing: border-box; list-style: none; }
.state-name,
.state-city-name { min-width: 0; overflow-wrap: anywhere; }
.state-toggle::-webkit-details-marker { display: none; }
.state-toggle::after { content: "+"; flex: 0 0 auto; font-size: 1.2rem; color: var(--text-faint); font-weight: 400; }
.state-section[open] .state-toggle::after { content: "\2212"; }
.state-toggle:hover { background: rgba(64,126,201,0.05); }
.state-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.state-count { flex: 0 0 auto; font-size: var(--type-ui); font-weight: 600; color: var(--green); background: rgba(42,157,62,0.08); border: 1px solid rgba(42,157,62,0.2); border-radius: 4px; padding: 2px 8px; margin-left: auto; margin-right: 12px; }
.state-cities { padding: 4px 8px 12px; display: flex; flex-direction: column; }
.state-city-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; min-height: 44px; box-sizing: border-box; border-radius: 6px; color: var(--text); text-decoration: none; font-size: var(--type-ui); }
.state-city-link:hover { background: rgba(64,126,201,0.08); color: var(--blue); text-decoration: none; }
.state-city-count,
.state-block-count { font-size: var(--type-ui); font-weight: 600; color: var(--text-faint); }

/* /cities SSR hub: every city by state (crawlable index) */
.cities-page-search { max-width: 720px; }
.page-hero .city-grid,
.page-hero .city-grid-empty { max-width: 720px; }
.cities-index { padding: 8px 0 56px; }
.state-block { margin-bottom: 26px; }
.state-block h2 { font-size: 1.12rem; color: var(--heading); border-bottom: 2px solid var(--border); padding-bottom: 8px; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.city-index-list { list-style: none; margin: 0; padding: 0; columns: 4; column-gap: 24px; }
.city-index-list li { break-inside: avoid; }
.city-index-list a { display: block; padding: 7px 8px; min-height: 44px; box-sizing: border-box; color: var(--blue); text-decoration: none; border-radius: 6px; font-size: var(--type-ui); }
.city-index-list a:hover { background: rgba(64,126,201,0.08); text-decoration: underline; }
@media (max-width: 900px) { .city-index-list { columns: 2; } }
@media (max-width: 520px) { .city-index-list { columns: 1; } }

/* STATS */
.stats-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 48px; padding: 40px 0; margin-top: 48px; border-top: 1px solid var(--border); }
.stat { flex: 1 1 10rem; min-width: 0; text-align: center; }
.stat-number { font-size: 2.4rem; font-weight: 800; color: var(--blue); line-height: 1; overflow-wrap: anywhere; }
.stat-label { font-size: var(--type-ui); color: var(--text-faint); margin-top: 4px; }

/* HOW IT WORKS */
.how-section { padding: 64px 0; background: var(--bg-alt); }
.how-section h2 { font-size: 2rem; font-weight: 800; text-align: center; margin-bottom: 36px; }
.how-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; max-width: 1120px; margin: 0 auto; }
.how-step { min-width: 0; text-align: center; overflow-wrap: anywhere; }
.how-number { width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 1.3rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.how-step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.how-step p { font-size: var(--type-body); line-height: var(--leading-body); color: var(--text-faint); }
.how-section .hero-quiz-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 30px auto 0; }

/* CTA */
.page-discovery main > .cta-section { padding: 56px 0; background: var(--blue); }
.cta-section h2 { font-size: 2rem; font-weight: 800; margin-bottom: 16px; }
.cta-section p { font-size: 1.1rem; color: #fff; opacity: 0.92; max-width: 500px; margin: 0 auto 32px; }
.page-discovery .cta-btn { display: inline-block; background: #fff; color: var(--blue); font-weight: 700; font-size: var(--type-ui); padding: 16px 36px; border-radius: 8px; text-decoration: none; transition: background-color var(--transition), box-shadow var(--transition), color var(--transition), transform var(--transition); }
.page-discovery .cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); text-decoration: none; }
.cta-form { max-width: 720px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-items: end; }
.cta-form-field { min-width: 0; text-align: left; }
.cta-form-field label { display: block; margin-bottom: 6px; color: #fff; font-size: var(--type-ui); font-weight: 700; }
.cta-form input { width: 100%; padding: 14px 18px; border: 2px solid transparent; border-radius: 8px; background: #ffffff; color: #1e293b; font-size: var(--type-ui); font-family: var(--font); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.cta-form .cf-turnstile { grid-column: 1 / -1; display: flex; justify-content: center; }
.cta-form input::placeholder { color: #64748b; }
.cta-form input:focus { outline: none; border-color: var(--blue); background: #ffffff; box-shadow: 0 0 0 3px rgba(45,95,158,0.22); }
.cta-form button { grid-column: 1 / -1; justify-self: center; width: auto; min-width: 180px; padding: 13px 24px; border: none; border-radius: 8px; background: var(--orange); color: #1a1a1a; font-family: var(--font); font-size: var(--type-ui); font-weight: 700; white-space: nowrap; cursor: pointer; transition: background-color var(--transition); }
.cta-form button:hover { background: var(--brand-orange); box-shadow: 0 6px 20px rgba(246,141,46,0.35); }
.notify-result { margin-top: 16px; font-size: var(--type-ui); }

@media (max-width: 700px) {
  .how-grid { grid-template-columns: 1fr; gap: 24px; }
  .stats-bar { flex-wrap: wrap; gap: 24px; }
  .cta-form { grid-template-columns: 1fr; }
  .cta-form-field, .cta-form input { width: 100%; min-width: 0; }
  .city-grid { grid-template-columns: 1fr 1fr; }
}
html.text-resized .popular-cities,
html.text-resized .city-grid { grid-template-columns: minmax(0, 1fr); }
html.text-resized .how-grid { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 480px) {
  .city-grid { grid-template-columns: 1fr; }
}
