/**
 * Forefind — Locations page.
 *
 * Visual fidelity pass: re-themes this page to the actual mockup design
 * (forefind-locations.html) — navy/teal palette, DM Sans display type over
 * an Inter body face, 6/10/16/24 radius scale — instead of the shared
 * emerald/flat forefind-ui.css look. Everything here is scoped under
 * `.forefind-locations` so forefind-ui.css and the other redesigned pages
 * (which load it as a dependency) are untouched. Structural rules (reset,
 * layout, section-heading skeleton, buttons) still come from forefind-ui.css;
 * this file overrides the *tokens* consumed by that shared CSS and adds the
 * page-specific component styling the mockup uses (hero glow, featured city
 * bento, state grid, A–Z directory).
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ── TOKENS (mockup palette: --navy #0B1F3A / --teal #0D9B76) ── */
.forefind-locations {
  --ff-brand:        #0D9B76;
  --ff-brand-dark:   #0b8a68;
  --ff-brand-soft:   #E8F8F3;
  --ff-brand-mid:    #B2E8D8;
  --ff-brand-ondark: #4ECCA3;

  --ff-ink:   #0B1F3A;
  --ff-body:  #4A5568;
  --ff-muted: #8E97A8;
  --ff-faint: #9AA0AB;

  --ff-border:        #E2E4EA;
  --ff-border-strong: #C8CBD6;
  --ff-hairline:      #E2E4EA;
  --ff-surface:   #F4F5F8;
  --ff-surface-2: #EDEEF2;
  --ff-white:     #FFFFFF;

  --ff-dark:   #0B1F3A;
  --ff-dark-2: #1A3558;

  --ff-amber:      #F59E0B;
  --ff-amber-soft: #FEF3C7;
  --ff-amber-line: #FBDFA4;

  --ff-r-sm: 6px;
  --ff-r-md: 10px;
  --ff-r-lg: 16px;
  --ff-r-xl: 24px;
  --ff-r-pill: 999px;

  --ff-shadow:    0 1px 2px rgba(11,31,58,.05);
  --ff-shadow-md: 0 14px 32px -18px rgba(11,31,58,.28);

  --ff-font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --ff-font-display: 'DM Sans', 'Inter', sans-serif;
  --ff-font-mono:    'DM Mono', 'SFMono-Regular', Consolas, monospace;
}

/* forefind-ui.css sets headings/labels with `font-family: var(--ff-font)`
   directly (one shared typeface). The mockup pairs a DM Sans display face
   on headings/numerals/UI chrome with Inter for running copy — restore that
   split here without editing the shared file. */
.forefind-locations .page-title,
.forefind-locations .sec-title,
.forefind-locations .section-title,
.forefind-locations .hero-stat-val,
.forefind-locations .hstat-val,
.forefind-locations .state-name,
.forefind-locations .state-count,
.forefind-locations .city-name,
.forefind-locations .city-group-letter,
.forefind-locations .city-link-name,
.forefind-locations .city-link-count,
.forefind-locations .city-count-badge,
.forefind-locations .dir-tab,
.forefind-locations .alpha-btn {
  font-family: var(--ff-font-display);
}

/* ── HERO ── dark split banner: content left, photo panel right, matching
   the mockup's actual final cascade (its CSS layers several hero variants
   in source order — light banner, then modern, then this dark split-image
   version last, which is what the markup's .page-hero-media div renders).
   The other three inner pages (Industry/Investment/Popular Searches) all use
   the same pattern, so this also restores cross-page consistency. */
.forefind-locations .page-hero {
  position: relative;
  overflow: hidden;
  background: #0E1117;
  min-height: 460px;
  display: flex;
  align-items: center;
}
.forefind-locations .page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 120% at 10% -10%, rgba(13,155,118,.30), transparent 55%),
    radial-gradient(90% 90% at 38% 130%, rgba(245,158,11,.12), transparent 55%);
}
.forefind-locations .page-hero-media {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 44%;
  z-index: 0;
  background-image: url('https://images.unsplash.com/photo-1529253355930-ddbe423a2ac7?w=1000&q=80&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
}
.forefind-locations .page-hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0E1117 0%, rgba(14,17,23,.72) 24%, rgba(14,17,23,.12) 62%, rgba(14,17,23,.42) 100%);
}
.forefind-locations .page-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}
.forefind-locations .page-hero-content > * { max-width: 600px; }
.forefind-locations .page-title { color: #fff; letter-spacing: -.03em; }
.forefind-locations .page-title span { color: #30B94A; }
.forefind-locations .page-sub { color: rgba(255,255,255,.62); }
.forefind-locations .breadcrumb { color: rgba(255,255,255,.5); }
.forefind-locations .breadcrumb a { color: rgba(255,255,255,.62); }
.forefind-locations .breadcrumb a:hover { color: var(--ff-brand-ondark); }
.forefind-locations .hero-stat-val { color: #fff; }
.forefind-locations .hero-stat-label { color: rgba(255,255,255,.55); }
@media (max-width: 980px) {
  .forefind-locations .page-hero-media { display: none; }
  .forefind-locations .page-hero-content > * { max-width: none; }
  .forefind-locations .page-hero { min-height: auto; display: block; padding: 40px 0; }
}

/* ── FEATURED CITIES (image bento) ── */
.forefind-locations .featured-section { padding: 88px 0 44px; background: var(--ff-surface); }
.forefind-locations .featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 180px; gap: 16px; }
.forefind-locations .city-card {
  border-radius: var(--ff-r-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--ff-ink);
  border: 1px solid var(--ff-border);
  display: block;
  transition: transform .2s ease, box-shadow .2s ease;
}
.forefind-locations .city-card:hover { transform: translateY(-4px); box-shadow: var(--ff-shadow-md); }
.forefind-locations .city-card.featured { grid-column: span 2; grid-row: span 2; }
.forefind-locations .city-card-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 22px;
  position: relative;
  min-height: 150px;
}
/* Overlay is functional — keeps the label legible over the photo. */
.forefind-locations .city-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,31,58,.92) 0%, rgba(11,31,58,.30) 55%, rgba(11,31,58,.05) 100%);
  transition: background .2s;
}
.forefind-locations .city-card:hover .city-overlay {
  background: linear-gradient(to top, rgba(11,31,58,.95) 0%, rgba(11,31,58,.4) 60%, rgba(11,31,58,.1) 100%);
}
.forefind-locations .city-card-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform .45s ease;
}
.forefind-locations .city-card:hover .city-card-bg-img { transform: scale(1.06); }
.forefind-locations .city-info { position: relative; z-index: 1; width: 100%; }
.forefind-locations .city-emoji { font-size: 26px; margin-bottom: 8px; display: block; }
.forefind-locations .city-card.featured .city-emoji { font-size: 38px; }
.forefind-locations .city-name {
  font-weight: 700;
  color: var(--ff-white);
  letter-spacing: -.01em;
  line-height: 1.15;
  font-size: 18px;
}
.forefind-locations .city-card.featured .city-name { font-size: 28px; letter-spacing: -.02em; margin-bottom: 4px; }
.forefind-locations .city-meta { font-size: 12px; color: rgba(255,255,255,.65); margin-top: 4px; }
.forefind-locations .city-card.featured .city-meta { font-size: 13px; }
.forefind-locations .city-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(13,155,118,.28);
  border: 1px solid rgba(13,155,118,.45);
  border-radius: var(--ff-r-pill);
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ff-brand-ondark);
  margin-top: 10px;
}
.forefind-locations .city-card.featured .city-count-badge { font-size: 12.5px; padding: 5px 13px; }
.forefind-locations .city-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ff-white);
  transition: background .15s, border-color .15s;
}
.forefind-locations .city-card:hover .city-arrow { background: var(--ff-brand); border-color: var(--ff-brand); }

/* ── STATE BROWSER ── */
.forefind-locations .state-section { padding: 44px 0; background: var(--ff-white); }
/* auto-fit + max-content: with few real states/cities (e.g. only 1 on a
   freshly-seeded site), unused tracks collapse to 0 instead of stretching a
   6-column grid's empty columns into a wide dead gap next to a single card. */
.forefind-locations .state-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, max-content)); gap: 14px; }
.forefind-locations .state-card {
  background: var(--ff-surface);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-r-md);
  padding: 16px 14px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  text-align: left;
  display: block;
}
.forefind-locations .state-card:hover {
  background: var(--ff-white);
  border-color: var(--ff-brand-mid);
  transform: translateY(-3px);
  box-shadow: var(--ff-shadow-md);
}
.forefind-locations .state-name { font-size: 13.5px; font-weight: 600; color: var(--ff-ink); margin-bottom: 4px; }
.forefind-locations .state-count { font-size: 11.5px; font-weight: 500; color: var(--ff-muted); }
.forefind-locations .state-card:hover .state-count { color: var(--ff-brand); }

/* ── FULL DIRECTORY ── */
.forefind-locations .directory-section { padding: 44px 0 80px; background: var(--ff-surface); }
.forefind-locations .dir-tabs {
  display: flex;
  gap: 8px;
  border-bottom: none;
  margin-bottom: 26px;
  background: transparent;
  overflow-x: auto;
  scrollbar-width: none;
}
.forefind-locations .dir-tabs::-webkit-scrollbar { display: none; }
.forefind-locations .dir-tab {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ff-muted);
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--ff-r-pill);
  cursor: pointer;
  transition: color .15s, background .15s, box-shadow .15s;
  background: none;
  flex-shrink: 0;
}
.forefind-locations .dir-tab:hover { color: var(--ff-ink); background: var(--ff-surface-2); }
.forefind-locations .dir-tab.active {
  color: var(--ff-white);
  background: var(--ff-brand);
  box-shadow: 0 4px 12px -3px rgba(13,155,118,.45);
}
.forefind-locations .alpha-index { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 26px; }
.forefind-locations .alpha-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ff-r-md);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--ff-border);
  background: var(--ff-white);
  color: var(--ff-body);
  cursor: pointer;
  transition: all .15s;
}
.forefind-locations .alpha-btn:hover { border-color: var(--ff-brand); color: var(--ff-brand); background: var(--ff-brand-soft); }
.forefind-locations .alpha-btn.active { background: var(--ff-brand); color: var(--ff-white); border-color: var(--ff-brand); }
.forefind-locations .alpha-btn.disabled { opacity: .3; cursor: default; pointer-events: none; }
.forefind-locations .city-group { margin-bottom: 32px; }
.forefind-locations .city-group.is-hidden { display: none; }
.forefind-locations .city-group-letter {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ff-muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ff-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.forefind-locations .city-group-letter > span:first-child {
  background: var(--ff-ink);
  color: var(--ff-white);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.forefind-locations .city-group-count { font-weight: 600; }
/* Same auto-fit fix as .state-grid — a sparsely-populated city group (e.g.
   "M — 1 city") shouldn't stretch a lone card across a 5-column-wide row. */
.forefind-locations .city-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, max-content)); gap: 12px; }
.forefind-locations .city-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: var(--ff-white);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-r-md);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  gap: 8px;
}
.forefind-locations .city-link.is-hidden { display: none; }
.forefind-locations .city-link:hover {
  border-color: var(--ff-brand-mid);
  background: var(--ff-brand-soft);
  transform: translateY(-2px);
  box-shadow: var(--ff-shadow-md);
}
.forefind-locations .city-link:hover .city-link-name,
.forefind-locations .city-link:hover .city-link-count { color: var(--ff-brand-dark); }
.forefind-locations .city-link-name { font-size: 14px; font-weight: 600; color: var(--ff-ink); transition: color .15s; }
.forefind-locations .city-link-count { font-size: 12px; font-weight: 600; color: var(--ff-muted); flex-shrink: 0; transition: color .15s; }
.forefind-locations .dir-empty { padding: 28px 0; font-size: 14px; color: var(--ff-muted); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .forefind-locations .featured-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 160px; }
  .forefind-locations .city-card.featured { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 768px) {
  .forefind-locations .featured-section { padding: 48px 0; }
  .forefind-locations .state-section { padding: 48px 0; }
  .forefind-locations .featured-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .forefind-locations .city-card.featured { grid-column: span 2; grid-row: span 1; }
  .forefind-locations .state-grid { grid-template-columns: repeat(auto-fit, minmax(130px, max-content)); }
  .forefind-locations .city-list { grid-template-columns: repeat(auto-fit, minmax(150px, max-content)); }
}
@media (max-width: 480px) {
  .forefind-locations .featured-grid { grid-template-columns: 1fr 1fr; }
  .forefind-locations .city-card.featured { grid-column: span 2; }
  .forefind-locations .state-grid { grid-template-columns: 1fr; }
  .forefind-locations .city-list { grid-template-columns: 1fr; }
}

/* ── STATIC LOCATION DIRECTORY (city / state / union territory) ── */
.forefind-locations .loc-static { padding: 56px var(--ff-gutter) 72px; }
.forefind-locations .loc-block + .loc-block { margin-top: 48px; }
.forefind-locations .loc-block__title {
  font-family: var(--ff-font);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  color: var(--ff-ink);
  letter-spacing: -.02em;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ff-border);
}
.forefind-locations .loc-block__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 24px;
}
.forefind-locations .loc-link {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  color: var(--ff-body);
  padding: 7px 0;
  text-decoration: none;
  transition: color .15s;
}
.forefind-locations .loc-link:hover { color: var(--ff-brand-dark); }

@media (max-width: 1024px) {
  .forefind-locations .loc-block__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .forefind-locations .loc-static { padding: 40px var(--ff-gutter) 52px; }
  .forefind-locations .loc-block__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forefind-locations .loc-block + .loc-block { margin-top: 36px; }
}
@media (max-width: 480px) {
  .forefind-locations .loc-block__grid { grid-template-columns: 1fr; gap: 2px; }
}
