/*
Theme Name:   Astra Child - NDCH
Description:  Child theme for Astra powering No Data Center Hernando County
Template:     astra
Version:      1.7.0
Text Domain:  astra-child-ndch
*/

/* ==========================================================================
   NDCH Design System
   Namespace: .ndch-page
   Apply this wrapper class to the outermost div of every page's content
   (e.g. the Elementor HTML widget or Gutenberg Custom HTML block content).
   ========================================================================== */

/*
 * Canonical NDCH color & type tokens - defined once here at :root so they're
 * available site-wide (not just inside .ndch-page), and inherited by every
 * .ndch-page block below via the cascade. This is the single source of
 * truth going forward - update values here only, nowhere else.
 */
:root {
  --ndch-blue-dark: #123B67;
  --ndch-blue: #2B5F8A;
  --ndch-green: #4A7C59;
  --ndch-green-dark: #3A6247;
  --ndch-green-light: #7EE0A0; /* 4.2:1 on hero top / 7.1:1 on hero bottom - OK for large text (headline), not small body text */
  --ndch-mint: #BFE3D0;
  --ndch-tint: #EEF5F1;
  --ndch-tint-blue: #E7EFF2;
  --ndch-text: #2F3A45;
  --ndch-white: #FFFFFF;
  --ndch-action: #0D6EFD; /* 4.5:1 on white - meets AA normal text, no margin to spare */
  --ndch-warning: #C95A1E; /* 4.2:1 on white - AA for large/bold text only, not small body copy */
  --ndch-font-display: 'Fraunces', Georgia, serif;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-4: 16px;
  --space-6: 24px;
  --space-10: 40px;
  --space-16: 64px;

  /* Border radius scale */
  --radius-sm: 2px;
  --radius: 4px;
  --radius-lg: 8px;
  --radius-2xl: 16px;
  --radius-full: 9999px;
}

.ndch-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ndch-text);
  line-height: 1.6;
}
.ndch-page * { box-sizing: border-box; }
.ndch-page a { color: inherit; }

/* Layout helpers */
.ndch-page .ndch-section {
  padding: var(--space-16) var(--space-6); /* 64px 24px - was 60px 24px, snapped to scale */
}
.ndch-page .ndch-inner {
  max-width: 1000px;
  margin: 0 auto;
}

/* Hero */
.ndch-page .ndch-hero {
  /* background: linear-gradient(135deg, var(--ndch-blue) 0%, var(--ndch-blue-dark) 100%); */
  color: var(--ndch-white);
  text-align: center;
  padding: 80px var(--space-6); /* 80px kept bespoke - falls between space-16 (64px) and the next step up */
}
.ndch-page .ndch-tagline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ndch-mint);
  margin: 0 0 18px;
  font-weight: 600;
}
.ndch-page .ndch-tagline::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--ndch-green-light);
  flex-shrink: 0;
}
.ndch-page .ndch-hero h1 {
  font-family: var(--ndch-font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  font-weight: 700;
  color: var(--ndch-white);
}
.ndch-page .ndch-hero h1 .ndch-accent {
  display: block;
  color: var(--ndch-green-light);
  font-style: italic;
  font-weight: 600;
}
.ndch-page .ndch-hero p {
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0 auto;
  color: #E5EEF0;
}

/* Buttons */
.ndch-page .ndch-cta-row {
  margin-top: 36px; /* bespoke - between space-6 (24px) and space-10 (40px) */
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}
.ndch-page .ndch-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px; /* bespoke component padding */
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.ndch-page .ndch-btn::after {
  content: '\2192';
  margin-left: var(--space-2);
  transition: transform 0.2s ease;
  display: inline-block;
}
.ndch-page .ndch-btn:hover {
  transform: translateY(-3px);
}
.ndch-page .ndch-btn:hover::after {
  transform: translateX(4px);
}
.ndch-page .ndch-btn:focus-visible {
  outline: 3px solid var(--ndch-green-light);
  outline-offset: 2px;
}
.ndch-page .ndch-btn-primary {
  background: var(--ndch-green);
  color: var(--ndch-white);
}
.ndch-page .ndch-btn-primary:hover {
  background: var(--ndch-green-dark);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}
.ndch-page .ndch-btn-secondary {
  background: transparent;
  color: var(--ndch-white);
  border: 2px solid var(--ndch-white);
}
.ndch-page .ndch-btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--ndch-green-light);
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}
/* Secondary button variant for use on light section backgrounds
   (e.g. a "Get Involved" section outside the dark hero). */
.ndch-page .ndch-btn-secondary-light {
  color: var(--ndch-blue);
  border-color: var(--ndch-blue);
}
.ndch-page .ndch-btn-secondary-light:hover {
  background: var(--ndch-blue);
  color: var(--ndch-white);
  border-color: var(--ndch-blue);
  box-shadow: 0 10px 24px rgba(31,78,95,0.2);
}

/* Section titles */
.ndch-page .ndch-section-title {
  font-family: var(--ndch-font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--ndch-blue);
  margin: 0 0 14px;
  font-weight: 700;
  text-align: center;
  position: relative;
}
.ndch-page .ndch-section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--ndch-green);
  margin: 14px auto 0;
  border-radius: var(--radius-sm);
}

/* Home: goals + overview + meetings */
.ndch-page .ndch-goals {
  background: var(--ndch-white);
}
.ndch-page .ndch-goals p {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
}
.ndch-page .ndch-overview {
  background: var(--ndch-tint-blue);
  border-top: 1px solid #D7E4E8;
  border-bottom: 1px solid #D7E4E8;
}
.ndch-page .ndch-overview p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.05rem;
}
.ndch-page .ndch-meetings {
  background: var(--ndch-white);
  text-align: center;
}
.ndch-page .ndch-meetings-box {
  max-width: 560px;
  margin: 0 auto;
  border: 2px dashed #BFD2CB;
  border-radius: var(--radius-lg);
  padding: 28px;
  color: #5A6B63;
  font-size: 1rem;
}

/* Contacts / cards (reused across Home, Take Action, Volunteer, etc.) */
.ndch-page .ndch-contacts {
  background: var(--ndch-tint);
}
.ndch-page .ndch-contacts-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 36px;
  font-size: 1.02rem;
}
.ndch-page .ndch-contacts-intro a {
  color: var(--ndch-blue);
  font-weight: 700;
  text-decoration: underline;
}
.ndch-page .ndch-subheading {
  font-size: 1.1rem;
  color: var(--ndch-green-dark);
  font-weight: 700;
  margin: var(--space-10) 0 var(--space-4);
  text-align: center;
}
.ndch-page .ndch-subheading:first-of-type { margin-top: 0; }
.ndch-page .ndch-commissioner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-4);
}
.ndch-page .ndch-card {
  background: var(--ndch-white);
  border-radius: var(--radius-lg);
  padding: 20px; /* bespoke - between space-4 (16px) and space-6 (24px) */
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-left: 4px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.ndch-page .ndch-card:hover,
.ndch-page .ndch-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 16px 28px rgba(31,78,95,0.18);
  border-left-color: var(--ndch-green);
}
.ndch-page .ndch-card.is-vacant {
  opacity: 0.6;
}
.ndch-page .ndch-card.is-vacant:hover {
  transform: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-left-color: transparent;
}
.ndch-page .ndch-card-title {
  font-weight: 700;
  color: var(--ndch-blue);
  margin: 0 0 var(--space-1);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ndch-page .ndch-card-name {
  font-weight: 600;
  margin: 0 0 10px;
  font-size: 1.05rem;
  transition: color 0.2s ease;
}
.ndch-page .ndch-card:hover .ndch-card-name {
  color: var(--ndch-green-dark);
}
.ndch-page .ndch-card-line {
  font-size: 0.92rem;
  margin: 4px 0;
  word-break: break-word;
}
.ndch-page .ndch-card-line a {
  text-decoration: none;
  background-image: linear-gradient(var(--ndch-green), var(--ndch-green));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  transition: background-size 0.25s ease;
  padding-bottom: 1px;
}
.ndch-page .ndch-card-line a:hover {
  background-size: 100% 1.5px;
}
.ndch-page .ndch-staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}

/* ==========================================================================
   Take Action page: template boxes, copy buttons, checklist
   ========================================================================== */
.ndch-page .ndch-action-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}
.ndch-page .ndch-template-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 720px;
  margin: 0 auto 10px;
}
.ndch-page .ndch-template-label span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ndch-green-dark);
  font-weight: 700;
}
.ndch-page .ndch-template-box {
  background: var(--ndch-white);
  border: 1px solid #D7E4E8;
  border-left: 4px solid var(--ndch-green);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.98rem;
  line-height: 1.75;
  white-space: pre-wrap;
  transition: box-shadow 0.25s ease;
}
.ndch-page .ndch-template-box:hover {
  box-shadow: 0 12px 24px rgba(31,78,95,0.12);
}
.ndch-page .ndch-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ndch-green-dark);
  background: transparent;
  border: 1.5px solid var(--ndch-green);
  border-radius: var(--radius-full); /* true pill, was a fixed 20px */
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  font-family: inherit;
}
.ndch-page .ndch-copy-btn:hover {
  background: var(--ndch-green);
  color: var(--ndch-white);
  transform: translateY(-2px);
}
.ndch-page .ndch-copy-btn.is-copied {
  background: var(--ndch-green-dark);
  color: var(--ndch-white);
  border-color: var(--ndch-green-dark);
}
.ndch-page .ndch-checklist {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 720px;
}
.ndch-page .ndch-checklist li {
  position: relative;
  padding-left: 38px;
  margin-bottom: var(--space-4);
  font-size: 1rem;
  line-height: 1.65;
}
.ndch-page .ndch-checklist li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  background: var(--ndch-green);
  color: var(--ndch-white);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ==========================================================================
   Resources page: link-directory cards
   ========================================================================== */
.ndch-page a.ndch-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.ndch-page .ndch-resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: var(--space-4); /* was 18px, snapped for consistency with other grids */
  margin-bottom: var(--space-10);
}
.ndch-page .ndch-resource-grid:last-of-type {
  margin-bottom: 0;
}
.ndch-page .ndch-resource-title {
  font-weight: 700;
  color: var(--ndch-blue);
  font-size: 1.0rem;
  margin: 0 0 var(--space-2);
}
.ndch-page .ndch-resource-desc {
  font-size: 0.92rem;
  color: var(--ndch-text);
  line-height: 1.6;
  margin: 0 0 14px; /* bespoke - doesn't match scale, left as-is */
}
.ndch-page .ndch-resource-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ndch-green-dark);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ndch-page .ndch-resource-link::after {
  content: '\2192';
  transition: transform 0.2s ease;
  display: inline-block;
}
.ndch-page .ndch-card:hover .ndch-resource-link::after {
  transform: translateX(4px);
}

/* ==========================================================================
   Data Center news feed - [ndch_data_center_news] shortcode
   Reuses .ndch-resource-grid / .ndch-card / .ndch-resource-title /
   .ndch-resource-link from the Resources page pattern above.
   ========================================================================== */
.ndch-page .ndch-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: var(--space-4); /* was 18px, snapped for consistency with other grids */
}
.ndch-page .ndch-news-error {
  text-align: center;
  color: #5A6B63;
  font-style: italic;
}

/* Scroll-reveal utility - paired with the small IntersectionObserver
   script at the bottom of the page HTML. Respects reduced-motion. */
.ndch-page .ndch-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.ndch-page .ndch-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .ndch-page .ndch-fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .ndch-page .ndch-section { padding: 44px 18px; }
  .ndch-page .ndch-hero { padding: 56px 18px; }
}

/* ==========================================================================
   Leftover Starter Template banner
   The demo/starter template that was imported left a hero banner element
   with this class showing above our own content on the front page.
   Hiding it here (rather than one-off Customizer CSS) keeps the fix with
   the rest of the theme's styling and versioned in this file.
   ========================================================================== */
.home-page-banner {
  display: none !important;
}
