:root {
  /* This site is designed light-only. Opt out of dark-mode UA restyling so
     form controls, buttons etc. don't render with the browser's dark colours. */
  color-scheme: light;

  /* Colors */
  --primary-green: #008000;
  /* Lush Green */
  --secondary-green: #006400;
  /* Darker Green */
  --accent-yellow: #FFD700;
  /* Gold/Yellow */
  --accent-red: #D32F2F;
  /* Red for highlights */
  --text-dark: #222222;
  --text-light: #F5F5F5;
  --white: #FFFFFF;
  --light-gray: #E0E0E0;

  /* Typography */
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --h1-size: 3rem;
  --h2-size: 2.5rem;
  --h3-size: 1.75rem;
  --body-size: 1.125rem;
  /* Large enough for seniors */

  /* Spacing */
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 32px;
  --spacing-xl: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-size: var(--body-size);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--white);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header & Navigation */
/* Scoped to the page's own top-level header so it never bleeds into a
   nested <header> inside page content (e.g. article/section markup). */
body > header {
  background-color: var(--white);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-md);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 60px;
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
}

.nav-links a {
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--text-dark);
  transition: color 0.3s;
  padding: var(--spacing-sm) var(--spacing-md);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-green);
  border-bottom: 3px solid var(--primary-green);
}

.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--primary-green);
}

/* Hero Section */
.hero {
  margin-top: 80px;
  height: 80vh;
  background: url('../assets/hero-bg.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  padding: var(--spacing-md);
}

.hero-content h1 {
  font-size: var(--h1-size);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  margin-bottom: var(--spacing-md);
  color: var(--white);
}

.hero-content p {
  font-size: 1.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  margin-bottom: var(--spacing-lg);
  font-weight: 500;
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-green);
  color: var(--white);
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: 1.25rem;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
  border: 2px solid var(--white);
}

.cta-button:hover {
  background-color: var(--secondary-green);
  transform: translateY(-2px);
}

/* Sections */
.section {
  padding: var(--spacing-xl) var(--spacing-md);
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: var(--h2-size);
  color: var(--primary-green);
  margin-bottom: var(--spacing-lg);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Live Feed (News & Events) */
.live-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-green);
}

.card-image {
  height: 200px;
  background-color: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 3rem;
}

.card-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.card-content {
  padding: var(--spacing-md);
}

.card-tag {
  display: inline-block;
  background-color: var(--accent-yellow);
  color: var(--text-dark);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: bold;
  margin-bottom: var(--spacing-sm);
}

.card-date {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: var(--spacing-sm);
}

.card-title {
  font-size: 1.25rem;
  color: var(--primary-green);
  margin-bottom: var(--spacing-sm);
}

/* Homepage "Latest Updates" carousel - scoped to #feed-container only, so
   the News page's own card grid (#news-feed, same .live-feed class) is unaffected. */
.home-feed-carousel {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

#feed-container {
  display: flex;
  overflow-x: auto;
  gap: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-width: 0;
}

#feed-container .card {
  flex: 0 0 auto;
  width: 300px;
  scroll-snap-align: start;
}

#feed-container .news-status {
  flex: 1 1 100%;
  width: 100%;
}

.home-feed-nav {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--light-gray);
  background: var(--white);
  color: var(--primary-green);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.home-feed-nav:hover:not(:disabled) {
  background: var(--primary-green);
  color: var(--white);
}

.home-feed-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 640px) {
  /* Touch devices scroll the feed directly; the arrow buttons just take up space. */
  .home-feed-nav {
    display: none;
  }
}

/* Photo Reel */
.photo-reel {
  display: flex;
  overflow-x: auto;
  gap: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.photo-item {
  min-width: 300px;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 2px solid transparent;
  transition: border-color 0.3s;
}

.photo-item:hover {
  border-color: var(--primary-green);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.photo-item:hover img {
  transform: scale(1.1);
}

/* Registration Form Styles */
.form-container {
  max-width: 800px;
  margin: 0 auto;
  background: #f9f9f9;
  padding: var(--spacing-lg);
  border-radius: 8px;
  border: 1px solid var(--light-gray);
}

.registration-form label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: bold;
  color: var(--primary-green);
}

.registration-form .radio-group,
.registration-form .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.radio-option,
.checkbox-option {
  display: flex !important;
  align-items: flex-start !important;
  gap: var(--spacing-sm);
  font-weight: normal !important;
  color: var(--text-dark) !important;
  cursor: pointer;
}

.radio-option input,
.checkbox-option input {
  margin-top: 4px;
  width: auto !important;
}

.checkbox-option span {
  font-size: 0.95rem;
}

.form-actions {
  margin-top: var(--spacing-lg);
}

/* Scoped to the page's own bottom footer - a bare `footer` selector would
   paint any nested <footer> in page content dark. */
body > footer {
  background-color: var(--text-dark);
  color: var(--white);
  padding: var(--spacing-lg) var(--spacing-md);
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.social-links {
  margin-top: var(--spacing-md);
}

.social-links a {
  color: var(--white);
  font-size: 1.5rem;
  margin: 0 var(--spacing-sm);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .hamburger {
    display: block;
    margin-left: auto;
    /* Right justify */
  }


  .nav-links {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--white);
    flex-direction: column;
    padding: var(--spacing-md);
    gap: var(--spacing-md);
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease-in-out;
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .hero-content h1 {
    font-size: 2rem;
  }
}

/* Hero Buttons */
.hero-btns {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button.secondary {
  background-color: transparent;
  border-color: var(--white);
}

.cta-button.secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Registration Form */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  padding: var(--spacing-lg);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--light-gray);
}

.registration-form .form-group {
  margin-bottom: var(--spacing-md);
}

/* Honeypot - off-screen, not display:none (some bots skip hidden fields) */
.reg-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.reg-alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: var(--spacing-md);
}

.reg-alert--error {
  background: #fdecea;
  border: 1px solid #f5c6c2;
  color: var(--accent-red);
}

.reg-alert ul {
  margin: 6px 0 0 18px;
}

.registration-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: var(--secondary-green);
}

.registration-form input[type="text"],
.registration-form input[type="email"],
.registration-form input[type="tel"],
.registration-form select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.registration-form input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 5px rgba(0, 128, 0, 0.2);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: normal !important;
  color: var(--text-dark) !important;
}

.radio-option input,
.checkbox-option input {
  margin-top: 5px;
}

.checkbox-group {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--light-gray);
}

.form-actions {
  margin-top: var(--spacing-lg);
}

/* Organization Chart */
.org-chart {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  align-items: center;
}

.org-level {
  display: flex;
  justify-content: center;
  width: 100%;
}

.team-card {
  max-width: 350px;
  width: 100%;
  text-align: center;
}

.president-level .team-card {
  border-top: 5px solid var(--primary-green);
}

.secretary-level .team-card {
  border-top: 5px solid var(--accent-yellow);
}

.team-image {
  height: 300px !important;
  /* Fixed height for consistency */
  background-color: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.team-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.exco-section {
  width: 100%;
  text-align: center;
}

.exco-title {
  font-size: var(--h3-size);
  color: var(--primary-green);
  margin-bottom: var(--spacing-lg);
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.exco-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--primary-green);
}

.exco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

.exco-grid .team-card {
  max-width: none;
  /* Allow grid to control width */
}

@media (max-width: 768px) {
  .team-image {
    height: 250px !important;
  }

  .exco-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* News Updates page */
.news-card {
  display: block;
  color: inherit;
}

.news-card .card-image i {
  font-size: 3rem;
}

.news-status {
  grid-column: 1 / -1;
  text-align: center;
  color: #666;
  padding: var(--spacing-lg);
}

.news-status--error {
  color: var(--accent-red);
  font-weight: bold;
}

.news-back {
  display: inline-block;
  margin-bottom: var(--spacing-lg);
  font-weight: bold;
  color: var(--primary-green);
}

.news-back:hover {
  text-decoration: underline;
}

.news-article {
  max-width: 800px;
  margin: 0 auto;
}

.news-article-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.news-article-image {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: var(--spacing-lg);
  background-color: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 460px;
}

.news-article-image i {
  font-size: 4rem;
  color: #666;
  padding: var(--spacing-xl);
}

.news-article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-article-body p {
  margin-bottom: var(--spacing-md);
}

/* Rich content produced by the admin editor */
.news-article-body h2,
.news-article-body h3,
.news-article-body h4 {
  color: var(--secondary-green);
  margin: var(--spacing-lg) 0 var(--spacing-sm);
  line-height: 1.3;
}

.news-article-body h2 { font-size: 1.6rem; }
.news-article-body h3 { font-size: 1.3rem; }
.news-article-body h4 { font-size: 1.1rem; }

.news-article-body ul,
.news-article-body ol {
  margin: 0 0 var(--spacing-md) var(--spacing-lg);
}

.news-article-body li {
  margin-bottom: var(--spacing-sm);
}

.news-article-body a {
  color: var(--primary-green);
  text-decoration: underline;
}

.news-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: var(--spacing-md) 0;
}

.news-article-body figure {
  margin: var(--spacing-md) 0;
}

.news-article-body figcaption {
  font-size: 0.9rem;
  color: #666;
  margin-top: var(--spacing-sm);
}

.news-article-body blockquote {
  margin: var(--spacing-md) 0;
  padding: var(--spacing-sm) var(--spacing-md);
  border-left: 4px solid var(--accent-yellow);
  background: #f9f9f9;
  color: #444;
}

.news-article-body table {
  border-collapse: collapse;
  width: 100%;
  margin: var(--spacing-md) 0;
  font-size: 1rem;
  display: block;
  overflow-x: auto;
}

.news-article-body th,
.news-article-body td {
  border: 1px solid var(--light-gray);
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
  vertical-align: top;
}

.news-article-body th {
  background: #eef2ee;
}

.news-article-body pre {
  background: #f4f4f4;
  padding: var(--spacing-md);
  border-radius: 6px;
  overflow-x: auto;
}

.news-article-foot {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--light-gray);
  font-weight: bold;
}

.news-article-foot a {
  color: var(--primary-green);
}

/* Events page - calendar + upcoming list */
.events-calendar {
  max-width: 1000px;
  margin: 0 auto;
}

.events-cal-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.events-cal-head h3 {
  font-size: 1.5rem;
  color: var(--primary-green);
  min-width: 12rem;
  text-align: center;
}

.events-cal-nav {
  background: var(--primary-green);
  color: var(--white);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.events-cal-nav:hover {
  background: var(--secondary-green);
}

.events-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  padding: 4px;
  background: var(--light-gray);
}

.events-cal-wd {
  background: #eef2ee;
  text-align: center;
  font-weight: bold;
  padding: var(--spacing-sm) 0;
  font-size: 0.9rem;
  color: var(--secondary-green);
}

.events-cal-day {
  background: var(--white);
  min-height: 96px;
  padding: 4px 5px 6px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.events-cal-day.is-outside {
  background: #fafafa;
  color: #aaa;
}

.events-cal-day.is-today {
  outline: 2px solid var(--accent-yellow);
  outline-offset: -2px;
}

.events-cal-num {
  font-weight: bold;
}

.events-pill {
  display: block;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.events-pill--event {
  background: var(--primary-green);
  color: var(--white);
}

.events-pill--holiday {
  background: var(--accent-yellow);
  color: var(--text-dark);
}

.events-pill-link {
  text-decoration: none;
}

.events-pill-link:hover .events-pill--event {
  background: var(--secondary-green);
}

.events-calendar-hint {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin-top: var(--spacing-md);
}

/* Upcoming events list */
.events-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.events-item {
  display: flex;
  gap: var(--spacing-md);
  border: 1px solid var(--light-gray);
  border-left: 5px solid var(--primary-green);
  border-radius: 8px;
  padding: var(--spacing-md);
  background: var(--white);
}

.events-item-date {
  flex: 0 0 60px;
  text-align: center;
  border-right: 1px solid var(--light-gray);
  padding-right: var(--spacing-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.events-item-day {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-green);
  line-height: 1;
}

.events-item-mon {
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #666;
}

.events-item-body h3 {
  font-size: 1.2rem;
  color: var(--secondary-green);
  margin-bottom: 4px;
}

.events-item-meta {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: var(--spacing-sm);
}

.events-item-link {
  font-weight: bold;
  color: var(--primary-green);
}

.events-item-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .events-calendar {
    overflow-x: auto;
  }

  .events-cal-grid {
    min-width: 560px;
  }
}

/* ==========================================================================
   Photo gallery
   ========================================================================== */

/* Featured album */
.gallery-featured {
  margin-top: 80px;
}

.gallery-featured-inner {
  display: block;
  position: relative;
  width: 100%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--text-dark);
  overflow: hidden;
}

.gallery-featured-img {
  width: 100%;
  height: 60vh;
  min-height: 320px;
  max-height: 620px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s, opacity 0.3s;
}

.gallery-featured-inner:hover .gallery-featured-img {
  transform: scale(1.03);
  opacity: 0.9;
}

.gallery-featured-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  text-align: center;
  color: var(--white);
  background: rgba(0, 0, 0, 0.35);
  padding: var(--spacing-md);
}

.gallery-featured-title {
  font-size: clamp(1.8rem, 5vw, 3.25rem);
  font-weight: bold;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.gallery-featured-meta {
  font-size: 1.1rem;
  font-weight: 500;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

/* "All Gallery" */
.gallery-rule {
  border: none;
  border-top: 2px solid var(--primary-green);
  max-width: 1200px;
  margin: 0 auto var(--spacing-lg);
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  justify-content: center;
  margin-bottom: var(--spacing-lg);
}

.gallery-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: bold;
  color: var(--secondary-green);
  font-size: 0.95rem;
}

.gallery-filter select,
.gallery-filter input {
  font: inherit;
  font-weight: normal;
  padding: 10px 12px;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  min-width: 220px;
}

.gallery-filter select:focus,
.gallery-filter input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 5px rgba(0, 128, 0, 0.2);
}

/* Album grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

.gallery-card {
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.gallery-card-media {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--light-gray);
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-card:hover .gallery-card-media {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.gallery-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}

.gallery-card:hover .gallery-card-media img {
  opacity: 0.55;
}

.gallery-card-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.gallery-card-title {
  position: absolute;
  left: var(--spacing-md);
  right: var(--spacing-md);
  bottom: var(--spacing-md);
  color: var(--white);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.25;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.gallery-card-cta {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--primary-green);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}

.gallery-card:hover .gallery-card-cta,
.gallery-card:focus-visible .gallery-card-cta {
  opacity: 1;
}

.gallery-card-info {
  font-size: 0.9rem;
  color: #666;
}

/* Pagination */
.gallery-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xl);
}

.gallery-page {
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--light-gray);
  background: var(--white);
  color: var(--text-dark);
  font: inherit;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}

.gallery-page:hover:not(:disabled) {
  border-color: var(--primary-green);
  color: var(--primary-green);
}

.gallery-page.is-active {
  background: var(--primary-green);
  color: var(--white);
  border-color: var(--primary-green);
}

.gallery-page:disabled {
  opacity: 0.4;
  cursor: default;
}

@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

body.lightbox-open {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}

.lightbox-dialog {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto auto;
  padding: 56px 72px 12px;
}

.lightbox-stage {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  gap: var(--spacing-sm);
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  background: #111;
}

.lightbox-caption {
  color: var(--text-light);
  text-align: center;
  font-size: 0.95rem;
  max-width: 800px;
}

.lightbox-meta {
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  padding: 6px 0;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(0, 0, 0, 0.45);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--primary-green);
}

.lightbox-close {
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 1.5rem;
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-film {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 4px 4px;
  scrollbar-width: thin;
}

.lightbox-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 54px;
  border: 2px solid transparent;
  border-radius: 3px;
  overflow: hidden;
  padding: 0;
  background: none;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s;
}

.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox-thumb.is-active {
  opacity: 1;
  border-color: var(--primary-green);
}

.lightbox-thumb:hover {
  opacity: 1;
}

@media (max-width: 680px) {
  .lightbox-dialog {
    padding: 52px 12px 8px;
  }

  .lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }

  .lightbox-film {
    display: none;
  }
}

/* ==========================================================================
   Forum
   ========================================================================== */

.forum {
  margin-top: 80px;
  max-width: 900px;
}

.forum-intro {
  max-width: 700px;
  color: #444;
  margin-bottom: var(--spacing-lg);
}

.forum-muted {
  color: #777;
  font-size: 0.9em;
}

.forum-back {
  color: var(--primary-green);
  font-weight: bold;
}

.forum-back:hover {
  text-decoration: underline;
}

.forum-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* honeypot - off-screen, not display:none */
.forum-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.forum-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
}

.forum-searchbox {
  display: flex;
  gap: 6px;
}

.forum-searchbox input {
  padding: 10px 12px;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  font: inherit;
  min-width: 220px;
  background: var(--white);
  color: var(--text-dark);
}

.forum-searchbox button {
  padding: 10px 16px;
  border: none;
  background: var(--primary-green);
  color: var(--white);
  font: inherit;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}

.forum-searchbox button:hover {
  background: var(--secondary-green);
}

.forum-searchbox--page {
  margin: var(--spacing-md) 0 var(--spacing-lg);
}

.forum-searchbox--page input {
  flex: 1;
}

/* Categories */
.forum-categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.forum-cat {
  padding: 8px 14px;
  border: 1px solid var(--light-gray);
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.forum-cat:hover {
  border-color: var(--primary-green);
}

.forum-cat.is-active {
  background: var(--primary-green);
  color: var(--white);
  border-color: var(--primary-green);
}

.forum-cat-count {
  opacity: 0.7;
  font-size: 0.85em;
}

.forum-listing-title {
  font-size: 1.4rem;
  color: var(--primary-green);
  margin-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--light-gray);
  padding-bottom: var(--spacing-sm);
}

/* Thread list */
.forum-thread-list {
  list-style: none;
  margin: 0 0 var(--spacing-lg);
  padding: 0;
}

.forum-thread-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  margin-bottom: var(--spacing-sm);
  transition: border-color 0.2s;
}

.forum-thread-row:hover {
  border-color: var(--primary-green);
}

.forum-thread-title {
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--secondary-green);
}

.forum-thread-title:hover {
  text-decoration: underline;
}

.forum-thread-meta {
  font-size: 0.9rem;
  color: #666;
  margin-top: 4px;
}

.forum-badge {
  display: inline-block;
  background: var(--accent-yellow);
  color: var(--text-dark);
  font-size: 0.78rem;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 4px;
}

.forum-lock {
  margin-left: 6px;
}

.forum-thread-stats {
  text-align: right;
  font-size: 0.88rem;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
}

.forum-thread-replies {
  font-weight: bold;
  color: var(--text-dark);
}

/* Pager */
.forum-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: var(--spacing-lg) 0;
}

.forum-pager-btn {
  min-width: 40px;
  padding: 8px 12px;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  text-align: center;
  color: var(--text-dark);
  font-weight: bold;
}

.forum-pager-btn:hover {
  border-color: var(--primary-green);
  color: var(--primary-green);
}

.forum-pager-btn.is-active {
  background: var(--primary-green);
  color: var(--white);
  border-color: var(--primary-green);
}

.forum-pager-gap {
  padding: 8px 4px;
  color: #999;
}

.forum-empty {
  padding: var(--spacing-lg);
  background: #f9f9f9;
  border-radius: 8px;
  text-align: center;
}

.forum-privacy-note {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--light-gray);
  font-size: 0.82rem;
  color: #888;
}

/* Alerts */
.forum-alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: var(--spacing-lg);
}

.forum-alert--error {
  background: #fdecea;
  border: 1px solid #f5c6c2;
  color: var(--accent-red);
}

.forum-alert--ok {
  background: #e7f4e8;
  border: 1px solid #bfe0c2;
  color: var(--secondary-green);
}

.forum-alert ul {
  margin: 6px 0 0 18px;
}

/* Forms */
.forum-form {
  max-width: 640px;
}

.forum-field {
  margin-bottom: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.forum-field label {
  font-weight: bold;
  color: var(--secondary-green);
}

.forum-field input,
.forum-field select,
.forum-field textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  width: 100%;
  background: var(--white);
  color: var(--text-dark);
}

.forum-field textarea {
  resize: vertical;
}

.forum-field input:focus,
.forum-field select:focus,
.forum-field textarea:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 5px rgba(0, 128, 0, 0.2);
}

.forum-field-error {
  color: var(--accent-red);
  font-size: 0.88rem;
  font-weight: bold;
}

.forum-counter {
  align-self: flex-end;
}

.forum-counter--over {
  color: var(--accent-red);
}

.forum-form-actions {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-top: var(--spacing-md);
}

/* Posts */
.forum-thread-heading {
  text-align: left;
  font-size: 1.8rem;
}

.forum-post {
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  background: var(--white);
}

.forum-post--op {
  border-left: 5px solid var(--primary-green);
  background: #fbfdfb;
}

.forum-post-head {
  display: flex;
  align-items: baseline;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid #eee;
}

.forum-post-author {
  font-weight: bold;
  color: var(--secondary-green);
}

.forum-post-time {
  font-size: 0.85rem;
  color: #888;
}

.forum-post-body {
  line-height: 1.7;
  overflow-wrap: break-word;
}

.forum-post-body p {
  margin-bottom: var(--spacing-sm);
}

.forum-post-body a {
  color: var(--primary-green);
  text-decoration: underline;
}

.forum-post-body ul,
.forum-post-body ol {
  margin: 0 0 var(--spacing-sm) var(--spacing-lg);
}

.forum-post-body blockquote {
  border-left: 3px solid var(--accent-yellow);
  padding-left: var(--spacing-md);
  color: #555;
  margin: var(--spacing-sm) 0;
}

.forum-post-body code {
  background: #f2f2f2;
  padding: 1px 5px;
  border-radius: 3px;
}

.forum-post-body pre {
  background: #f4f4f4;
  padding: var(--spacing-md);
  border-radius: 6px;
  overflow-x: auto;
}

.forum-post-foot {
  margin-top: var(--spacing-sm);
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: right;
  font-size: inherit;
}

.forum-report-form {
  display: inline;
  margin: 0;
}

.forum-report-btn {
  background: transparent;
  border: none;
  padding: 4px 2px;
  color: #5c5c5c; /* >= 7:1 on the white card - passes WCAG AA */
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.forum-report-btn:hover,
.forum-report-btn:focus-visible {
  color: var(--accent-red); /* #D32F2F ~ 4.9:1 on white - passes AA */
}

.forum-replies-title {
  font-size: 1.2rem;
  color: var(--primary-green);
  margin: var(--spacing-lg) 0 var(--spacing-md);
}

.forum-reply-box {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 2px solid var(--light-gray);
}

.forum-reply-box h2 {
  font-size: 1.3rem;
  color: var(--primary-green);
  margin-bottom: var(--spacing-md);
}

.forum-locked-note {
  margin-top: var(--spacing-xl);
  padding: var(--spacing-md);
  background: #f5f5f5;
  border-radius: 8px;
  text-align: center;
  color: #666;
}

@media (max-width: 560px) {
  .forum-thread-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .forum-thread-stats {
    text-align: left;
    flex-direction: row;
    gap: var(--spacing-md);
  }
}