/* ============================================================
   QCH YouthHub – Design System & Shared Styles
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  --purple:  #4B2E83;
  --teal:    #168C8C;
  --gold:    #E8B84A;
  --cream:   #FFF9F0;
  --charcoal:#263238;
  --white:   #ffffff;
  --radius:  1rem;
  --shadow:  0 4px 20px rgba(0,0,0,.10);
  --transition: .25s ease;
  --max-w:   1160px;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--purple);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
p  { max-width: 70ch; }

/* ---------- Layout Utilities ---------- */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.section { padding: 4rem 0; }
.section--alt { background: var(--white); }
.section--purple { background: var(--purple); color: var(--white); }
.section--purple h2,
.section--purple h3 { color: var(--gold); }
.section--teal { background: var(--teal); color: var(--white); }
.section--teal h2 { color: var(--white); }

.text-center { text-align: center; }
.text-center p { margin-inline: auto; }

.grid-2 { display: grid; gap: 2rem; }
.grid-3 { display: grid; gap: 2rem; }
@media(min-width:640px)  { .grid-2 { grid-template-columns: repeat(2,1fr); } }
@media(min-width:768px)  { .grid-3 { grid-template-columns: repeat(3,1fr); } }

.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .75rem 1.75rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
  border: none;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.18); text-decoration: none; }
.btn-primary   { background: var(--gold);   color: var(--charcoal); }
.btn-secondary { background: transparent;   color: var(--white);   border: 2px solid var(--white); }
.btn-outline   { background: transparent;   color: var(--purple);  border: 2px solid var(--purple); }
.btn-teal      { background: var(--teal);   color: var(--white); }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  transition: transform var(--transition);
}
.card:hover { transform: translateY(-4px); }
.card-icon {
  font-size: 2.4rem;
  margin-bottom: .75rem;
}
.card h3 { color: var(--purple); margin-bottom: .5rem; }
.card-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--charcoal);
  font-size: .8rem;
  font-weight: 700;
  padding: .2rem .75rem;
  border-radius: 1rem;
  margin-bottom: .75rem;
}

/* ---------- Section Title ---------- */
.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-title h2 { margin-bottom: .5rem; }
.section-title p  { margin-inline: auto; color: #555; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,.10);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.25rem;
  max-width: var(--max-w);
  margin-inline: auto;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--purple);
  text-decoration: none;
}
.nav-logo span { color: var(--teal); }
.nav-logo .logo-mark {
  width: 42px; height: 42px;
  background: var(--purple);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-weight: 900;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav-links a {
  padding: .45rem .75rem;
  border-radius: .5rem;
  color: var(--charcoal);
  font-weight: 600;
  font-size: .95rem;
  transition: background var(--transition), color var(--transition);
}
.nav-links a:hover,
.nav-links a.active { background: var(--purple); color: var(--white); text-decoration: none; }
.nav-links .appt-btn {
  background: var(--gold);
  color: var(--charcoal);
  padding: .5rem 1.1rem;
  border-radius: 2rem;
  margin-left: .5rem;
}
.nav-links .appt-btn:hover { background: var(--purple); color: var(--white); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px; height: 20px;
  background: none; border: none; cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 3px;
  background: var(--purple);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

@media(max-width:860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    gap: .1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .65rem 1rem; }
  .nav-links .appt-btn { margin: .5rem 0 0; text-align: center; }
}

/* Always-visible appt button on mobile (inside hamburger zone) */
.nav-appt-mobile {
  display: none;
}
@media(max-width:860px) {
  .nav-appt-mobile {
    display: inline-block;
    background: var(--gold);
    color: var(--charcoal);
    padding: .45rem 1rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: .9rem;
    margin-right: .5rem;
  }
  .nav-appt-mobile:hover { background: var(--purple); color: var(--white); text-decoration: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--purple) 0%, #6a3fa8 60%, var(--teal) 100%);
  color: var(--white);
  padding: 5rem 1.25rem 4rem;
  text-align: center;
}
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero .tagline { font-size: clamp(.95rem, 2vw, 1.2rem); margin: 0 auto 2rem; opacity: .92; max-width: 55ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ---------- Tables ---------- */
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td {
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.25);
}
.hours-table th { background: var(--purple); color: var(--white); }
.hours-table tbody tr:nth-child(odd) td { background: rgba(77, 31, 113, 0.9); color: var(--white); }
.hours-table tbody tr:nth-child(even) td { background: #e9dcff; color: var(--purple); }

/* ---------- Notice Boxes ---------- */
.notice-box {
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  background: #fffbef;
  padding: 1.25rem 1.5rem;
}
.notice-box--crisis {
  border-color: var(--gold);
  background: #fffbee;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.notice-box--crisis::before {
  content: "⚠️";
  font-size: 1.5rem;
  flex-shrink: 0;
}
.notice-clinical {
  background: #f0f8ff;
  border: 1px solid #b0d0e8;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: .92rem;
}

/* ---------- Pillars ---------- */
.pillars-grid { display: grid; gap: 1.5rem; }
@media(min-width:520px)  { .pillars-grid { grid-template-columns: repeat(2,1fr); } }
@media(min-width:900px)  { .pillars-grid { grid-template-columns: repeat(5,1fr); } }
.pillar-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--teal);
}
.pillar-card .pillar-icon { font-size: 2.2rem; margin-bottom: .5rem; }
.pillar-card h3 { color: var(--purple); font-size: 1.1rem; margin-bottom: .4rem; }

/* ---------- Who We Serve ---------- */
.serve-card {
  border-radius: var(--radius);
  padding: 1.75rem;
  color: var(--white);
}
.serve-card:nth-child(1) { background: linear-gradient(135deg, #4B2E83, #6a45a8); }
.serve-card:nth-child(2) { background: linear-gradient(135deg, var(--teal), #1aadad); }
.serve-card:nth-child(3) { background: linear-gradient(135deg, #c08b2a, var(--gold)); color: var(--charcoal); }
.serve-card h3 { color: var(--white); }
.serve-card:nth-child(3) h3 { color: var(--charcoal); }
.serve-card .age-badge {
  display: inline-block;
  background: rgba(255,255,255,.25);
  padding: .2rem .75rem;
  border-radius: 1rem;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

/* ---------- About ---------- */
@media(max-width:699px) {
  .about-page { display: flex; flex-direction: column; }
  .about-page > .page-hero { order: -2; }
  .about-page > .about-founder { order: -1; }
}
.about-leader {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
@media(min-width:700px) {
  .about-leader { grid-template-columns: 240px 1fr; }
}
.leader-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  background: linear-gradient(160deg, var(--purple) 0%, var(--teal) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.values-grid { display: grid; gap: 1rem; }
@media(min-width:480px) { .values-grid { grid-template-columns: repeat(2,1fr); } }
.value-card {
  background: #f7f4fb;
  border-left: 6px solid var(--gold);
  border-radius: 1rem;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 10px 22px rgba(32, 11, 56, 0.18);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.value-card h4 {
  color: var(--purple);
  margin-bottom: .6rem;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}
.value-card p {
  color: #2a1d3d;
  margin: 0;
}

/* ---------- Programs ---------- */
.program-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.program-card-header {
  padding: 1.5rem;
  color: var(--white);
}
.program-card:nth-child(1) .program-card-header { background: linear-gradient(135deg,#4B2E83,#6a45a8); }
.program-card:nth-child(2) .program-card-header { background: linear-gradient(135deg,var(--teal),#1aadad); }
.program-card:nth-child(3) .program-card-header { background: linear-gradient(135deg,#c08b2a,var(--gold)); color: var(--charcoal); }
.program-card:nth-child(3) .program-card-header h3 { color: var(--charcoal); }
.program-card-header h3 { color: var(--white); margin-bottom: .3rem; }
.program-card-body { padding: 1.5rem; }
.program-card-body ul { list-style: disc; padding-left: 1.25rem; }
.program-card-body li { margin-bottom: .35rem; }

/* ---------- Services ---------- */
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  border-top: 5px solid var(--teal);
}
.service-card.clinical { border-top-color: var(--purple); }
.service-card h3 { margin-bottom: .5rem; }
.service-card .service-icon { font-size: 2.4rem; margin-bottom: .75rem; }

/* ---------- Resources ---------- */
.resource-list li {
  padding: .5rem 0;
  border-bottom: 1px solid #e8e0f5;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.resource-list li::before { content: "→"; color: var(--teal); font-weight: 700; }
.resource-col h3 { margin-bottom: 1rem; }

/* ---------- Community ---------- */
.partner-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.partner-card .partner-icon { font-size: 2rem; flex-shrink: 0; }

/* ---------- Contact Form ---------- */
.form-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.form-section h3 {
  border-bottom: 3px solid var(--gold);
  padding-bottom: .5rem;
  margin-bottom: 1.25rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: .4rem;
  color: var(--charcoal);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .65rem 1rem;
  border: 2px solid #d0c4ea;
  border-radius: .6rem;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--cream);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
}
.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.radio-group label, .checkbox-group label {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 400;
  cursor: pointer;
}
.radio-group input, .checkbox-group input {
  width: 18px; height: 18px;
  accent-color: var(--purple);
  cursor: pointer;
  flex-shrink: 0;
}
.field-error { color: #c0392b; font-size: .875rem; margin-top: .25rem; display: none; }
.field-error.visible { display: block; }
.privacy-notice { font-size: .9rem; color: #555; margin-bottom: 1rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: #ccc;
  padding: 3rem 1.25rem 1.5rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  display: grid;
  gap: 2rem;
}
@media(min-width:640px) { .footer-inner { grid-template-columns: repeat(2,1fr); } }
@media(min-width:900px) { .footer-inner { grid-template-columns: repeat(3,1fr); } }
.footer-col h4 { color: var(--gold); margin-bottom: .75rem; font-size: 1rem; }
.footer-col p, .footer-col li { font-size: .9rem; margin-bottom: .3rem; }
.footer-col a { color: #aad4d4; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid #3a4a54;
  margin-top: 2rem;
  padding-top: 1.25rem;
  text-align: center;
  font-size: .85rem;
  color: #888;
  max-width: var(--max-w);
  margin-inline: auto;
}
.footer-clinical {
  grid-column: 1 / -1;
  background: rgba(255,255,255,.05);
  border: 1px solid #3a4a54;
  border-radius: .75rem;
  padding: 1rem 1.25rem;
  font-size: .85rem;
  line-height: 1.6;
}

/* ---------- Misc ---------- */
.tag { display: inline-block; background: #ece5f8; color: var(--purple); border-radius: 1rem; padding: .15rem .7rem; font-size: .82rem; font-weight: 700; margin: .2rem; }
.divider { border: none; border-top: 2px solid #e8e0f5; margin: 2rem 0; }
.visually-hidden { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--purple) 0%, #6a3fa8 70%, var(--teal) 100%);
  color: var(--white);
  padding: 3.5rem 1.25rem 3rem;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: .5rem; }
.page-hero p { color: rgba(255,255,255,.88); margin-inline: auto; max-width: 55ch; }
