/* ============================================================
   EARLTOWN CHURCH CEMETERY COMPANY — style.css
   Deep Forest Green & Antique Gold Premium Design
   ============================================================ */

/* 1. Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Lato:wght@300;400;700&display=swap');

/* 2. CSS Variables */
:root {
  --primary:        #1a3a2a;
  --primary-light:  #2d5a3d;
  --primary-dark:   #0f2418;
  --accent:         #c9a84c;
  --accent-light:   #e8c97a;
  --accent-dark:    #a07830;
  --stone:          #8a7968;
  --stone-light:    #c8bca8;
  --bg:             #f5f2ec;
  --bg-dark:        #ede8e0;
  --white:          #ffffff;
  --text-dark:      #1e1e1e;
  --text-mid:       #4a4a4a;
  --text-light:     #7a7a7a;
  --border:         #ddd5c4;
  --shadow:         0 4px 20px rgba(26,58,42,0.15);
  --shadow-lg:      0 8px 40px rgba(26,58,42,0.2);
  --radius:         6px;
  --radius-lg:      12px;
  --transition:     all 0.3s ease;
  --font-heading:   'Playfair Display', Georgia, serif;
  --font-body:      'Lato', Arial, sans-serif;
}

/* 3. Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.75;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-light); }
ul { list-style: none; }

/* 4. Typography */
h1, h2, h3, h4, h5 { font-family: var(--font-heading); line-height: 1.25; color: var(--primary-dark); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.7rem); }
h4 { font-size: 1.15rem; }
p  { margin-bottom: 1rem; color: var(--text-mid); }

/* 5. Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.section-alt { background: var(--bg-dark); }
.section-dark { background: var(--primary-dark); color: var(--white); }
.section-dark h2, .section-dark h3, .section-dark p { color: var(--white); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.flex    { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.section-subtitle {
  color: var(--stone);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  font-style: italic;
}
.divider {
  width: 70px; height: 3px;
  background: linear-gradient(to right, var(--accent), var(--accent-light));
  margin: 1rem auto 2.5rem;
  border-radius: 2px;
}

/* 6. Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-light);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}
.btn-green {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-green:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* ============================================================
   7. HEADER & NAVIGATION
   ============================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary-dark);
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
  transition: box-shadow 0.3s;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
  gap: 1rem;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  text-decoration: none;
}
.header-brand img.logo {
  height: 52px;
  width: auto;
  border-radius: 4px;
}
.brand-name {
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  color: var(--accent-light);
  line-height: 1.2;
  max-width: 200px;
}

/* Navigation — MUST STAY ON ONE LINE */
nav { flex: 1; display: flex; justify-content: flex-end; align-items: center; }
.nav-menu {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
  gap: 0;
  list-style: none;
}
.nav-menu li a {
  display: block;
  padding: 0.55rem 0.7rem;
  color: var(--stone-light);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.nav-menu li a:hover,
.nav-menu li a.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: 1rem;
}
.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--accent-light);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   8. HERO / PAGE BANNER
   ============================================================ */
.hero {
  position: relative;
  height: 88vh;
  min-height: 500px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(15,36,24,0.78) 0%,
    rgba(26,58,42,0.55) 60%,
    rgba(15,36,24,0.72) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 2rem 1.5rem;
  animation: fadeInUp 1s ease both;
}
.hero-badge {
  display: inline-block;
  background: rgba(201,168,76,0.25);
  border: 1px solid var(--accent);
  color: var(--accent-light);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.hero p {
  color: rgba(255,255,255,0.88);
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Page Banner (inner pages) */
.page-banner {
  position: relative;
  height: 340px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15,36,24,0.75), rgba(26,58,42,0.65));
}
.page-banner-content { position: relative; z-index: 2; }
.page-banner h1 { color: var(--white); margin-bottom: 0.5rem; }
.breadcrumb { color: var(--stone-light); font-size: 0.88rem; }
.breadcrumb a { color: var(--accent-light); }

/* ============================================================
   9. CARDS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-img { width: 100%; height: 220px; object-fit: cover; }
.card-body { padding: 1.5rem; }
.card-body h3 { margin-bottom: 0.5rem; color: var(--primary); }

/* Feature Icons */
.feature-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border-top: 4px solid var(--accent);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.feature-icon {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  display: block;
}
.feature-card h3 { color: var(--primary); margin-bottom: 0.75rem; }

/* Cemetery Cards */
.cemetery-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.cemetery-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.cemetery-card img { width: 100%; height: 240px; object-fit: cover; }
.cemetery-card-body { padding: 1.75rem; }
.cemetery-card-body h3 { color: var(--primary); margin-bottom: 0.3rem; }
.cemetery-location {
  display: flex; align-items: center; gap: 0.4rem;
  color: var(--stone); font-size: 0.88rem; margin-bottom: 0.75rem;
}

/* News Cards */
.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-card img { width: 100%; height: 200px; object-fit: cover; }
.news-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.news-date {
  font-size: 0.82rem; color: var(--stone);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 0.5rem; display: block;
}
.news-card h3 { color: var(--primary); margin-bottom: 0.6rem; font-size: 1.15rem; }
.news-card .read-more { margin-top: auto; padding-top: 1rem; color: var(--accent); font-weight: 700; }
.news-card .read-more:hover { color: var(--accent-dark); }

/* Accordion */
.accordion-body { display: none; padding-top: 0.75rem; }
.accordion-body.open { display: block; }

/* ============================================================
   10. GALLERY STRIP
   ============================================================ */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 2rem;
}
.gallery-item { position: relative; overflow: hidden; border-radius: var(--radius); cursor: pointer; }
.gallery-item img { width: 100%; height: 180px; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: rgba(26,58,42,0.55);
  opacity: 0; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 2rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* Lightbox */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.92); z-index: 9999;
  align-items: center; justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: var(--radius); }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 2rem;
  color: var(--white); font-size: 2rem; cursor: pointer;
  background: none; border: none; line-height: 1;
}

/* ============================================================
   11. STATS BAR
   ============================================================ */
.stats-bar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 3rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-item h3 {
  font-size: 2.5rem;
  color: var(--accent-light);
  font-family: var(--font-heading);
  margin-bottom: 0.25rem;
}
.stat-item p { color: var(--stone-light); font-size: 0.9rem; margin: 0; }

/* ============================================================
   12. TIMELINE
   ============================================================ */
.timeline { position: relative; padding: 1rem 0; }
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-light));
}
.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 2.5rem);
  margin-bottom: 2.5rem;
  position: relative;
}
.timeline-item:nth-child(even) {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 2.5rem);
}
.timeline-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 380px;
  box-shadow: var(--shadow);
  position: relative;
}
.timeline-year {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}
.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 1.5rem;
  width: 14px; height: 14px;
  background: var(--accent);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent);
  z-index: 1;
}

/* ============================================================
   13. FORMS
   ============================================================ */
.form-section { background: var(--bg-dark); padding: 5rem 0; }
.form-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow);
  max-width: 700px;
  margin: 0 auto;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-weight: 700; font-size: 0.9rem; color: var(--primary); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--bg);
  transition: border-color 0.25s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-submit { margin-top: 1.5rem; text-align: center; }

/* Contact Info Block */
.contact-info-card {
  background: var(--primary-dark);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.contact-info-card h3 { color: var(--accent-light); margin-bottom: 1.5rem; }
.info-row { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.info-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.info-row p { color: rgba(255,255,255,0.85); margin: 0; line-height: 1.5; }
.info-row a { color: var(--accent-light); }
.info-row a:hover { color: var(--white); }

/* ============================================================
   14. RESOURCE LINKS
   ============================================================ */
.resource-list { display: flex; flex-direction: column; gap: 0.75rem; }
.resource-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: var(--transition);
  color: var(--primary);
  font-weight: 700;
}
.resource-link:hover { transform: translateX(5px); color: var(--primary-light); box-shadow: var(--shadow); }

/* Volunteer Steps */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.step-card {
  text-align: center;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.step-num {
  width: 50px; height: 50px;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 1.3rem;
  font-weight: 900;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}

/* ============================================================
   15. FOOTER
   ============================================================ */
footer {
  background: var(--primary-dark);
  color: var(--stone-light);
}
.footer-main { padding: 4rem 0 2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.5fr;
  gap: 3rem;
}
.footer-brand { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-brand img { height: 56px; width: auto; border-radius: 4px; }
.footer-brand .org-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--accent-light);
}
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.88rem; margin: 0; line-height: 1.6; }
.footer-col h4 {
  color: var(--accent);
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  font-family: var(--font-body);
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul li a {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--accent-light); padding-left: 4px; }
.footer-contact-item { display: flex; gap: 0.75rem; margin-bottom: 0.85rem; align-items: flex-start; }
.footer-contact-item span { font-size: 1rem; flex-shrink: 0; }
.footer-contact-item p { color: rgba(255,255,255,0.65); font-size: 0.88rem; margin: 0; }
.footer-contact-item a { color: var(--accent-light); font-size: 0.88rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 0;
  text-align: center;
}
.footer-bottom p { color: rgba(255,255,255,0.45); font-size: 0.85rem; margin: 0; }

/* ============================================================
   16. ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   17. RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .nav-menu li a { padding: 0.55rem 0.5rem; font-size: 0.75rem; }
}

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .timeline::before { left: 20px; }
  .timeline-item, .timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-left: 4rem; padding-right: 0;
  }
  .timeline-dot { left: 20px; }
}

@media (max-width: 768px) {
  /* Mobile Nav */
  .hamburger { display: flex; }
  nav { position: relative; }
  .nav-menu {
    display: none;
    flex-direction: column;
    white-space: normal;
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    background: var(--primary-dark);
    border-radius: var(--radius-lg);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 0;
    z-index: 999;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li a {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    border-bottom: none;
    border-left: 3px solid transparent;
  }
  .nav-menu li a:hover, .nav-menu li a.active {
    border-left-color: var(--accent);
    padding-left: 1.75rem;
  }

  .hero { background-attachment: scroll; height: 70vh; }
  .section { padding: 3.5rem 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .gallery-strip { grid-template-columns: repeat(2, 1fr); }
  .form-wrap { padding: 2rem 1.25rem; }
}

@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 1.8rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .gallery-strip { grid-template-columns: 1fr 1fr; }
  .brand-name { display: none; }
}
