:root {
  --nj-navy: #062F5F;
  --nj-navy-2: #031f40;
  --nj-teal: #0097A7;
  --nj-teal-2: #15b8c7;
  --nj-gold: #D6A12B;
  --nj-ink: #102A43;
  --nj-muted: #52677A;
  --nj-line: rgba(6, 47, 95, 0.12);
  --nj-bg: #f5f9fc;
  --nj-card: rgba(255, 255, 255, 0.92);
}

/* Keep the Net Justice pages clean and prevent theme page-title/header clutter. */
body.net-justice-managed-page .entry-header,
body.net-justice-managed-page .page-header,
body.net-justice-managed-page .wp-block-post-title,
body.net-justice-managed-page h1.entry-title,
body.net-justice-managed-page h1.page-title,
body.net-justice-managed-page .entry-title,
body.net-justice-managed-page .page-title {
  display: none !important;
}

/* Hide default theme headers on managed pages so the custom Net Justice nav is the only top bar. */
body.net-justice-managed-page .site-header,
body.net-justice-managed-page header.site-header,
body.net-justice-managed-page .wp-site-blocks > header,
body.net-justice-managed-page header.wp-block-template-part,
body.net-justice-managed-page .site-branding,
body.net-justice-managed-page .wp-block-site-title {
  display: none !important;
}

body.net-justice-managed-page {
  background:
    radial-gradient(circle at 10% 5%, rgba(0,151,167,.10), transparent 25%),
    radial-gradient(circle at 88% 2%, rgba(214,161,43,.12), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--nj-bg) 58%, #edf7fa 100%);
  color: var(--nj-ink);
}

body.net-justice-managed-page .wp-site-blocks,
body.net-justice-managed-page .site,
body.net-justice-managed-page .site-content,
body.net-justice-managed-page .content-area,
body.net-justice-managed-page main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Custom top navigation */
.nj-topbar {
  position: sticky;
  top: 0;
  z-index: 999;
  width: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(6, 47, 95, 0.10);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(6, 47, 95, 0.06);
}

.nj-topbar-inner {
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.nj-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  text-decoration: none !important;
  color: var(--nj-navy) !important;
}

.nj-brand img {
  width: 54px;
  height: auto;
  display: block;
}

.nj-brand strong {
  display: block;
  font-size: 1.12rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.nj-brand small {
  display: block;
  margin-top: 4px;
  color: var(--nj-muted);
  font-size: .76rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.nj-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-wrap: wrap;
}

.nj-nav a {
  color: var(--nj-navy) !important;
  text-decoration: none !important;
  font-size: .91rem;
  font-weight: 750;
  padding: 10px 10px;
  border-radius: 999px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nj-nav a:hover,
.nj-nav a:focus {
  background: rgba(0,151,167,.10);
  color: var(--nj-teal) !important;
  transform: translateY(-1px);
}

.nj-topbar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--nj-navy), var(--nj-teal));
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(6,47,95,.20);
  white-space: nowrap;
}

/* Main landing page */
.nj-site-wrap,
.nj-legal-page {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.nj-site-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 48px;
  color: var(--nj-ink);
}

.nj-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(247,252,253,.90)),
    radial-gradient(circle at 15% 20%, rgba(0,151,167,.18), transparent 35%),
    radial-gradient(circle at 85% 15%, rgba(214,161,43,.18), transparent 34%),
    #ffffff;
  border: 1px solid rgba(6, 47, 95, 0.10);
  border-radius: 34px;
  padding: clamp(34px, 5vw, 72px) 22px 48px;
  box-shadow: 0 28px 90px rgba(6, 47, 95, 0.13);
  isolation: isolate;
}

.nj-hero::before {
  content: "";
  position: absolute;
  inset: auto -18% -42% -18%;
  height: 300px;
  background: linear-gradient(135deg, rgba(6,47,95,.92), rgba(0,151,167,.80));
  border-radius: 999px 999px 0 0;
  opacity: .08;
  z-index: -1;
}

.nj-hero-logo {
  display: block;
  width: min(390px, 86vw);
  max-width: 100%;
  height: auto;
  margin: 0 auto 8px;
  filter: drop-shadow(0 12px 22px rgba(6,47,95,.10));
}

.nj-hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px auto 2px;
}

.nj-hero-divider span {
  width: min(360px, 70vw);
  height: 3px;
  display: block;
  background: linear-gradient(90deg, transparent, var(--nj-gold), var(--nj-teal), var(--nj-gold), transparent);
  border-radius: 999px;
}

.nj-hero h1 {
  color: var(--nj-navy);
  font-size: clamp(2.25rem, 6.2vw, 5.2rem);
  line-height: .98;
  margin: 22px auto 16px;
  letter-spacing: -0.055em;
  font-weight: 900;
  max-width: 900px;
}

.nj-hero-tagline {
  max-width: 820px;
  margin: 0 auto;
  color: #23435f;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
  font-weight: 520;
}

.nj-hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.nj-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 850;
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.nj-button:hover { transform: translateY(-2px); }

.nj-button-primary {
  background: linear-gradient(135deg, var(--nj-navy), var(--nj-teal));
  color: #fff !important;
  box-shadow: 0 14px 28px rgba(6, 47, 95, 0.22);
}

.nj-button-secondary {
  background: #ffffff;
  color: var(--nj-navy) !important;
  border: 1px solid rgba(0,151,167,.32);
  box-shadow: 0 10px 22px rgba(6,47,95,.06);
}

.nj-home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 26px 0 0;
}

.nj-home-tile,
.nj-card,
.nj-resource-card {
  background: var(--nj-card);
  border: 1px solid rgba(6, 47, 95, 0.10);
  box-shadow: 0 18px 44px rgba(6, 47, 95, 0.08);
  backdrop-filter: blur(8px);
}

.nj-home-tile {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 25px;
}

.nj-home-tile::before {
  content: "";
  display: block;
  width: 46px;
  height: 5px;
  margin-bottom: 17px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nj-teal), var(--nj-gold));
}

.nj-home-tile h2 {
  color: var(--nj-navy);
  margin: 0 0 9px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nj-home-tile p {
  margin: 0;
  color: #38546b;
  line-height: 1.58;
}

.nj-card {
  border-left: 7px solid var(--nj-teal);
  border-radius: 22px;
  padding: clamp(20px, 3vw, 32px);
  margin: 26px auto;
}

.nj-card h2,
.nj-card h3 {
  color: var(--nj-navy);
  margin-top: 0;
  letter-spacing: -0.02em;
}

.nj-card a,
.nj-legal-page a {
  color: var(--nj-teal);
  font-weight: 800;
}

/* Legal pages */
.nj-legal-page {
  width: min(980px, calc(100% - 32px));
  margin: 34px auto 62px;
  padding: clamp(24px, 4vw, 48px);
  color: var(--nj-ink);
  line-height: 1.72;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(6,47,95,.10);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(6,47,95,.11);
}

.nj-legal-page h1 {
  color: var(--nj-navy);
  font-size: clamp(2.1rem, 4vw, 3.45rem);
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -0.045em;
}

.nj-legal-page h1::after {
  content: "";
  display: block;
  width: 88px;
  height: 5px;
  margin-top: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nj-teal), var(--nj-gold));
}

.nj-legal-page h2 {
  color: var(--nj-navy);
  font-size: 1.42rem;
  margin-top: 34px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 151, 167, 0.22);
  letter-spacing: -0.02em;
}

.nj-legal-page h3 {
  color: var(--nj-navy);
  margin-top: 24px;
  letter-spacing: -0.01em;
}

.nj-legal-page ul { padding-left: 24px; }
.nj-legal-page li { margin: 7px 0; }

.nj-alert,
.nj-danger {
  border-radius: 18px;
  padding: 18px 20px;
  margin: 22px 0;
}

.nj-alert {
  background: #fffdf4;
  border: 1px solid rgba(214, 161, 43, 0.45);
  border-left: 6px solid var(--nj-gold);
}

.nj-danger {
  background: #fff5f5;
  border: 1px solid rgba(180, 35, 24, 0.20);
  border-left: 6px solid #b42318;
}

.nj-resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.nj-resource-card {
  border-radius: 18px;
  padding: 20px;
}

.nj-resource-card h3 { margin-top: 0; }

.nj-state-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(6, 47, 95, 0.12);
  border-radius: 18px;
  margin: 22px 0;
  box-shadow: 0 12px 28px rgba(6,47,95,.06);
}

.nj-state-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
}

.nj-state-table th,
.nj-state-table td {
  text-align: left;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(6, 47, 95, 0.10);
}

.nj-state-table th {
  color: #fff;
  background: linear-gradient(135deg, var(--nj-navy), var(--nj-teal));
}

/* Footer */
.nj-site-footer-notice {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 20%, rgba(0,151,167,.22), transparent 32%),
    linear-gradient(135deg, var(--nj-navy-2), var(--nj-navy));
  color: #fff;
  padding: 22px 16px;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
}

.nj-site-footer-notice a {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.nj-site-footer-notice a:hover { text-decoration: underline; }

.nj-site-footer-notice .nj-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.nj-site-footer-notice .nj-footer-social {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  opacity: 0.95;
}

@media (max-width: 1050px) {
  .nj-topbar-inner { align-items: flex-start; padding: 12px 0; flex-wrap: wrap; }
  .nj-brand { flex: 1; }
  .nj-nav { order: 3; flex-basis: 100%; justify-content: flex-start; }
}

@media (max-width: 820px) {
  .nj-home-grid { grid-template-columns: 1fr; }
  .nj-brand img { width: 48px; }
  .nj-brand small { display: none; }
  .nj-nav { overflow-x: auto; justify-content: flex-start; flex-wrap: nowrap; padding-bottom: 4px; }
  .nj-nav a { white-space: nowrap; }
}

@media (max-width: 560px) {
  .nj-topbar-inner { width: min(100% - 20px, 1240px); gap: 10px; }
  .nj-topbar-cta { min-height: 38px; padding: 0 13px; font-size: .88rem; }
  .nj-site-wrap { width: min(100% - 22px, 1180px); padding: 22px 0 42px; }
  .nj-hero { border-radius: 24px; padding: 24px 14px 34px; }
  .nj-hero-logo { width: min(390px, 94vw); }
  .nj-legal-page { width: min(100% - 22px, 980px); margin-top: 22px; border-radius: 22px; }
}

/* v1.8.0 cleaner professional landing refinements */
body.net-justice-managed-page {
  background:
    radial-gradient(circle at 8% 0%, rgba(0,151,167,.13), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(214,161,43,.12), transparent 30%),
    linear-gradient(180deg, #f8fbfd 0%, #eef7fa 100%);
}

.nj-topbar {
  background: rgba(255,255,255,.92);
}

.nj-topbar-inner {
  min-height: 76px;
}

.nj-brand img {
  width: 46px;
  max-height: 46px;
  object-fit: contain;
}

.nj-brand span strong {
  font-size: 1.08rem;
  letter-spacing: -.03em;
}

.nj-nav a {
  font-size: .88rem;
  font-weight: 800;
  padding: 9px 11px;
}

.nj-site-wrap {
  padding: clamp(22px, 4vw, 52px) 0 58px;
}

.nj-hero-minimal {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(34px, 5vw, 76px) clamp(18px, 4vw, 58px);
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(244,250,252,.94));
}

.nj-hero-minimal::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(0,151,167,.16);
  border-radius: 26px;
  pointer-events: none;
  z-index: -1;
}

.nj-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--nj-navy);
  background: rgba(0,151,167,.09);
  border: 1px solid rgba(0,151,167,.20);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nj-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--nj-gold);
  box-shadow: 0 0 0 5px rgba(214,161,43,.14);
}

.nj-hero-logo {
  width: min(520px, 86vw);
  margin-bottom: 0;
  filter: drop-shadow(0 18px 30px rgba(6,47,95,.10));
}

.nj-hero h1 {
  margin-top: 24px;
  font-size: clamp(2.3rem, 5.8vw, 4.8rem);
  letter-spacing: -.06em;
}

.nj-hero-tagline {
  max-width: 760px;
  font-size: clamp(1.02rem, 1.65vw, 1.28rem);
  color: #2d4963;
}

.nj-home-grid {
  display: none !important;
}

.nj-site-footer-notice {
  padding: 24px 16px;
}

.nj-site-footer-notice .nj-footer-links a {
  padding: 6px 2px;
}

@media (max-width: 720px) {
  .nj-topbar-inner {
    min-height: auto;
  }
  .nj-topbar-cta {
    display: none;
  }
  .nj-brand span strong {
    font-size: 1rem;
  }
  .nj-hero-logo { width: min(470px, 96vw); }
}
