/*
Theme Name: Rural Help Child
Theme URI: https://ruralhelp.org/
Description: A warm, plain-English GeneratePress child theme for RuralHelp.org.
Author: RuralHelp.org
Author URI: https://ruralhelp.org/
Template: generatepress
Version: 1.0.0
Text Domain: ruralhelp
Requires at least: 6.0
Tested up to: 6.8
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --rhp-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --rhp-font-body: "Atkinson Hyperlegible", Verdana, sans-serif;

  --rhp-ink: #21342a;
  --rhp-ink-soft: #3f5146;
  --rhp-muted: #637065;
  --rhp-paper: #fffdf7;
  --rhp-cream: #fff7e8;
  --rhp-cream-2: #f6ead7;
  --rhp-sage: #dbe9d5;
  --rhp-sage-2: #eff6ec;
  --rhp-green: #315d46;
  --rhp-green-dark: #213f30;
  --rhp-green-soft: #e4efe2;
  --rhp-clay: #a95739;
  --rhp-clay-soft: #f5ddd2;
  --rhp-wheat: #f0cf8a;
  --rhp-wheat-soft: #fbefd1;
  --rhp-sky: #d9edf2;
  --rhp-border: #e3d6c3;
  --rhp-white: #ffffff;
  --rhp-black: #111814;
  --rhp-focus: #7a3d12;

  --rhp-space-1: 0.25rem;
  --rhp-space-2: 0.5rem;
  --rhp-space-3: 0.75rem;
  --rhp-space-4: 1rem;
  --rhp-space-5: 1.25rem;
  --rhp-space-6: 1.5rem;
  --rhp-space-8: 2rem;
  --rhp-space-10: 2.5rem;
  --rhp-space-12: 3rem;
  --rhp-space-16: 4rem;

  --rhp-radius-sm: 0.5rem;
  --rhp-radius-md: 0.85rem;
  --rhp-radius-lg: 1.25rem;
  --rhp-radius-xl: 1.75rem;
  --rhp-shadow-sm: 0 1px 2px rgba(33, 52, 42, 0.08);
  --rhp-shadow-md: 0 12px 30px rgba(33, 52, 42, 0.11);
  --rhp-shadow-lg: 0 20px 45px rgba(33, 52, 42, 0.16);
  --rhp-speed: 180ms;
  --rhp-ease: cubic-bezier(.2,.7,.2,1);
  --rhp-max: 1180px;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--rhp-ink);
  background: var(--rhp-paper);
  font-family: var(--rhp-font-body);
  font-size: 18px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body, button, input, select, textarea {
  font-family: var(--rhp-font-body);
}

h1, h2, h3, h4, h5, h6, .main-title {
  color: var(--rhp-ink);
  font-family: var(--rhp-font-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.45rem, 6vw, 5rem); }
h2 { font-size: clamp(1.85rem, 4vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p { margin: 0 0 var(--rhp-space-5); }
a { color: var(--rhp-green-dark); text-decoration-thickness: 0.08em; text-underline-offset: 0.16em; }
a:hover { color: var(--rhp-clay); }

img { max-width: 100%; height: auto; }

.skip-link, .screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link:focus, .screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  display: block;
  height: auto;
  left: var(--rhp-space-4);
  top: var(--rhp-space-4);
  width: auto;
  z-index: 100000;
  padding: var(--rhp-space-3) var(--rhp-space-4);
  border-radius: var(--rhp-radius-sm);
  background: var(--rhp-white);
  color: var(--rhp-black);
  box-shadow: var(--rhp-shadow-md);
}

:focus-visible {
  outline: 3px solid var(--rhp-focus);
  outline-offset: 4px;
}

button, .button, .rhp-button, input[type="submit"] {
  transition: background-color var(--rhp-speed) var(--rhp-ease), color var(--rhp-speed) var(--rhp-ease), border-color var(--rhp-speed) var(--rhp-ease), transform var(--rhp-speed) var(--rhp-ease);
}

.rhp-wrap {
  width: min(calc(100% - 2rem), var(--rhp-max));
  margin-inline: auto;
}

/* GeneratePress fit */
body.home .site.grid-container,
body.front-page .site.grid-container {
  max-width: none;
  padding: 0;
}

body.home .site-content,
body.front-page .site-content {
  display: block;
  padding: 0;
}

body.home .content-area,
body.front-page .content-area {
  width: 100%;
  max-width: none;
}

body.home .inside-article,
body.front-page .inside-article {
  padding: 0;
}

body.home .sidebar,
body.front-page .sidebar {
  display: none !important;
}

.site-header {
  background: rgba(255, 253, 247, 0.97);
  border-bottom: 1px solid var(--rhp-border);
}

.main-navigation, .main-navigation ul ul {
  background: var(--rhp-paper);
}

.main-navigation .main-nav ul li a,
.menu-toggle {
  color: var(--rhp-ink);
  font-weight: 700;
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li:focus > a,
.main-navigation .main-nav ul li.sfHover > a,
.main-navigation .main-nav ul li.current-menu-item > a {
  color: var(--rhp-clay);
  background: transparent;
}

.rhp-notice {
  background: var(--rhp-green-dark);
  color: var(--rhp-white);
  font-size: 0.95rem;
}

.rhp-notice__inner {
  display: flex;
  gap: var(--rhp-space-3);
  align-items: center;
  justify-content: center;
  padding: var(--rhp-space-3) 0;
  text-align: center;
}

.rhp-notice a { color: var(--rhp-wheat); font-weight: 800; }
.rhp-notice strong { color: var(--rhp-white); }

.rhp-home {
  overflow: hidden;
}

.rhp-hero {
  position: relative;
  isolation: isolate;
  min-height: 680px;
  display: grid;
  align-items: center;
  padding: clamp(3rem, 8vw, 7rem) 0;
  background: linear-gradient(120deg, var(--rhp-cream) 0%, var(--rhp-sage-2) 100%);
}

.rhp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(240, 207, 138, .42), transparent 35%), radial-gradient(circle at 90% 5%, rgba(169, 87, 57, .17), transparent 28%);
  z-index: -2;
}

.rhp-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.rhp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--rhp-space-2);
  margin: 0 0 var(--rhp-space-5);
  padding: var(--rhp-space-2) var(--rhp-space-4);
  border-radius: 999px;
  background: var(--rhp-wheat-soft);
  color: var(--rhp-green-dark);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rhp-hero h1 {
  max-width: 11ch;
  margin: 0 0 var(--rhp-space-5);
}

.rhp-hero__text {
  max-width: 700px;
  color: var(--rhp-ink-soft);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.rhp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rhp-space-3);
  margin-top: var(--rhp-space-8);
}

.rhp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.82rem 1.1rem;
  border: 2px solid var(--rhp-green-dark);
  border-radius: 999px;
  background: var(--rhp-green-dark);
  color: var(--rhp-white);
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--rhp-shadow-sm);
}

.rhp-button:hover {
  background: var(--rhp-clay);
  border-color: var(--rhp-clay);
  color: var(--rhp-white);
  transform: translateY(-1px);
}

.rhp-button--light {
  background: var(--rhp-white);
  color: var(--rhp-green-dark);
}

.rhp-button--light:hover {
  background: var(--rhp-wheat-soft);
  color: var(--rhp-green-dark);
}

.rhp-hero__panel {
  border: 1px solid rgba(33, 52, 42, .16);
  border-radius: var(--rhp-radius-xl);
  background: var(--rhp-white);
  box-shadow: var(--rhp-shadow-lg);
  overflow: hidden;
}

.rhp-hero__image {
  min-height: 290px;
  background-color: var(--rhp-sage);
  background-position: center;
  background-size: cover;
}

.rhp-hero__image::after {
  content: "";
  display: block;
  min-height: 290px;
  background: linear-gradient(160deg, rgba(49,93,70,.16), rgba(169,87,57,.1));
}

.rhp-hero__note {
  padding: var(--rhp-space-6);
}

.rhp-hero__note h2 {
  margin: 0 0 var(--rhp-space-3);
  font-size: 1.65rem;
}

.rhp-hero__note p {
  color: var(--rhp-muted);
  margin-bottom: 0;
}

.rhp-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--rhp-space-3);
  margin-top: var(--rhp-space-8);
}

.rhp-fact {
  padding: var(--rhp-space-4);
  border: 1px solid rgba(33,52,42,.13);
  border-radius: var(--rhp-radius-lg);
  background: rgba(255,255,255,.66);
}

.rhp-fact strong {
  display: block;
  font-size: 1.02rem;
}

.rhp-section {
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.rhp-section--cream { background: var(--rhp-cream); }
.rhp-section--sage { background: var(--rhp-sage-2); }

.rhp-section__head {
  display: grid;
  gap: var(--rhp-space-3);
  max-width: 760px;
  margin-bottom: var(--rhp-space-8);
}

.rhp-section__head h2, .rhp-section__head p { margin: 0; }
.rhp-section__head p { color: var(--rhp-muted); font-size: 1.1rem; }

.rhp-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rhp-space-4);
}

.rhp-category-card,
.rhp-article-card,
.rhp-resource-box,
.rhp-callout,
.rhp-page-card {
  border: 1px solid var(--rhp-border);
  border-radius: var(--rhp-radius-lg);
  background: var(--rhp-white);
  box-shadow: var(--rhp-shadow-sm);
}

.rhp-category-card {
  display: grid;
  min-height: 235px;
  padding: var(--rhp-space-6);
  text-decoration: none;
  transition: transform var(--rhp-speed) var(--rhp-ease), box-shadow var(--rhp-speed) var(--rhp-ease), border-color var(--rhp-speed) var(--rhp-ease);
}

.rhp-category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rhp-shadow-md);
  border-color: rgba(49,93,70,.45);
  color: var(--rhp-ink);
}

.rhp-card-icon {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--rhp-space-5);
  border-radius: 1rem;
  background: var(--rhp-wheat-soft);
  color: var(--rhp-green-dark);
  font-size: 1.55rem;
}

.rhp-category-card h3 { margin: 0 0 var(--rhp-space-3); }
.rhp-category-card p { color: var(--rhp-muted); margin: 0; }
.rhp-category-card span:last-child { margin-top: var(--rhp-space-5); font-weight: 800; color: var(--rhp-green-dark); }

.rhp-article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rhp-space-5);
}

.rhp-article-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
}

.rhp-article-card__media {
  min-height: 180px;
  background: var(--rhp-sage);
  display: grid;
  place-items: center;
  color: var(--rhp-green-dark);
  font-size: 2.4rem;
}

.rhp-article-card__media img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.rhp-article-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--rhp-space-5);
}

.rhp-kicker {
  margin-bottom: var(--rhp-space-2);
  color: var(--rhp-clay);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rhp-article-card h3 {
  margin: 0 0 var(--rhp-space-3);
  font-size: 1.35rem;
}

.rhp-article-card h3 a { text-decoration: none; color: var(--rhp-ink); }
.rhp-article-card h3 a:hover { color: var(--rhp-clay); }

.rhp-article-card p { color: var(--rhp-muted); }
.rhp-article-card__body .rhp-read { margin-top: auto; font-weight: 800; }

.rhp-trust-band {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: var(--rhp-space-4);
  padding: var(--rhp-space-6);
  border-radius: var(--rhp-radius-xl);
  background: var(--rhp-green-dark);
  color: var(--rhp-white);
  box-shadow: var(--rhp-shadow-md);
}

.rhp-trust-band h2, .rhp-trust-band h3 { color: var(--rhp-white); margin: 0 0 var(--rhp-space-3); }
.rhp-trust-band p { color: rgba(255,255,255,.84); margin: 0; }

.rhp-newsletter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--rhp-space-8);
  align-items: center;
  padding: var(--rhp-space-8);
  border-radius: var(--rhp-radius-xl);
  background: linear-gradient(135deg, var(--rhp-wheat-soft), var(--rhp-sage-2));
  border: 1px solid var(--rhp-border);
}

.rhp-newsletter__placeholder {
  padding: var(--rhp-space-6);
  border: 2px dashed rgba(33,52,42,.35);
  border-radius: var(--rhp-radius-lg);
  background: rgba(255,255,255,.58);
}

.rhp-callout {
  margin: var(--rhp-space-6) 0;
  padding: var(--rhp-space-5);
  border-left: 6px solid var(--rhp-green);
}

.rhp-callout--warning { border-left-color: var(--rhp-clay); background: var(--rhp-clay-soft); }
.rhp-callout--tip { border-left-color: var(--rhp-green); background: var(--rhp-green-soft); }
.rhp-callout--info { border-left-color: #356779; background: var(--rhp-sky); }
.rhp-callout--help { border-left-color: #8a6719; background: var(--rhp-wheat-soft); }
.rhp-callout__label { display: block; margin-bottom: var(--rhp-space-2); font-weight: 900; }
.rhp-callout :last-child { margin-bottom: 0; }

.rhp-resource-box {
  margin: var(--rhp-space-6) 0;
  padding: var(--rhp-space-5);
}

.rhp-resource-box h3 { margin: 0 0 var(--rhp-space-2); font-size: 1.3rem; }
.rhp-resource-box p { margin: 0 0 var(--rhp-space-3); color: var(--rhp-muted); }
.rhp-resource-box__link { font-weight: 900; }

.rhp-page-template {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  background: var(--rhp-cream);
}

.rhp-page-card {
  width: min(calc(100% - 2rem), 920px);
  margin-inline: auto;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.rhp-page-card h1 { margin-top: 0; }
.rhp-page-card h2 { margin-top: var(--rhp-space-10); font-size: clamp(1.45rem, 3vw, 2.15rem); }
.rhp-page-card li { margin-bottom: var(--rhp-space-2); }
.rhp-page-intro { color: var(--rhp-ink-soft); font-size: 1.16rem; }
.rhp-form-placeholder { padding: var(--rhp-space-5); border: 2px dashed var(--rhp-border); border-radius: var(--rhp-radius-lg); background: var(--rhp-cream); }

.rhp-footer {
  background: var(--rhp-green-dark);
  color: rgba(255,255,255,.86);
  padding: var(--rhp-space-12) 0 var(--rhp-space-8);
}

.rhp-footer a { color: var(--rhp-wheat); }
.rhp-footer h2, .rhp-footer h3 { color: var(--rhp-white); margin-top: 0; }
.rhp-footer__grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: var(--rhp-space-8);
}
.rhp-footer ul { list-style: none; padding: 0; margin: 0; }
.rhp-footer li { margin-bottom: var(--rhp-space-2); }
.rhp-footer__bottom { border-top: 1px solid rgba(255,255,255,.18); margin-top: var(--rhp-space-8); padding-top: var(--rhp-space-5); font-size: .95rem; }

@media (max-width: 980px) {
  .rhp-hero__grid,
  .rhp-newsletter,
  .rhp-trust-band,
  .rhp-footer__grid {
    grid-template-columns: 1fr;
  }
  .rhp-category-grid,
  .rhp-article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rhp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .rhp-category-grid,
  .rhp-article-grid,
  .rhp-facts {
    grid-template-columns: 1fr;
  }
  .rhp-hero { min-height: auto; padding: var(--rhp-space-12) 0; }
  .rhp-actions { flex-direction: column; align-items: stretch; }
  .rhp-button { width: 100%; }
  .rhp-newsletter { padding: var(--rhp-space-5); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
