/* Custom Properties / Tokens */
:root {
  /* Colors */
  --primary-color: #2b5c46;
  /* Baerl Nature Green */
  --primary-light: #448065;
  --secondary-color: #e9a944;
  /* Warm Accent (Fire, Festivity) */
  --bg-color: #faf9f6;
  /* Off-white for warmth */
  --bg-gradient: linear-gradient(135deg, #faf9f6 0%, #f0eee5 100%);
  --text-main: #2c312e;
  /* Dark slate */
  --text-light: #5d6761;
  --white: #ffffff;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px rgba(43, 92, 70, 0.08);

  /* Typography */
  --font-main: 'Outfit', sans-serif;

  /* Spacing & Layout */
  --section-padding: 6rem 0;
  --container-width: 1200px;
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 80px;
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -1px;
}

h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 600;
  position: relative;
  display: inline-block;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

.subtitle {
  color: var(--secondary-color);
  font-size: 1.25rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  color: var(--text-light);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* Layout */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.center {
  text-align: center;
}

/* Components */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(43, 92, 70, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(43, 92, 70, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--primary-color);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius);
}

/* Header & Nav */
.glass-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.4s ease;
}

.glass-header.scrolled {
  padding: 0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  transition: height 0.4s ease;
}

.glass-header.scrolled .nav-wrapper {
  height: 60px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.desktop-nav ul {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.desktop-nav a {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main);
  position: relative;
}

.desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  width: 100%;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--primary-color);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  background: url('images/hero_bg.webp') center/cover no-repeat;
  background-color: var(--primary-light);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(43, 92, 70, 0.8) 0%, rgba(20, 45, 34, 0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  color: var(--white);
  max-width: 800px;
}

.hero-logo-container {
  position: absolute;
  top: 100px;
  /* Below the header */
  right: 5%;
  z-index: 20;
}

.hero-logo {
  width: clamp(100px, 15vw, 180px);
  /* Responsive sizing */
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.hero-logo:hover {
  transform: scale(1.05);
}

.hero-content h1 {
  color: var(--white);
}

.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.hero-buttons .btn-primary {
  border: 2px solid var(--white);
}

/* About Section */
.about-section {
  padding: var(--section-padding);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.image-placeholder {
  width: 100%;
  height: 400px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-color) 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.about-image-wrapper {
  position: relative;
}

.about-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -15px;
  border: 2px dashed var(--primary-light);
  border-radius: calc(var(--border-radius) + 5px);
  z-index: -1;
  opacity: 0.3;
}

/* Events Section */
.events-section {
  padding: var(--section-padding);
  background-color: var(--white);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.event-card {
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.event-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.event-image {
  height: 220px;
  position: relative;
  overflow: hidden;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.event-card:hover .event-image img {
  transform: scale(1.05);
}

.event-date {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--glass-bg);
  backdrop-filter: blur(5px);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.event-content {
  padding: 2rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  font-weight: 600;
  color: var(--secondary-color);
}

.read-more span {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.read-more:hover span {
  transform: translateX(5px);
}

/* Gallery Section */
.gallery-section {
  padding: var(--section-padding);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-auto-rows: 250px;
  gap: 1.5rem;
  margin-top: 3rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  background: #e2e8f0;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item img,
.gallery-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img,
.gallery-item:hover .gallery-fallback {
  transform: scale(1.1);
}

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  font-weight: 600;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover figcaption {
  transform: translateY(0);
}

/* CTA */
.cta-section {
  padding: 4rem 0 8rem;
}

.cta-content {
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--white) 0%, var(--bg-color) 100%);
}

.cta-content h2 {
  font-size: 2.5rem;
}

.cta-content p {
  max-width: 600px;
  margin: 1.5rem auto 2.5rem;
  font-size: 1.25rem;
}

/* Footer */
footer {
  background-color: #1a231f;
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

/* Animations & Utility */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s forwards ease-out;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Other Events List */
.other-events-section {
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.other-events-list {
  list-style: none;
  max-width: 1000px;
  margin: 3rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.other-event-item {
  display: flex;
  align-items: center;
  padding: 1.5rem 2rem;
  border-radius: var(--border-radius);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.other-event-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.other-event-date {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  min-width: 150px;
  padding-right: 2rem;
  border-right: 2px solid var(--glass-border);
}

.other-event-details {
  padding-left: 2rem;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.other-event-title {
  margin-bottom: 0;
  font-size: 1.25rem;
  flex: 1;
}

.other-event-meta {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  white-space: nowrap;
}

.other-event-assoc {
  font-size: 1rem;
}

.other-event-location {
  font-size: 0.9em;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* --- Contact & Board Page --- */
.subpage {
  padding-top: 80px;
  /* Offset for fixed header */
}

.contact-header-section {
  padding: 4rem 0 2rem;
  background-color: var(--primary-light);
  color: var(--white);
}

.contact-header-section h1,
.contact-header-section p {
  color: var(--white);
}

.contact-grid-section {
  padding: 4rem 0 8rem;
}

.contact-grid-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.board-members-wrapper {
  padding: 2.5rem;
}

.board-list {
  list-style: none;
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.board-member {
  background: rgba(255, 255, 255, 0.5);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
}

.member-role {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.member-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.member-email {
  font-size: 0.95rem;
  color: var(--text-light);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.2);
}

.member-email:hover {
  color: var(--primary-color);
  text-decoration-color: var(--primary-color);
}

.action-card {
  padding: 2.5rem 2rem;
  text-align: center;
}

.action-card h3 {
  margin-bottom: 1rem;
}

.action-card p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

/* Event Accordion */
.month-accordion {
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.month-header {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: var(--primary-color);
  color: var(--white);
  transition: background 0.3s ease;
}

.month-header:hover {
  background: var(--primary-light);
}

.month-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--white);
}

.accordion-icon {
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--white);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  line-height: 1;
}

.month-content {
  list-style: none;
  padding: 0;
  margin: 0;
}

.month-content .other-event-item {
  border-top: 1px solid var(--glass-border);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 1.5rem 2rem;
}

.month-content .other-event-item:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.2);
}

.month-accordion.active .month-header {
  border-bottom: 1px solid var(--glass-border);
  background: var(--primary-light);
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item.wide {
    grid-column: span 1;
  }

  h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  .desktop-nav.active {
    display: block;
  }

  .desktop-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .mobile-menu-btn {
    display: block;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .hamburger,
  .hamburger::before,
  .hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    transition: all 0.3s ease;
  }

  .hamburger {
    top: 50%;
    transform: translateY(-50%);
  }

  .hamburger::before {
    top: -8px;
  }

  .hamburger::after {
    bottom: -8px;
  }

  .mobile-menu-btn.active .hamburger {
    background: transparent;
  }

  .mobile-menu-btn.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
  }

  .mobile-menu-btn.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
  }

  /* Disable scroll reveal on mobile for better UX and reliability */
  .scroll-reveal {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .other-event-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }

  .other-event-date {
    border-right: none;
    border-bottom: 2px solid var(--glass-border);
    padding-right: 0;
    padding-bottom: 0.8rem;
    margin-bottom: 0.8rem;
    width: 100%;
    min-width: auto;
  }

  .other-event-details {
    padding-left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .other-event-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    white-space: normal;
  }

  .contact-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* Event Detail Layout */
.event-detail-grid {
  display: grid;
  grid-template-columns: 1.7fr 1.3fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .event-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Scroll-to-Top Button */
#scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
}

#scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#scroll-to-top.visible:hover {
  background-color: var(--secondary-color);
  transform: translateY(-5px);
}

@media (max-width: 768px) {
  #scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}