/* =========================================
   WOLCOTT COMMUNITY TRUST — style.css
   Clean & minimal design
   ========================================= */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #1a3a5c;
  --blue:    #2b6cb0;
  --light-blue: #ebf4ff;
  --gold:    #b8860b;
  --gray:    #555;
  --light:   #f7f8fa;
  --white:   #fff;
  --border:  #dde1e7;
  --radius:  6px;
  --shadow:  0 2px 10px rgba(0,0,0,0.08);
  --font:    'Segoe UI', system-ui, Arial, sans-serif;
  --max-w:   1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: #333;
  line-height: 1.7;
  font-size: 16px;
  background: var(--white);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--navy); line-height: 1.3; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }

p { margin-bottom: 1rem; color: var(--gray); }

ul { list-style: none; }

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

/* --- LAYOUT HELPERS --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 4rem 0; }
.bg-light   { background: var(--light); }
.center     { text-align: center; }
.sub-text   { color: var(--gray); margin-bottom: 2rem; }

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
  border: 2px solid transparent;
  text-decoration: none;
}
.btn:hover { opacity: 0.88; text-decoration: none; }

.btn-primary  { background: var(--blue); color: var(--white); }
.btn-secondary{ background: var(--navy); color: var(--white); }
.btn-outline  { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.15); }

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

.link-arrow { font-weight: 600; color: var(--blue); }

/* --- NAVIGATION --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 64px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.logo a {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.01em;
}

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

.nav-links a {
  color: rgba(255,255,255,0.85);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- HERO (HOME) --- */
.hero {
  min-height: 520px;
  background: linear-gradient(135deg, var(--navy) 0%, #2b6cb0 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('photos/hero.jpg') center/cover no-repeat;
  opacity: 0.18;
}

.hero-overlay {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  color: var(--white);
}

.hero-overlay h1 {
  color: var(--white);
  font-size: 2.8rem;
  max-width: 700px;
}

.hero-overlay p {
  color: rgba(255,255,255,0.88);
  font-size: 1.2rem;
  max-width: 580px;
}

/* --- PAGE HERO (INNER PAGES) --- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2b6cb0 100%);
  padding: 3rem 0;
  color: var(--white);
}
.page-hero h1 { color: var(--white); margin-bottom: 0.4rem; }
.page-hero p  { color: rgba(255,255,255,0.85); margin: 0; }

/* --- MISSION --- */
.mission .container { max-width: 760px; text-align: center; }
.mission h2 { margin-bottom: 1rem; }
.mission p  { font-size: 1.1rem; }

/* --- CARD GRID (NEWS PREVIEW) --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.12); }

.card-date {
  font-size: 0.8rem;
  color: var(--blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.card h3 { margin-bottom: 0.5rem; }

.center-link { text-align: center; margin-top: 1rem; }

/* --- STATS --- */
.stats { background: var(--navy); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat { color: var(--white); }
.stat-number { display: block; font-size: 2.5rem; font-weight: 700; color: #90caf9; }
.stat-label  { font-size: 0.95rem; color: rgba(255,255,255,0.75); }

/* --- CTA --- */
.cta .container p { max-width: 600px; margin: 0 auto 1.5rem; font-size: 1.05rem; }

/* --- NEWS PAGE --- */
.news-list { display: flex; flex-direction: column; gap: 2rem; }

.news-item {
  border-left: 4px solid var(--blue);
  padding-left: 1.5rem;
}

.news-meta {
  font-size: 0.8rem;
  color: var(--blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.news-item h2 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.news-item p:last-child { margin-bottom: 0; }

/* --- DONORS PAGE --- */
.donate-box {
  background: var(--light-blue);
  border: 1px solid #bee3f8;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1rem;
}

.donate-box h2 { margin-bottom: 0.75rem; }

.donate-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.donate-option {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.donate-option h3 { color: var(--navy); margin-bottom: 0.5rem; }

.donor-tiers { display: flex; flex-direction: column; gap: 2rem; }

.donor-tier { padding: 1.5rem; background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); }

.tier-label { font-size: 1rem; margin-bottom: 1rem; }
.tier-label.gold    { color: #8B6914; }
.tier-label.silver  { color: #555; }
.tier-label.bronze  { color: #8a4e1f; }
.tier-label.community { color: var(--navy); }

.donor-list { columns: 2; gap: 1rem; }
.donor-list li { padding: 0.3rem 0; color: var(--gray); border-bottom: 1px dotted var(--border); }
.donor-note { color: var(--gray); margin: 0; }

/* --- GALLERY PAGE --- */
.gallery-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.45rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: 99px;
  background: var(--white);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  aspect-ratio: 4/3;
}
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow); }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(0,0,0,0.5);
  text-align: center;
  padding: 1rem;
}

.gallery-item.hidden { display: none; }

/* --- LIGHTBOX --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.open { display: flex; }

.lightbox-content {
  max-width: 90vw;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius);
}

.lightbox-caption {
  color: rgba(255,255,255,0.8);
  margin-top: 1rem;
  font-size: 0.95rem;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.3); }
.lightbox-close { top: 1.5rem; right: 1.5rem; font-size: 1.8rem; }
.lightbox-prev  { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); }

/* --- CONTACT PAGE --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h2 { margin-bottom: 1rem; }
.info-block { margin-bottom: 1.5rem; }
.info-block strong { display: block; color: var(--navy); margin-bottom: 0.2rem; }
.info-block p { margin: 0; }

/* FORMS */
.contact-form, .subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-form label { font-weight: 600; font-size: 0.9rem; color: var(--navy); }

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font);
  color: #333;
  transition: border-color 0.2s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
}

.contact-form textarea { resize: vertical; }

.form-note { font-size: 0.8rem; color: #888; margin-top: 0.25rem; margin-bottom: 0; }

.form-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: #2e7d32;
  font-weight: 600;
}

/* SUBSCRIBE */
.subscribe-box { max-width: 600px; margin: 0 auto; text-align: center; }
.subscribe-box h2 { margin-bottom: 0.75rem; }
.subscribe-box p { margin-bottom: 1.5rem; }

.subscribe-form {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: stretch;
  margin-bottom: 0.75rem;
}
.subscribe-form input {
  flex: 1;
  min-width: 180px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font);
}
.subscribe-form input:focus { outline: none; border-color: var(--blue); }

/* --- FOOTER --- */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 2rem 0;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

footer p { margin: 0; color: rgba(255,255,255,0.7); }
footer a { color: rgba(255,255,255,0.85); }
footer a:hover { color: var(--white); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.4rem; }

  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); padding: 1rem 1.5rem 1.5rem; gap: 0.1rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero-overlay h1 { font-size: 2rem; }
  .hero-overlay p  { font-size: 1rem; }

  .contact-grid { grid-template-columns: 1fr; }

  .donor-list { columns: 1; }

  .footer-inner { flex-direction: column; text-align: center; }

  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }

  .subscribe-form { flex-direction: column; }
  .subscribe-form input { min-width: unset; }
}
