/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
  --color-navy: #1B3A5C;
  --color-navy-light: #2A5580;
  --color-gold: #C9A84C;
  --color-gold-light: #F0E8D4;
  --color-gold-dark: #A08530;
  --color-cream: #FAFAF5;
  --color-dark: #1C1C2E;
  --color-burgundy: #7A2E3A;
  --font-display: Georgia, 'Times New Roman', Times, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --wrap-max: 720px;
  --wrap-pad: 24px;
}

/* ==========================================================================
   MOBILE-FIRST BASE
   ========================================================================== */

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

html { overflow-y: auto; }

body {
  background: var(--color-cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-dark);
}

* { box-sizing: border-box; }

a { color: var(--color-navy); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; color: var(--color-navy-light); }

img { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-navy);
}

h1 { font-size: 2.2em; margin: 0 0 0.4em; }
h2 { font-size: 1.6em; margin: 1.2em 0 0.5em; }
h3 { font-size: 1.25em; margin: 0 0 0.3em; }

.newline { clear: both; }
.nowrap { white-space: nowrap; }

.wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 var(--wrap-pad);
}

.wrapCenter { text-align: center; }

.wrapWide {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--wrap-pad);
}

/* Full-bleed sections */
.section {
  padding: 48px 0;
}

.sectionLight  { background: var(--color-cream); }
.sectionDark   { background: var(--color-dark); color: var(--color-cream); }
.sectionAccent { background: var(--color-gold-light); }

.sectionDark a { color: var(--color-gold); }
.sectionDark a:hover { color: #E0C860; }

.sectionDark h2,
.sectionDark h3 { color: var(--color-cream); }

/* ==========================================================================
   HAMBURGER MENU (Mobile)
   ========================================================================== */

.nav-toggle {
  position: absolute;
  top: -9999px;
  left: -9999px;
}

.nav-toggle-label {
  position: fixed;
  top: 14px;
  left: 14px;
  width: 36px;
  height: 30px;
  cursor: pointer;
  z-index: 100;
  background: rgba(250,250,245,0.9);
  border-radius: 4px;
  padding: 4px;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background: var(--color-navy);
  height: 3px;
  width: 26px;
  border-radius: 2px;
  position: relative;
  transition: all 0.3s ease;
}

.nav-toggle-label span { top: 10px; }
.nav-toggle-label span::before { content: ''; position: absolute; top: -8px; }
.nav-toggle-label span::after  { content: ''; position: absolute; top: 8px; }

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,0.4);
}

.nav-toggle:checked ~ .nav-overlay {
  display: block;
}

.nav-toggle:checked ~ .nav-toggle-label span { background: transparent; }
.nav-toggle:checked ~ .nav-toggle-label span::before { transform: rotate(45deg); top: 0; background: var(--color-navy); }
.nav-toggle:checked ~ .nav-toggle-label span::after  { transform: rotate(-45deg); top: 0; background: var(--color-navy); }

/* ==========================================================================
   LOGO / HEADER
   ========================================================================== */

.logo {
  text-align: center;
  padding: 14px 0 10px;
}

.logo a { text-decoration: none; }

.logo .logoText {
  font-family: var(--font-display);
  font-size: 1.3em;
  color: var(--color-navy);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   NAVIGATION (Mobile — slide-out panel)
   ========================================================================== */

#navigationlinks {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: var(--color-cream);
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s;
  z-index: 90;
  overflow: hidden;
  overscroll-behavior: contain;
  padding-top: 60px;
  border-right: 3px solid var(--color-gold);
}

body:has(.nav-toggle:checked) #navigationlinks {
  transform: translateX(0);
  visibility: visible;
  overflow-y: auto;
}

#navigationlinks ul { list-style: none; margin: 0; padding: 0; }
#navigationlinks li { display: block; border-bottom: 1px solid var(--color-gold-light); }

#navigationlinks li a,
#navigationlinks li span {
  display: block;
  padding: 14px 24px;
  font-family: var(--font-display);
  font-size: 1.2em;
  color: var(--color-dark);
  text-decoration: none;
}

#navigationlinks li a:hover { background: var(--color-gold-light); text-decoration: none; }
#navigationlinks li span    { color: var(--color-navy); font-weight: 700; }

/* ==========================================================================
   CONTENT AREA
   ========================================================================== */

.content {
  background: var(--color-cream);
  min-height: 100vh;
}

.contentBody {
  padding: 0;
}

.pageHeader {
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--color-gold);
}

.pageHeader h1 {
  margin: 0;
  font-size: 2em;
}

/* Inner pages get padded content */
#about .contentBody,
#events .contentBody,
#newsletter .contentBody,
#media .contentBody,
#join .contentBody,
#grant .contentBody,
#contact .contentBody,
#badurl .contentBody,
#forbidden .contentBody {
  padding: 32px var(--wrap-pad) 48px;
  max-width: var(--wrap-max);
  margin: 0 auto;
}

/* ==========================================================================
   HOMEPAGE
   ========================================================================== */

.hero {
  position: relative;
  background-image: url('/images/content/img_3843.jpg');
  background-size: cover;
  background-position: center 40%;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(27,58,92,0.75) 0%,
    rgba(28,28,46,0.8) 100%
  );
}

.heroOverlay {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px var(--wrap-pad);
}

.hero h1 {
  font-size: 2.6em;
  color: #fff;
  margin: 0 0 4px;
}

.heroSubtitle {
  font-family: var(--font-display);
  font-size: 1.15em;
  color: var(--color-gold);
  margin: 0 0 16px;
  font-style: italic;
}

.tagline {
  font-size: 1.05em;
  color: rgba(255,255,255,0.8);
  margin: 0;
  line-height: 1.6;
}

.introText {
  font-size: 1.1em;
  text-align: center;
  line-height: 1.8;
  margin: 0;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* Home intro — text + next event side by side on desktop */
.homeIntro {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.homeIntroText p {
  font-size: 1.1em;
  line-height: 1.8;
  margin: 0;
}

.homeNextEvent {
  background: var(--color-dark);
  color: var(--color-cream);
  padding: 24px 28px;
  border-radius: 6px;
}

.homeNextEventLabel {
  font-family: var(--font-body);
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-gold);
  margin: 0 0 8px;
}

.homeNextEventTitle {
  font-family: var(--font-display);
  font-size: 1.4em;
  color: var(--color-cream);
  margin: 0 0 6px;
}

.homeNextEventDate {
  font-size: 0.95em;
  color: var(--color-gold);
  margin: 0 0 4px;
}

.homeNextEventLocation {
  font-size: 0.9em;
  color: rgba(255,255,255,0.65);
  margin: 0 0 14px;
}

.homeConnect {
  text-align: center;
}

/* Feature cards */
.featureCards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.featureCard {
  background: #fff;
  padding: 28px;
  border-radius: 6px;
  border-left: 4px solid var(--color-navy);
}

.featureCard h3 {
  margin: 0 0 8px;
  font-size: 1.3em;
}

.featureCard p {
  margin: 0 0 12px;
}

.featureCard p:last-child {
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--color-navy);
  color: #fff !important;
  font-family: var(--font-body);
  font-size: 1em;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 5px;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.15s;
}

.btn:hover {
  background: var(--color-navy-light);
  transform: translateY(-1px);
}

.btnSmall {
  padding: 8px 20px;
  font-size: 0.9em;
}

.btnLarge {
  padding: 16px 44px;
  font-size: 1.1em;
}

.sectionDark .btn {
  background: var(--color-gold);
  color: var(--color-dark) !important;
}

.sectionDark .btn:hover {
  background: #E0C860;
}

/* ==========================================================================
   ABOUT / CONTENT PAGES
   ========================================================================== */

.aboutSection {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-gold-light);
}

.aboutSection:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.aboutSection ul {
  padding-left: 20px;
}

.aboutSection li {
  margin-bottom: 8px;
}

.officerTable {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
}

.officerTable td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-gold-light);
}

.officerTable td:first-child {
  font-weight: 600;
  color: var(--color-navy);
  width: 40%;
}

.grantHighlight {
  background: var(--color-gold-light);
  border-left: 4px solid var(--color-gold);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 6px 6px 0;
}

.grantHighlight p {
  margin: 0;
  font-size: 1.15em;
}

.aboutPhoto {
  margin: 24px 0;
}

.aboutPhoto img {
  width: 100%;
  border-radius: 6px;
  display: block;
}

.photoCaption {
  font-size: 0.85em;
  color: #666;
  font-style: italic;
  margin: 6px 0 0;
}

/* ==========================================================================
   EVENTS PAGE
   ========================================================================== */

.eventList {
  margin-bottom: 32px;
}

.eventItem {
  padding: 20px 0;
  border-bottom: 1px solid var(--color-gold-light);
}

.eventItem:first-child { padding-top: 0; }

.eventItem.upcoming {
  border-left: 4px solid var(--color-navy);
  padding-left: 20px;
}

.eventItem .eventDate {
  font-size: 0.95em;
  color: #666;
  margin: 0;
}

.eventItem .eventTitle {
  font-family: var(--font-display);
  font-size: 1.3em;
  color: var(--color-navy);
  margin: 4px 0;
}

.eventItem .eventLocation {
  font-size: 1em;
  margin: 4px 0;
}

.eventItem .eventDescription {
  font-size: 0.95em;
  color: #555;
  margin: 8px 0 0;
}

.eventIcons {
  display: inline;
  margin-left: 8px;
}

.eventIcons a {
  text-decoration: none;
  font-size: 0.9em;
}

.eventList.past .eventItem .eventDate { color: #999; }
.eventList.past .eventItem .eventTitle { color: #666; }

/* ==========================================================================
   NEWSLETTER PAGE
   ========================================================================== */

.newsletterList {
  margin-bottom: 32px;
}

.newsletterItem {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-gold-light);
}

.newsletterItem:last-child {
  border-bottom: none;
}

.newsletterItem h2 {
  margin-top: 0;
}

.pdfBadge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.45em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--color-burgundy);
  color: #fff;
  padding: 2px 7px;
  border-radius: 3px;
  vertical-align: middle;
  position: relative;
  top: -2px;
  margin-left: 8px;
}

/* ==========================================================================
   MEDIA PAGE
   ========================================================================== */

.mediaSection {
  margin-bottom: 40px;
}

.videoEmbed {
  margin-bottom: 32px;
}

.videoWrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
}

.videoWrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Photo gallery — justified row layout */
.photoGallery {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.photoGallery a {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  line-height: 0;
  height: 200px;
  flex-grow: 1;
}

.photoGallery a.landscape { flex-basis: 260px; }
.photoGallery a.portrait  { flex-basis: 140px; }
.photoGallery a.square    { flex-basis: 200px; }

.photoGallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.photoGallery a:hover img {
  transform: scale(1.04);
}

.pswp__img--placeholder { display: none !important; }

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */

#contactPreamble {
  margin-bottom: 28px;
  font-size: 1.05em;
}

#contactForm fieldset { border: none; padding: 0; margin: 0; }
#contactForm ol { list-style: none; padding: 0; margin: 0; }

#contactForm li {
  margin-bottom: 20px;
}

#contactForm label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95em;
}

#contactForm input[type="text"],
#contactForm input[type="email"],
#contactForm input[type="tel"],
#contactForm textarea,
#contactForm select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--color-gold-light);
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 1em;
  background: #fff;
  transition: border-color 0.2s;
}

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

#contactForm input[type="submit"] {
  width: 100%;
  padding: 16px;
  background: var(--color-navy);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

#contactForm input[type="submit"]:hover {
  background: var(--color-navy-light);
  transform: translateY(-1px);
}

.inputErrorField { border-color: var(--color-burgundy) !important; background: #FFF0F0 !important; }
.errortip { display: block; color: var(--color-burgundy); font-size: 0.85em; margin-top: 4px; }

.ui-state-error {
  color: var(--color-burgundy);
  font-weight: 600;
  padding: 12px 16px;
  background: #FFF0F0;
  border: 1px solid var(--color-burgundy);
  border-radius: 5px;
  margin-bottom: 20px;
}

.errorMessage { color: var(--color-burgundy); font-weight: 600; }

.formRow--optional { position: absolute; left: -9999px; top: -9999px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.desktopFooter { display: none; }

.mobileFooter {
  padding: 32px var(--wrap-pad);
  text-align: center;
  background: var(--color-dark);
  color: var(--color-cream);
}

.socialLinks { margin-bottom: 12px; }

.socialLinks a {
  display: inline-block;
  margin: 0 10px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.socialLinks a:hover { opacity: 1; }
.socialLinks img { width: 28px; height: 28px; filter: invert(1); }

.copyright { font-size: 0.85em; color: #999; margin: 5px 0; }

.mobileOnly { }

/* ==========================================================================
   DESKTOP (806px+)
   ========================================================================== */

@media screen and (min-width: 806px) {

  html { overflow-y: scroll; }

  body { font-size: 18px; }

  :root {
    --wrap-max: 720px;
    --wrap-pad: 32px;
  }

  .content {
    width: 100%;
    max-width: 100%;
  }

  .contentBody {
    padding: 0;
  }

  #about .contentBody,
  #events .contentBody,
  #newsletter .contentBody,
  #media .contentBody,
  #join .contentBody,
  #grant .contentBody,
  #contact .contentBody,
  #badurl .contentBody,
  #forbidden .contentBody {
    padding: 48px 32px 64px;
    max-width: var(--wrap-max);
  }

  /* Hide hamburger */
  .nav-toggle-label { display: none; }
  .nav-overlay { display: none !important; }
  .mobileOnly { display: none !important; }

  /* Logo bar */
  .logo { padding: 16px 0 6px; }
  .logo .logoText { font-size: 1.5em; }

  /* Desktop nav — horizontal */
  #navigationlinks {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    transform: none;
    visibility: visible;
    overflow: visible;
    padding: 0 0 6px;
    border-right: none;
    text-align: center;
  }

  #navigationlinks ul { display: inline-block; }
  #navigationlinks li { display: inline-block; border-bottom: none; }

  #navigationlinks li a,
  #navigationlinks li span {
    display: inline-block;
    padding: 5px 14px;
    font-size: 1.05em;
  }

  #navigationlinks li a:hover {
    background: var(--color-gold-light);
    border-radius: 3px;
    text-decoration: none;
  }

  /* Hero */
  .hero {
    min-height: 60vh;
    background-position: center 35%;
  }

  .hero h1 {
    font-size: 3.6em;
  }

  .heroSubtitle {
    font-size: 1.4em;
  }

  .tagline {
    font-size: 1.15em;
  }

  /* Sections */
  .section {
    padding: 56px 0;
  }

  /* Home intro — side by side */
  .homeIntro {
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
  }

  .homeIntroText {
    flex: 3;
  }

  .homeNextEvent {
    flex: 2;
  }

  /* Feature cards — horizontal on desktop */
  .featureCards {
    flex-direction: row;
    gap: 24px;
  }

  .featureCard {
    flex: 1;
  }

  /* Gallery — taller rows on desktop */
  .photoGallery {
    gap: 8px;
  }

  .photoGallery a {
    height: 280px;
  }

  .photoGallery a.landscape { flex-basis: 380px; }
  .photoGallery a.portrait  { flex-basis: 200px; }
  .photoGallery a.square    { flex-basis: 280px; }

  /* Contact */
  #contactForm input[type="text"],
  #contactForm input[type="email"],
  #contactForm input[type="tel"] {
    width: 60%;
  }

  #contactForm input[type="submit"] {
    width: auto;
    padding: 16px 56px;
  }

  /* Footer */
  .mobileFooter { display: none; }

  .desktopFooter {
    display: block;
    text-align: center;
    padding: 24px 0 40px;
    background: var(--color-dark);
    color: var(--color-cream);
  }

  .desktopFooter .socialLinks img { filter: invert(1); }
  .desktopFooter .copyright { color: #999; }
}
