/* =========================================================
   CloseTheGap.ie — Main Stylesheet
   ========================================================= */

/* --- Reset / Base ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* --- Skip link ------------------------------------------ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #1b1f3b;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  z-index: 9999;
  border-radius: 0 0 4px 0;
}
.skip-link:focus { top: 0; }

/* --- Focus styles --------------------------------------- */
:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 3px;
  border-radius: 2px;
}
a:focus-visible, button:focus-visible { outline: 3px solid #005fcc; outline-offset: 3px; }

/* --- Screen reader utility ------------------------------ */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  font-family: var(--wp--preset--font-family--roboto), sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #3b3b3b;
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #c0272d; font-weight: 700; }
a:hover { color: #8a1a1f; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--wp--preset--font-family--yanone), sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
}

/* --- Layout --------------------------------------------- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { min-height: 0; }

/* --- Wordmark ------------------------------------------- */
.site-wordmark {
  font-family: var(--wp--preset--font-family--yanone), sans-serif;
  font-size: 2rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  letter-spacing: -0.5px;
}
.wordmark-close { color: #c0272d; }
.wordmark-gap   { color: #1b1f3b; }
.wordmark-tld   { color: #595959; }

/* --- Site header ---------------------------------------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: 1140px;
  margin: 0 auto;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: #3b3b3b;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.primary-nav a:hover { background: #f0f0f0; color: #1b1f3b; }

.primary-nav .btn-signup {
  background: #c0272d;
  color: #fff !important;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  font-weight: 700;
}
.primary-nav .btn-signup:hover { background: #8a1a1f; }

/* --- Site footer ---------------------------------------- */
.site-footer {
  background: #1b1f3b;
  color: #fff;
  padding: 2.5rem 0;
}

.site-footer .footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: #c0c8d8;
  font-size: 0.875rem;
  text-decoration: none;
  font-weight: 400;
}
.footer-nav a:hover { color: #fff; }

.footer-companion a { color: #0076C2; font-weight: 700; }

.footer-copy { font-size: 0.8rem; color: #c0c8d8; margin-top: 0.5rem; }

/* --- Sub-banner (dark navy page header) ---------------- */
.sub-banner {
  background: #1b1f3b;
  padding: 3rem 0;
}
.sub-banner.sub-banner--red   { border-left: 6px solid #c0272d; }
.sub-banner.sub-banner--teal  { border-left: 6px solid #2ec4b6; }

.sub-banner .eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.sub-banner .eyebrow--red  { color: #c0272d; }
.sub-banner .eyebrow--teal { color: #2ec4b6; }

.sub-banner h1 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.sub-banner .sub-summary {
  color: #c0c8d8;
  font-size: 1rem;
  max-width: 600px;
}

/* --- Stats strip (teal) --------------------------------- */
.stats-strip {
  background: #2ec4b6;
  padding: 1.25rem 0;
}
.stats-strip .stats-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-item .stat-value {
  font-family: var(--wp--preset--font-family--yanone), sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.stat-item .stat-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* --- Issue cards ---------------------------------------- */
.issue-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-left: 4px solid #1b1f3b;
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.15s;
}
.issue-card.is-lead { border-left-color: #c0272d; }
.issue-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.issue-card h2, .issue-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
  color: #1b1f3b;
}
.issue-card .issue-summary { color: #555; font-size: 0.925rem; margin-bottom: 0.75rem; }
.issue-card .issue-meta { font-size: 0.8rem; color: #595959; }
.issue-card .explore-link { color: #c0272d; font-weight: 700; font-size: 0.9rem; }

/* --- Issue grid (home) ---------------------------------- */
.issues-grid {
  background: #f6f6f6;
  padding: 3rem 0;
}
.issues-grid .section-label {
  font-size: 1rem;
  font-weight: 700;
  color: #595959;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.issues-grid .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) { .issues-grid .grid { grid-template-columns: 1fr; } }

/* --- Post list (home + archive) ------------------------- */
.post-list { padding: 3rem 0; }
.post-list .section-label {
  font-size: 1rem;
  font-weight: 700;
  color: #595959;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.post-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.875rem 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 1rem;
}
.post-item:last-child { border-bottom: none; }
.post-item .post-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1b1f3b;
  background: #d4f4f1;
  padding: 0.15em 0.4em;
  border-radius: 2px;
  margin-bottom: 0.25rem;
}
.post-item .post-tag.is-lead { background: #fde8ea; color: #1b1f3b; }
.post-item h3 { margin: 0; font-size: 1.15rem; color: #1b1f3b; }
.post-item h3 a { color: #1b1f3b; font-weight: 700; text-decoration: none; }
.post-item h3 a:hover { color: #c0272d; }
.post-item .post-date { font-size: 0.8rem; color: #6b6b6b; white-space: nowrap; }
.view-all { display: block; text-align: right; margin-top: 1rem; font-size: 0.875rem; color: #c0272d; font-weight: 700; }

/* --- Newsletter CTA ------------------------------------- */
.newsletter-cta {
  background: #1b1f3b;
  border-top: 4px solid #c0272d;
  padding: 3rem 0;
  text-align: center;
}
.newsletter-cta h2 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.newsletter-cta p { color: #c0c8d8; margin-bottom: 1.5rem; }
/* --- MailerLite embed overrides ------------------------- */
.newsletter-cta .ml-embedded { max-width: 420px; margin: 0 auto; }
/* Transparent wrapper — let the navy section bg show through */
.newsletter-cta .ml-embedded .ml-form-embedWrapper { background: transparent !important; border: none !important; }
/* Hide ML's own heading/body copy — we render those in the template */
.newsletter-cta .ml-embedded .ml-form-embedContent { display: none !important; }
/* Horizontal inline layout */
.newsletter-cta .ml-embedded .ml-form-formContent { display: flex !important; gap: 0.5rem; margin: 0 !important; }
.newsletter-cta .ml-embedded .ml-form-fieldRow { margin: 0 !important; flex: 1; }
.newsletter-cta .ml-embedded .ml-form-embedSubmit { margin: 0 !important; float: none !important; width: auto !important; }
/* Input */
.newsletter-cta .ml-embedded input[type="email"] {
  padding: 0.6rem 1rem !important;
  border: none !important;
  border-radius: 4px !important;
  font-size: 0.95rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
/* Submit button */
.newsletter-cta .ml-embedded button[type="submit"] {
  background: #c0272d !important;
  border: none !important;
  border-radius: 4px !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  padding: 0.6rem 1.25rem !important;
  white-space: nowrap;
  width: auto !important;
}
.newsletter-cta .ml-embedded button[type="submit"]:hover { background: #8a1a1f !important; }
/* Success message */
.newsletter-cta .ml-embedded .ml-form-successContent h4,
.newsletter-cta .ml-embedded .ml-form-successContent p { color: #fff !important; }

/* --- Hero ----------------------------------------------- */
.hero {
  background: #1b1f3b;
  padding: 5rem 0;
  text-align: center;
}
.hero .eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c0272d;
  margin-bottom: 1rem;
}
.hero h1 {
  color: #fff;
  font-size: 3rem;
  margin-bottom: 1rem;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.hero .hero-sub {
  color: #c0c8d8;
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 2rem;
}
.hero-ctas { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
  background: #c0272d;
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
}
.btn-primary:hover { background: #8a1a1f; color: #fff; }
.btn-ghost {
  border: 2px solid #fff;
  color: #fff;
  padding: 0.7rem 1.75rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* --- Related posts -------------------------------------- */
.related-posts { background: #f6f6f6; padding: 2rem 0; }
.related-posts h3, .related-posts h2 { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #595959; margin-bottom: 1rem; }
.related-post-item { padding: 0.6rem 0; border-bottom: 1px solid #e8e8e8; }
.related-post-item:last-child { border-bottom: none; }
.related-post-item a { color: #1b1f3b; font-weight: 700; font-size: 0.95rem; text-decoration: none; }
.related-post-item a:hover { color: #c0272d; }

/* --- Social sharing ------------------------------------- */
.social-share { display: flex; gap: 0.75rem; margin: 2rem 0; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid #949494;
  color: #3b3b3b;
  background: #fff;
  cursor: pointer;
}
.share-btn:hover { background: #f0f0f0; color: #1b1f3b; }
.share-btn--linkedin { border-color: #0077b5; color: #0077b5; }
.share-btn--copy     { border-color: #888; }

/* --- Resources ------------------------------------------ */
.resources-page { padding: 2.5rem 0; }
.filter-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.filter-tab {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid #949494;
  color: #555;
  background: #fff;
}
.filter-tab.is-active, .filter-tab:hover { background: #1b1f3b; color: #fff; border-color: #1b1f3b; }

.resource-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.resource-item:last-child { border-bottom: none; }
.resource-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #f0f0f0;
  color: #555;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.35rem;
}
.resource-item h3 { margin: 0 0 0.35rem; font-size: 1rem; color: #1b1f3b; }
.resource-item p  { margin: 0; font-size: 0.9rem; color: #555; }
.resource-link {
  white-space: nowrap;
  background: #1b1f3b;
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
}
.resource-link:hover { background: #0d1124; color: #fff; }

/* --- Pull quote ----------------------------------------- */
.wp-block-pullquote {
  border-top: 4px solid #2ec4b6;
  border-bottom: 4px solid #2ec4b6;
  padding: 1.5rem 2rem;
  margin: 2rem auto;
  max-width: 680px;
}
.wp-block-pullquote blockquote p {
  font-size: 1.2rem;
  font-style: italic;
  color: #1b1f3b;
}
.wp-block-pullquote blockquote cite {
  font-size: 0.85rem;
  color: #595959;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Content body --------------------------------------- */
.entry-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.entry-content a { color: #c0272d; }

/* --- Mobile nav toggle ---------------------------------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
}
.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #1b1f3b;
}

/* --- Responsive ----------------------------------------- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .site-wordmark { font-size: 1.5rem; }
  .newsletter-form { flex-direction: column; }
  .social-share { flex-wrap: wrap; }

  .nav-toggle { display: flex; }

  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 2px solid #e8e8e8;
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
    z-index: 99;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 0.6rem 0; border-bottom: 1px solid #f0f0f0; }
  .primary-nav a:last-child { border-bottom: none; }
  .primary-nav .btn-signup { margin-left: 0; margin-top: 0.5rem; text-align: center; }

  .site-header { position: relative; }
}

/* --- Reduced motion ------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
