/* =========================================================
   UCAN! — United Communities Assistance Network
   Global Stylesheet
   ========================================================= */

:root {
  --purple: #6B3FA0;
  --purple-dark: #4E2D77;
  --gold: #D4A017;
  --gold-dark: #B3860F;
  --blue: #3B5BDB;
  --dark-text: #1A1A1A;
  --white: #FFFFFF;
  --light-bg: #F9F6FF;
  --dark-bg: #1A0A2E;
  --gray: #6b6b76;
  --light-gray: #e4e0ee;

  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;

  --max-width: 1180px;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(26, 10, 46, 0.12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--dark-text);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
  margin: 0 0 0.6em;
  color: var(--purple-dark);
}

p { margin: 0 0 1em; }

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--gold-dark); }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 64px 0; }
.section-alt { background: var(--light-bg); }

.section-title {
  text-align: center;
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
  color: var(--gray);
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.98rem;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.18); }

.btn-gold {
  background: var(--gold);
  color: var(--dark-text);
  border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold-dark); color: var(--dark-text); }

.btn-purple {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}
.btn-purple:hover { background: var(--purple-dark); color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--purple-dark); }

.btn-outline-purple {
  background: transparent;
  color: var(--purple);
  border-color: var(--purple);
}
.btn-outline-purple:hover { background: var(--purple); color: var(--white); }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--light-gray);
  transition: box-shadow 0.2s ease;
}
.navbar.scrolled { box-shadow: 0 4px 18px rgba(0,0,0,0.12); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--purple-dark);
}
.nav-logo img { height: 48px; width: auto; border-radius: 6px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--dark-text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--purple); }
.nav-links a.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}
.nav-links .btn { padding: 10px 20px; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--purple-dark);
  border-radius: 2px;
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  }
  .nav-links.open { max-height: 500px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; padding: 14px 20px; border-bottom: 1px solid var(--light-gray); }
  .nav-links a.active { border-bottom: 1px solid var(--light-gray); background: var(--light-bg); }
  .nav-links .btn { margin: 14px 20px; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--purple-dark) 55%, var(--purple) 100%);
  color: var(--white);
  padding: 110px 0 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 1; }
.home-hero {
  background-image: linear-gradient(rgba(15, 8, 28, 0.64), rgba(49, 24, 75, 0.68)), url('../images/hero-community-porch.jpg');
  background-size: cover;
  background-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(212,160,23,0.25), transparent 55%);
  pointer-events: none;
}
.hero h1 {
  color: var(--white);
  font-size: 2.8rem;
  max-width: 820px;
  margin: 0 auto 20px;
}
.hero p.lead {
  font-size: 1.2rem;
  color: #e9ddfb;
  max-width: 680px;
  margin: 0 auto 36px;
}
.hero-buttons { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

.hero-small {
  padding: 80px 0 60px;
}
.hero-small h1 { font-size: 2.3rem; }

@media (max-width: 768px) {
  .hero h1 { font-size: 2.1rem; }
  .hero p.lead { font-size: 1.05rem; }
}

/* ---------- Stats bar ---------- */
.stats-bar {
  background: var(--purple);
  color: var(--white);
  padding: 46px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-item .stat-num {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: bold;
  color: var(--gold);
}
.stat-item .stat-label {
  font-size: 0.95rem;
  color: #e9ddfb;
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .card-grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.card .icon { font-size: 2.4rem; margin-bottom: 14px; }
.card-image { width: 100%; height: 300px; object-fit: cover; object-position: center 30%; border-radius: 7px; margin-bottom: 18px; }
.bod-image { width: 100%; height: 310px; object-fit: cover; object-position: center 20%; border-radius: 7px; margin-bottom: 18px; }
.card h3 { margin-bottom: 10px; font-size: 1.25rem; }
.card p { color: var(--gray); flex-grow: 1; }
.card .learn-more { font-weight: 700; margin-top: 10px; display: inline-block; }

/* ---------- Program card (full detail) ---------- */
.program-card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  padding: 34px;
  margin-bottom: 28px;
  box-shadow: 0 2px 10px rgba(26,10,46,0.05);
}
.program-image { width: min(300px, 100%); max-height: 210px; object-fit: cover; border-radius: 7px; margin: 0 0 22px; }
.program-image-food { object-position: center; }
.program-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  color: var(--white);
}
.badge-active { background: #2f9e44; }
.badge-soon { background: var(--blue); }
.badge-events { background: var(--gold-dark); }
.badge-legacy { background: var(--gray); }

.program-card .details {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--light-gray);
  color: var(--gray);
  font-size: 0.95rem;
}
.program-card ul { margin: 8px 0 0 0; padding-left: 20px; }

/* ---------- Spotlight / callout boxes ---------- */
.callout {
  background: var(--light-bg);
  border-left: 4px solid var(--purple);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 26px;
}
.callout.gold { border-left-color: var(--gold); background: #fff9ec; }
.callout.blue { border-left-color: var(--blue); background: #eef1fd; }

.help-callout { overflow: auto; }
.help-image { width: min(320px, 100%); max-height: 240px; object-fit: cover; float: right; margin: 0 0 18px 28px; border-radius: 7px; }
.pill-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list li {
  background: var(--white);
  border: 1px solid var(--purple);
  color: var(--purple-dark);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ---------- CTA banner (gold) ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--gold) 0%, #e8bb3b 100%);
  color: var(--dark-text);
  text-align: center;
  padding: 64px 0;
}
.cta-banner h2 { color: var(--dark-text); }
.cta-banner .btn-purple { border-color: var(--purple); }
.cta-buttons { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ---------- Partner strip ---------- */
.partner-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  text-align: center;
}
.partner-strip .partner-chip {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  padding: 22px 12px;
  font-weight: 700;
  color: var(--purple-dark);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}
@media (max-width: 1024px) {
  .partner-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .partner-strip { grid-template-columns: repeat(2, 1fr); }
}

.partner-group { margin-bottom: 40px; }
.partner-group h3 {
  border-bottom: 2px solid var(--gold);
  display: inline-block;
  padding-bottom: 6px;
  margin-bottom: 18px;
}
.partner-tag-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 30px; }
@media (max-width: 768px) { .partner-tag-list { grid-template-columns: 1fr; } }
.partner-tag-list li {
  padding: 10px 16px;
  background: var(--light-bg);
  border-radius: 6px;
  border-left: 3px solid var(--purple);
  font-size: 0.95rem;
}

/* ---------- Org chart ---------- */
.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.org-node {
  background: var(--purple);
  color: var(--white);
  padding: 14px 26px;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow);
}
.org-node.top { background: var(--purple-dark); font-size: 1.1rem; }
.org-node.sub { background: var(--blue); }
.org-node.leaf { background: var(--gold-dark); color: var(--white); font-size: 0.9rem; }
.org-connector { width: 2px; height: 26px; background: var(--light-gray); }
.org-row { display: flex; gap: 40px; flex-wrap: wrap; justify-content: center; }
.org-row .branch { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ---------- Timeline / Story ---------- */
.story-block { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 768px) { .story-block { grid-template-columns: 1fr; } }
.story-block .quote-box {
  background: var(--dark-bg);
  color: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-style: italic;
  border-left: 5px solid var(--gold);
}

/* ---------- Leadership ---------- */
.leader-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--light-gray);
  padding: 28px;
  text-align: center;
}
.leader-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  margin: 0 auto 16px;
}
.leader-card h4 { margin-bottom: 4px; }
.leader-card img.leader-photo { object-fit: cover; object-position: center 15%; }
.leader-card .role { color: var(--gold-dark); font-weight: 700; font-size: 0.9rem; margin-bottom: 10px; }
.leader-card p.bio { color: var(--gray); font-size: 0.92rem; }

/* ---------- Certification badges ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 768px) { .cert-grid { grid-template-columns: 1fr; } }
.cert-card {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--light-gray);
}
.cert-card .icon { font-size: 2rem; margin-bottom: 8px; }
.cert-image { width: 100%; max-width: 260px; max-height: 190px; object-fit: contain; margin: 0 auto 14px; }

.event-flyer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; gap: 28px; }
.event-flyer-grid img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 600px) { .event-flyer-grid { grid-template-columns: minmax(0, 360px); } .help-image { float: none; margin: 0 0 18px; } }

/* ---------- Form ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.92rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--light-gray);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(107,63,160,0.15);
}
.form-group.error input,
.form-group.error select,
.form-group.error textarea { border-color: #c0392b; }
.form-error-msg { color: #c0392b; font-size: 0.82rem; margin-top: 4px; display: none; }
.form-group.error .form-error-msg { display: block; }
.form-note { font-size: 0.85rem; color: var(--gray); margin-top: 10px; }
.form-success {
  display: none;
  background: #e6f6ea;
  border: 1px solid #2f9e44;
  color: #206b32;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 600;
}
.form-success.show { display: block; }

/* ---------- Contact locations ---------- */
.location-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1024px) { .location-grid { grid-template-columns: 1fr; } }
.location-card {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 26px;
  border-top: 4px solid var(--purple);
}
.location-card h4 { margin-bottom: 6px; }

/* ---------- Two column layout ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark-bg);
  color: #cfc4e6;
  padding: 60px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h4 {
  color: var(--gold);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.site-footer .footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.site-footer .footer-logo img { height: 46px; }
.site-footer .footer-logo span {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--white);
  font-weight: bold;
}
.site-footer .tagline { font-style: italic; color: #cfc4e6; }
.site-footer .est { color: var(--gold); font-weight: 700; margin-top: 6px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer a { color: #cfc4e6; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 0.85rem;
  color: #9c8fc0;
}
.footer-bottom a { color: #cfc4e6; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.gap-list { list-style: none; padding: 0; }
.gap-list li { padding: 8px 0; border-bottom: 1px solid var(--light-gray); }
