/* ===========================
   CBNM — Citizens for a Better Norwood MA
   Main Stylesheet
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Source+Sans+3:wght@300;400;600;700&display=swap');

:root {
  --navy:      #1a2744;
  --navy-dark: #0f1a30;
  --red:       #c0392b;
  --red-light: #e74c3c;
  --gold:      #c9a84c;
  --gold-light:#f0c84a;
  --white:     #ffffff;
  --off-white: #f5f4f0;
  --light-gray:#e8e6e0;
  --mid-gray:  #9a9589;
  --text:      #1e1e1e;
  --shadow:    0 4px 24px rgba(0,0,0,0.15);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.2);
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

p { font-size: 1.05rem; color: #3a3a3a; }

a { color: var(--navy); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--red); }

/* ---- NAVIGATION ---- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--navy);
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo img {
  height: 48px;
  width: auto;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-logo-text .org-name {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--white);
  letter-spacing: 0.01em;
}

.nav-logo-text .org-sub {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.nav-cta {
  background: var(--red) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.1rem !important;
  border-radius: 4px;
}

.nav-cta:hover {
  background: var(--red-light) !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}

/* ---- PAGE HERO ---- */
.page-hero {
  padding: 7rem 2rem 4rem;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #243156 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero-content {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
}

.page-hero p {
  color: rgba(255,255,255,0.8);
  font-size: 1.2rem;
  max-width: 100%;
  margin: 0 auto;
}

.hero-divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 1.25rem auto;
}

/* ---- SECTIONS ---- */
.section {
  padding: 5rem 2rem;
}

.section-alt {
  background: var(--off-white);
}

.container {
  max-width: 100%;
  margin: 0 auto;
}

.container-narrow {
  max-width: 100%;
  margin: 0 auto;
}

/* ---- SECTION LABEL ---- */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.75rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-light);
  border-color: var(--red-light);
  color: var(--white);
}

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

.btn-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-white:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--navy);
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- CARDS ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: 8px;
  padding: 2rem;
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

/* ---- CTA BANNER ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--red));
}

.cta-banner h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-banner p {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* ---- MISSION POINTS ---- */
.mission-point {
  padding: 2rem 0;
  border-bottom: 1px solid var(--light-gray);
}

.mission-point:last-child {
  border-bottom: none;
}

/* ---- SUPPORT LIST ---- */
.support-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.support-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--off-white);
  border-radius: 6px;
  border-left: 3px solid var(--navy);
  font-size: 1rem;
  color: #333;
}

.support-list li::before {
  content: '✓';
  color: var(--navy);
  font-weight: 900;
  flex-shrink: 0;
}

/* ---- EVENT CARDS ---- */
.event-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--navy);
  transition: transform 0.2s, box-shadow 0.2s;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.event-date {
  text-align: center;
  min-width: 64px;
  background: var(--navy);
  color: var(--white);
  border-radius: 6px;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.event-date .month {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.event-date .day {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.event-info h3 {
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
}

.event-meta {
  font-size: 0.85rem;
  color: var(--mid-gray);
  margin-bottom: 0.6rem;
}

/* ---- CONTACT FORM ---- */
.contact-form {
  background: var(--white);
  border-radius: 10px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  color: var(--navy);
  letter-spacing: 0.02em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--light-gray);
  border-radius: 4px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  font-size: 0.95rem;
  cursor: pointer;
  color: #333;
}

.checkbox-item input { width: auto; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.65);
  padding: 4rem 2rem 0;
}

.footer-inner {
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  max-width: 340px;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col ul a {
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col ul a:hover { color: var(--white); }

.footer-address p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem 0;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: var(--white); }

/* ---- ALERTS ---- */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-weight: 600;
  display: none;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ---- STAR/FLAG ACCENT ---- */
.stars-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.star { color: var(--gold); font-size: 1rem; }

/* ---- STATS ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--light-gray);
  border-bottom: 1px solid var(--light-gray);
  margin: 3rem 0;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--navy);
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid-gray);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .notices-grid { grid-template-columns: 1fr !important; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--navy);
    padding: 1.5rem;
    gap: 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .form-row { grid-template-columns: 1fr; }
  .checkbox-group { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .stats-row { grid-template-columns: 1fr; gap: 1.5rem; }
  .event-card { flex-direction: column; }
  .contact-form { padding: 2rem 1.5rem; }
  .btn-group { flex-direction: column; align-items: center; }
  .card-grid { grid-template-columns: 1fr; }
}
