/*
Theme Name: Opportunity House 30 Year
Theme URI: https://www.opportunityhouseinc.com/
Author: Opportunity House, Inc.
Author URI: https://www.opportunityhouseinc.com/
Description: A custom WordPress theme for Opportunity House, Inc. in Hobbs, NM. Designed for sober living program information, admissions, resident support, donations, community partners, and 30-year anniversary branding.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: opportunity-house-30
Tags: nonprofit, custom-logo, block-styles, wide-blocks, accessibility-ready, editor-style
*/

:root {
  --oh-navy: #10233f;
  --oh-blue: #1e5799;
  --oh-sky: #dbeeff;
  --oh-gold: #d8a63a;
  --oh-warm: #f7f3eb;
  --oh-ink: #152033;
  --oh-muted: #657286;
  --oh-border: #d8e0eb;
  --oh-white: #ffffff;
  --oh-radius: 22px;
  --oh-shadow: 0 24px 60px rgba(16, 35, 63, .14);
  --oh-shadow-soft: 0 16px 36px rgba(16, 35, 63, .09);
  --oh-max: 1180px;
  --oh-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --oh-serif: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--oh-ink);
  font-family: var(--oh-font);
  font-size: 17px;
  line-height: 1.65;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 48%, #f7f3eb 100%);
}

body.admin-bar .site-header { top: 32px; }

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

a { color: var(--oh-blue); text-underline-offset: 3px; }
a:hover, a:focus { color: var(--oh-navy); }

p { margin: 0 0 1rem; }

h1, h2, h3, h4, h5, h6 {
  color: var(--oh-navy);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 .7rem;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); }

.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;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link:focus {
  clip: auto !important;
  clip-path: none;
  display: block;
  height: auto;
  left: 1rem;
  top: 1rem;
  padding: .75rem 1rem;
  background: var(--oh-gold);
  color: var(--oh-navy);
  z-index: 999999;
  width: auto;
}

.oh-container,
.alignwide {
  width: min(calc(100% - 40px), var(--oh-max));
  margin-inline: auto;
}

.alignfull { width: 100%; max-width: none; }

.oh-section { padding: clamp(3.5rem, 7vw, 7rem) 0; }
.oh-section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }

.oh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--oh-blue);
  font-weight: 850;
  font-size: .79rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: .85rem;
}

.oh-eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--oh-gold);
  display: inline-block;
}

.oh-lead {
  color: var(--oh-muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  max-width: 760px;
}

.button,
.wp-block-button__link,
.oh-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--oh-gold), #f1ce74);
  color: var(--oh-navy) !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-weight: 850;
  line-height: 1;
  padding: 1rem 1.3rem;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(216, 166, 58, .28);
  transition: transform .18s ease, box-shadow .18s ease;
}

.button:hover,
.wp-block-button__link:hover,
.oh-button:hover,
.button:focus,
.wp-block-button__link:focus,
.oh-button:focus {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(216, 166, 58, .34);
}

.oh-button--secondary {
  background: rgba(255,255,255,.1);
  color: var(--oh-white) !important;
  border: 1px solid rgba(255,255,255,.26);
  box-shadow: none;
}

.oh-button--outline {
  background: transparent;
  color: var(--oh-navy) !important;
  border: 1px solid var(--oh-border);
  box-shadow: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(216, 224, 235, .82);
}

.header-inner {
  width: min(calc(100% - 32px), var(--oh-max));
  margin-inline: auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-width: 230px;
}

.site-logo-img {
  width: 76px;
  height: auto;
  display: block;
}

.site-title-wrap { line-height: 1.05; }
.site-title {
  color: var(--oh-navy);
  display: block;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -.02em;
  text-decoration: none;
}
.site-description {
  color: var(--oh-muted);
  display: block;
  font-size: .8rem;
  font-weight: 750;
  margin-top: .15rem;
}

.primary-nav { display: flex; align-items: center; gap: 1rem; }
.primary-nav ul,
.footer-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav > div > ul,
.primary-nav > ul {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.primary-nav a {
  border-radius: 999px;
  color: var(--oh-ink);
  display: inline-flex;
  font-size: .95rem;
  font-weight: 800;
  padding: .65rem .85rem;
  text-decoration: none;
}
.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav .current-menu-item > a {
  background: var(--oh-sky);
  color: var(--oh-navy);
}

.header-cta { white-space: nowrap; }
.nav-toggle { display: none; }

.oh-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(216,166,58,.35), transparent 30%),
    linear-gradient(135deg, var(--oh-navy) 0%, #143968 56%, #1e5799 100%);
  color: var(--oh-white);
  isolation: isolate;
}

.oh-hero::after {
  content: "";
  position: absolute;
  inset: auto -10vw -14vw auto;
  width: 42vw;
  height: 42vw;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  z-index: -1;
}

.oh-hero-grid {
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(310px, .78fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.oh-hero h1, .oh-hero h2, .oh-hero h3 { color: var(--oh-white); }
.oh-hero .oh-eyebrow { color: #f8d67e; }
.oh-hero .oh-lead { color: rgba(255,255,255,.84); }

.oh-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
}

.oh-hero-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 34px;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  box-shadow: 0 26px 80px rgba(0,0,0,.25);
}

.oh-anniversary-badge {
  align-items: center;
  background: var(--oh-white);
  border-radius: 28px;
  color: var(--oh-navy);
  display: grid;
  gap: .2rem;
  justify-items: center;
  padding: 1.6rem 1.2rem;
  text-align: center;
  box-shadow: var(--oh-shadow);
}

.oh-anniversary-badge strong {
  font-size: clamp(4rem, 10vw, 7.5rem);
  letter-spacing: -.08em;
  line-height: .85;
}

.oh-anniversary-badge span {
  color: var(--oh-blue);
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.oh-mini-list {
  display: grid;
  gap: .8rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}
.oh-mini-list li {
  align-items: start;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: .7rem;
  color: rgba(255,255,255,.9);
  font-weight: 700;
}
.oh-check {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(216,166,58,.2);
  color: #f8d67e;
  font-weight: 900;
}

.oh-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: -54px;
  position: relative;
  z-index: 2;
}

.oh-stat-card {
  background: var(--oh-white);
  border: 1px solid var(--oh-border);
  border-radius: var(--oh-radius);
  box-shadow: var(--oh-shadow-soft);
  padding: 1.4rem;
}
.oh-stat-card strong {
  color: var(--oh-navy);
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -.055em;
  line-height: 1;
}
.oh-stat-card span {
  color: var(--oh-muted);
  display: block;
  font-size: .88rem;
  font-weight: 800;
  margin-top: .55rem;
}

.oh-grid { display: grid; gap: 1.25rem; }
.oh-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.oh-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.oh-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.oh-card {
  background: rgba(255,255,255,.9);
  border: 1px solid var(--oh-border);
  border-radius: var(--oh-radius);
  box-shadow: var(--oh-shadow-soft);
  padding: clamp(1.25rem, 2vw, 1.7rem);
}
.oh-card h3 { margin-bottom: .55rem; }
.oh-card p:last-child { margin-bottom: 0; }

.oh-icon-card {
  position: relative;
  overflow: hidden;
}
.oh-icon-card::before {
  content: attr(data-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--oh-sky);
  color: var(--oh-blue);
  font-size: 1.4rem;
  margin-bottom: 1.1rem;
}

.oh-split {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.oh-panel {
  background: linear-gradient(135deg, var(--oh-navy), #143968);
  border-radius: 34px;
  color: var(--oh-white);
  overflow: hidden;
  padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: var(--oh-shadow);
}
.oh-panel h2, .oh-panel h3 { color: var(--oh-white); }
.oh-panel p { color: rgba(255,255,255,.82); }

.oh-list {
  display: grid;
  gap: .75rem;
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
}
.oh-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: .7rem;
  align-items: start;
  color: var(--oh-muted);
  font-weight: 700;
}
.oh-list li::before {
  content: "✓";
  align-items: center;
  background: rgba(216,166,58,.18);
  border-radius: 999px;
  color: var(--oh-navy);
  display: inline-flex;
  font-weight: 950;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.oh-panel .oh-list li { color: rgba(255,255,255,.88); }
.oh-panel .oh-list li::before { color: var(--oh-white); }

.oh-phase {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  align-items: start;
}
.oh-phase-number {
  align-items: center;
  border: 2px solid var(--oh-gold);
  border-radius: 22px;
  color: var(--oh-navy);
  display: flex;
  font-weight: 950;
  height: 72px;
  justify-content: center;
  line-height: 1;
  width: 72px;
}

.oh-cta-band {
  background: linear-gradient(135deg, var(--oh-navy), var(--oh-blue));
  border-radius: 34px;
  color: var(--oh-white);
  padding: clamp(2rem, 5vw, 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.oh-cta-band::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -120px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.oh-cta-band h2, .oh-cta-band h3 { color: var(--oh-white); }
.oh-cta-band p { color: rgba(255,255,255,.82); margin-bottom: 0; }

.entry-header {
  background: linear-gradient(135deg, var(--oh-navy), var(--oh-blue));
  color: var(--oh-white);
  padding: clamp(4rem, 8vw, 7rem) 0;
}
.entry-header h1 { color: var(--oh-white); }
.entry-header p { color: rgba(255,255,255,.84); max-width: 760px; }

.entry-content {
  width: min(calc(100% - 40px), 860px);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
}
.entry-content > * { max-width: 860px; }
.entry-content > .alignwide { max-width: var(--oh-max); width: min(calc(100vw - 40px), var(--oh-max)); margin-left: 50%; transform: translateX(-50%); }
.entry-content > .alignfull { max-width: 100vw; width: 100vw; margin-left: 50%; transform: translateX(-50%); }

.post-card {
  display: grid;
  gap: .65rem;
  margin-bottom: 1.25rem;
}
.post-meta { color: var(--oh-muted); font-size: .9rem; font-weight: 750; }

.page-template .entry-content { width: min(calc(100% - 40px), var(--oh-max)); }

.wp-block-image img { border-radius: var(--oh-radius); }
.wp-block-quote { border-left: 4px solid var(--oh-gold); margin-left: 0; padding-left: 1rem; }
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th, .wp-block-table td { border: 1px solid var(--oh-border); padding: .7rem; }

.site-footer {
  background: #09182d;
  color: rgba(255,255,255,.78);
  padding-top: clamp(3rem, 6vw, 5rem);
}
.site-footer h2, .site-footer h3 { color: var(--oh-white); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
}
.footer-brand { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.footer-brand img { width: 72px; }
.footer-menu a,
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.footer-menu a:hover,
.site-footer a:hover { color: var(--oh-gold); }
.footer-menu li { margin: .45rem 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 1.2rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .9rem;
}

.comment-navigation,
.posts-navigation,
.post-navigation { width: min(calc(100% - 40px), 860px); margin: 0 auto 3rem; }
.nav-links { display: flex; justify-content: space-between; gap: 1rem; }

.search-form { display: flex; gap: .5rem; }
.search-field {
  border: 1px solid var(--oh-border);
  border-radius: 999px;
  flex: 1;
  padding: .85rem 1rem;
}
.search-submit { min-width: 110px; }

@media (max-width: 980px) {
  body.admin-bar .site-header { top: 0; }
  .nav-toggle {
    align-items: center;
    background: var(--oh-navy);
    border: 0;
    border-radius: 999px;
    color: var(--oh-white);
    cursor: pointer;
    display: inline-flex;
    font-weight: 850;
    gap: .45rem;
    padding: .75rem 1rem;
  }
  .primary-nav {
    background: var(--oh-white);
    border: 1px solid var(--oh-border);
    border-radius: 24px;
    box-shadow: var(--oh-shadow-soft);
    display: none;
    left: 16px;
    padding: 1rem;
    position: absolute;
    right: 16px;
    top: calc(100% + 8px);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav > div > ul, .primary-nav > ul { align-items: stretch; flex-direction: column; }
  .primary-nav a { width: 100%; }
  .header-cta { display: none; }
  .oh-hero-grid, .oh-split, .oh-cta-band { grid-template-columns: 1fr; }
  .oh-hero-grid { min-height: 0; }
  .oh-stat-grid, .oh-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .oh-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .header-inner { min-height: 76px; }
  .site-logo-img { width: 60px; }
  .site-title { font-size: .98rem; }
  .site-description { display: none; }
  .oh-stat-grid, .oh-grid--2, .oh-grid--3, .oh-grid--4, .footer-grid { grid-template-columns: 1fr; }
  .oh-stat-grid { margin-top: -30px; }
  .oh-hero-actions { flex-direction: column; align-items: stretch; }
  .oh-button { width: 100%; }
  .oh-phase { grid-template-columns: 1fr; }
  .oh-phase-number { width: 58px; height: 58px; border-radius: 18px; }
  .footer-bottom { flex-direction: column; }
}
