/* Bayside Trails - Friends of Bayside Trails */

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #2c2c2c;
  background: #fff;
}

/* Navigation */
nav {
  background: #2d5016;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

nav .nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

nav .site-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 1rem 0;
  flex-shrink: 0;
  margin-right: 2rem;
}

nav .nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav .nav-links a {
  display: block;
  color: #cde8a0;
  text-decoration: none;
  padding: 1rem 1rem;
  font-size: 0.9rem;
  transition: color 0.2s, background 0.2s;
}

nav .nav-links a:hover,
nav .nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

/* Page layout */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Headings */
h1 {
  font-size: 2.2rem;
  color: #1e3a0a;
  margin-top: 0;
  margin-bottom: 0.3rem;
  border-bottom: 3px solid #5a8a25;
  padding-bottom: 0.4rem;
}

h2 {
  font-size: 1.5rem;
  color: #2d5016;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.15rem;
  color: #3d6b1f;
  margin-top: 1.5rem;
}

p {
  margin: 0.8rem 0;
}

a {
  color: #4a7a1e;
  text-decoration: underline;
}

a:hover {
  color: #2d5016;
}

/* Year headings in history */
.year-section {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #d0e8b0;
}

.year-section:first-of-type {
  border-top: none;
}

/* Image galleries */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: #eee;
}

.lightbox-target {
  cursor: zoom-in;
}

.gallery.single img {
  max-width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
}

.gallery.featured {
  grid-template-columns: 1fr;
}

.gallery.featured img {
  max-width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  border-radius: 4px;
}

/* Lead image */
.lead-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 6px;
  margin: 1rem 0 1.5rem;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 2000;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-image {
  max-width: min(95vw, 1400px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

.lightbox-caption {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  font-size: 0.95rem;
  max-width: 90vw;
}

body.lightbox-open {
  overflow: hidden;
}

/* Advocacy sections */
.section-card {
  background: #f8fdf2;
  border-left: 4px solid #5a8a25;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 6px 6px 0;
}

.section-card h2 {
  margin-top: 0;
}

/* Lists */
ul {
  padding-left: 1.5rem;
}

ul li {
  margin: 0.4rem 0;
}

/* Footer */
footer {
  background: #1e3a0a;
  color: #a8d070;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
}

footer a {
  color: #cde8a0;
}

footer nav {
  background: none;
  position: static;
  box-shadow: none;
}

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  flex-wrap: wrap;
}

footer .footer-links a {
  color: #cde8a0;
  text-decoration: none;
  font-size: 0.85rem;
}

footer .footer-links a:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 600px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.25rem; }
  nav .site-title { font-size: 0.95rem; margin-right: 1rem; }
  nav .nav-links a { padding: 0.75rem 0.6rem; font-size: 0.82rem; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
