/* ═══════════════════════════════════════════════
   Friends of Derby Arboretum — Global Stylesheet
   ═══════════════════════════════════════════════ */

:root {
  --green-dark:   #1a3320;
  --green-mid:    #2d5a34;
  --green-light:  #4a8c55;
  --green-pale:   #e8f2e9;
  --accent:       #5c9e64;
  --amber:        #d4890a;
  --cream:        #faf8f4;
  --white:        #ffffff;
  --ink:          #1c1c1c;
  --ink-muted:    #555550;
  --border:       #ddd8ce;

  --font-display: 'Lora', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --font-accent:  'Fraunces', Georgia, serif;

  --radius:       12px;
  --shadow:       0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg:    0 12px 48px rgba(0,0,0,0.14);

  --nav-h: 90px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img:not(.brand-logo) { display: block; width: 100%; height: 100%; object-fit: cover; }

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

/* ── TYPOGRAPHY ── */
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 400;
}
h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 1.2rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
em { font-style: italic; color: var(--green-mid); }
p  { color: var(--ink-muted); margin-bottom: 1rem; }
a  { color: inherit; text-decoration: none; }

/* ── LAYOUT ── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}
.bg-light { background: var(--green-pale); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; gap: 2.5rem; }
  .two-col.reverse { direction: ltr; }
}

/* ── SECTION LABELS ── */
.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-light);
  border-left: 3px solid var(--green-light);
  padding-left: 0.75rem;
  margin-bottom: 1rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header .section-tag {
  border: none;
  padding-left: 0;
}
.section-footer {
  text-align: center;
  margin-top: 2.5rem;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--green-mid);
  color: var(--white);
  border-color: var(--green-mid);
}
.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45,90,52,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
}
.btn-outline-dark {
  background: transparent;
  color: var(--green-dark);
  border-color: var(--green-dark);
}
.btn-outline-dark:hover {
  background: var(--green-dark);
  color: var(--white);
}

.link-arrow {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--green-mid);
  transition: gap 0.2s;
}
.link-arrow:hover { color: var(--green-dark); }

/* ── IMAGE FRAMES ── */
.image-frame {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  pointer-events: none;
}

/* ── NAVBAR ── */
#navbar {
  font-family: 'DM Sans', system-ui, sans-serif;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 200;
  transition: background 0.3s, box-shadow 0.3s;
  background: transparent;
}
#navbar.scrolled {
  background: rgba(26, 51, 32, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-family: var(--font-body);
  color: var(--white);
  white-space: nowrap;
}
.brand-leaf { display: none; }
.brand-logo { display: block; height: 54px; width: auto; object-fit: contain; flex-shrink: 0; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}
.nav-links a {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.82);
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  transition: all 0.2s;
  letter-spacing: 0.02em;
  font-family: var(--font-body);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.12);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}
@media (max-width: 900px) {
  .hero {
    padding-top: calc(var(--nav-h) + 1rem);
    align-items: flex-start;
    padding-bottom: 4rem;
  }
  .nav-inner {
        padding: 0 1rem;
    }
  .container {
    padding: 0 1rem;
}
    .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--green-dark);
    flex-direction: column;
    padding: 1.5rem 2rem 2rem;
    gap: 0.25rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: all 0.35s ease;
    pointer-events: none;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-links a { padding: 0.65rem 1rem; font-size: 1rem; }
  .nav-brand {
    white-space: normal;
    font-size: 0.9rem;
    max-width: 180px;
  }
  .brand-logo { height: 44px; width: auto; }
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-image-slot {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img { object-position: center; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(15,35,18,0.72) 0%,
    rgba(26,51,32,0.55) 50%,
    rgba(10,25,12,0.65) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding: 2rem;
  animation: fadeUp 1s ease both;
}
.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.5rem;
  font-weight: 400;
}
.hero-title {
  color: var(--white);
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-title em { color: #8fcf97; }
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.82);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scrollPulse 2s ease infinite;
}

/* ── INTRO STRIP ── */
.intro-strip {
  background: var(--green-dark);
  padding: 3rem 0;
}
.intro-grid {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.intro-stat {
  text-align: center;
  color: var(--white);
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: #8fcf97;
}
.stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.intro-divider {
  width: 1px;
  height: 50px;
  background: rgba(255,255,255,0.15);
}
@media (max-width: 600px) { .intro-divider { display: none; } }

/* ── EVENTS CARDS ── */
.events-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.event-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  border: 1px solid var(--border);
}
.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.event-date {
  background: var(--green-dark);
  color: var(--white);
  border-radius: 10px;
  min-width: 60px;
  padding: 0.6rem;
  text-align: center;
  flex-shrink: 0;
}
.event-date .day {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
}
.event-date .month {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8fcf97;
  margin-top: 0.2rem;
}
.event-info h3 { color: var(--ink); }
.event-info p  { font-size: 0.9rem; margin-bottom: 0.75rem; }

/* ── PHOTO MOSAIC ── */
.photo-mosaic {
  position: relative;
  background: var(--green-dark);
}
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 280px 280px;
  gap: 4px;
}
.mosaic-cell { overflow: hidden; }
.mosaic-cell img {
  transition: transform 0.6s ease;
}
.mosaic-cell:hover img { transform: scale(1.05); }
.mosaic-cell.tall { grid-row: span 2; }
.mosaic-cell.wide { grid-column: span 2; }

.mosaic-caption {
  text-align: center;
  padding: 1.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  font-style: italic;
}

@media (max-width: 700px) {
  .mosaic-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 200px 200px;
  }
  .mosaic-cell.tall { grid-row: span 1; }
}

/* ── LODGE CTA ── */
.lodge-cta { background: var(--cream); }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 4rem;
  background: var(--green-dark);
  color: var(--white);
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 0.75rem; }
.page-hero p  { color: rgba(255,255,255,0.72); max-width: 560px; margin: 0 auto; }

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: rgba(255,255,255,0.6);
  padding: 3rem 0 2rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  justify-content: center;
}
.footer-nav a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--white); }
.footer-copy { font-size: 0.8rem; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.animate-in.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* ── GALLERY GRID (Events page) ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.gallery-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: zoom-in;
  position: relative;
}
.gallery-item img { transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.07); }

/* ── LIGHTBOX ── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: zoom-out;
}
.lightbox-overlay.active {
  display: flex;
  animation: lbFadeIn 0.25s ease both;
}
.lightbox-inner {
  position: relative;
  max-width: 1100px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.lightbox-img-wrap {
  position: relative;
  max-height: 88vh;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  cursor: default;
}
.lightbox-img-wrap img {
  max-height: 88vh;
  max-width: 90vw;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: var(--white);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  z-index: 1001;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

.lightbox-btn {
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: var(--white);
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
  z-index: 1001;
}
.lightbox-btn:hover { background: rgba(255,255,255,0.25); }
.lightbox-btn:disabled { opacity: 0.2; cursor: default; }

.lightbox-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes lbImgIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox-img-wrap { animation: lbImgIn 0.25s ease both; }

/* ── FORMS ── */
.form-group {
  margin-bottom: 1.4rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(74,140,85,0.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }

/* ── NEWS CARDS ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}
.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-card-img { aspect-ratio: 16/9; background: var(--green-pale); }
.news-card-body { padding: 1.5rem; }
.news-card-date {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 0.5rem;
}
.news-card-body h3 { color: var(--ink); margin-bottom: 0.5rem; }
.news-card-body p { font-size: 0.9rem; }

/* ── HISTORY TIMELINE ── */
.timeline {
  position: relative;
  padding: 2rem 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
}
.timeline-entry {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
  align-items: center;
}
.timeline-entry:nth-child(odd) .te-content  { order: 1; text-align: right; }
.timeline-entry:nth-child(odd) .te-spacer   { order: 2; }
.timeline-entry:nth-child(odd) .te-empty    { order: 3; }
.timeline-entry:nth-child(even) .te-content { order: 3; text-align: left; }
.timeline-entry:nth-child(even) .te-spacer  { order: 2; }
.timeline-entry:nth-child(even) .te-empty   { order: 1; }
.te-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.te-year {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--green-dark);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.2;
  z-index: 1;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--cream), 0 0 0 6px var(--border);
}
@media (max-width: 700px) {
  .timeline::before { left: 24px; }
  .timeline-entry { grid-template-columns: 48px 1fr; }
  .te-empty { display: none; }
  .te-year { width: 48px; height: 48px; font-size: 0.65rem; }
  .timeline-entry:nth-child(odd) .te-content  { order: 2; text-align: left; }
  .timeline-entry:nth-child(odd) .te-spacer   { order: 1; }
  .timeline-entry:nth-child(odd) .te-empty    { order: 3; }
  .timeline-entry:nth-child(even) .te-content { order: 2; text-align: left; }
  .timeline-entry:nth-child(even) .te-spacer  { order: 1; }
  .timeline-entry:nth-child(even) .te-empty   { order: 3; }
  .te-content { min-width: 0; }
}