/* ==========================================================================
   Module 18 — State-wise Popular Services
   Covers: homepage "state spotlight" highlighted section, states/index.html
   hub grid, and states/state.html detail page (service cards + official
   portal block). Built on top of design tokens from style.css — link this
   file AFTER style.css (and after module7.css on the two states/ pages).
   ========================================================================== */

.new-badge {
  display: inline-block;
  background: var(--color-accent-saffron);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* ---------- Homepage spotlight section ---------- */
.state-spotlight {
  background: var(--color-primary);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .state-spotlight { background: #0E1826; border: 1px solid var(--color-border); }
.state-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tricolor);
  opacity: 0.06;
  pointer-events: none;
}
.state-spotlight__head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}
.state-spotlight__head h2 {
  color: #ffffff;
  margin: 0 0 6px;
  font-size: 1.4rem;
}
.state-spotlight__head p {
  color: rgba(255,255,255,0.72);
  max-width: 58ch;
  margin: 0;
  font-size: 0.95rem;
}
.state-spotlight .new-badge { margin-bottom: 0; }
.state-spotlight__viewall {
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s;
}
.state-spotlight__viewall:hover { background: rgba(255,255,255,0.1); }

.state-spotlight-grid {
  position: relative;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.state-spotlight-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 16px 18px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.state-spotlight-card:hover { transform: translateY(-2px); background: rgba(255,255,255,0.1); }
.state-spotlight-card__icon { font-size: 1.5rem; }
.state-spotlight-card__name { color: #ffffff; font-weight: 600; font-family: var(--font-display); }
.state-spotlight-card__sub { color: rgba(255,255,255,0.65); font-size: 0.82rem; font-family: var(--font-mono); }
.state-spotlight-card__list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255,255,255,0.8);
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.state-spotlight-card__list li::before { content: "•  "; color: var(--color-accent-saffron); }
.state-spotlight-card__arrow {
  margin-top: 10px;
  color: var(--color-accent-saffron);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------- states/index.html hub ---------- */
.state-hub-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 1.5rem 0 2.5rem;
}
.state-hub-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 3px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.state-hub-card:hover, .state-hub-card:focus-visible {
  transform: translateY(-2px);
  border-top-color: var(--color-accent-saffron);
}
.state-hub-card__icon { font-size: 1.8rem; }
.state-hub-card__name { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--color-primary); }
.state-hub-card__count { font-size: 0.82rem; color: var(--color-text-muted); }
.state-hub-card__arrow { margin-top: auto; font-family: var(--font-mono); font-size: 0.8rem; color: var(--color-accent-green); }

.state-hub-soon-title { font-size: 1.05rem; color: var(--color-text-muted); margin-top: 1.5rem; }
.state-hub-grid--soon .state-hub-card--soon {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}
.state-hub-card__soon-label {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  border-radius: 999px;
  padding: 3px 10px;
  display: inline-block;
  width: fit-content;
}

/* ---------- states/state.html detail page ---------- */
.state-hero { position: relative; }
.state-hero__icon { font-size: 2.6rem; margin-bottom: 6px; }
.state-hero__meta { color: var(--color-text-muted); font-size: 0.85rem; margin-top: 8px; }

.state-services-list { margin: 1.5rem 0 3rem; }

/* Official state portal — intentionally styled as a calm closing block,
   not a loud top-of-page CTA, so it sits after the reading content. */
.state-official-portal {
  max-width: 68ch;
  margin: 0 0 3rem;
  padding: 24px 26px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent-green);
  border-radius: 10px;
}
.state-official-portal h2 { font-size: 1.1rem; margin: 0 0 8px; }
.state-official-portal p { color: var(--color-text-muted); font-size: 0.9rem; margin: 0 0 14px; }

@media (max-width: 640px) {
  .state-spotlight { padding: 22px; }
  .state-service-card__meta { grid-template-columns: 1fr; }
}
