/* ============================================
   GLNCAC — Great Lakes National Cemetery Advisory Council
   Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;600&display=swap');

/* ── Variables ─────────────────────────────── */
:root {
  --navy:       #1C2B4A;
  --navy-deep:  #111B30;
  --gold:       #C9A84C;
  --gold-light: #E8D49A;
  --cream:      #F7F4EE;
  --white:      #FFFFFF;
  --gray-light: #EBEBEB;
  --gray-mid:   #999999;
  --text:       #1A1A1A;
  --text-muted: #5A5A5A;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;
  --max-width: 1160px;
  --nav-height: 72px;
}

/* ── Reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--navy-deep);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Layout ─────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}
.section { padding: 80px 0; position: relative; z-index: 1; }
.section .section-title,
.section h2,
.section h3 {
  color: var(--white);
}
.section p {
  color: rgba(255,255,255,0.7);
}
.section--cream {
  background: var(--cream);
  backdrop-filter: none;
}
.section--cream .section-title,
.section--cream h2,
.section--cream h3 {
  color: var(--text);
}
.section--cream p {
  color: var(--text-muted);
}
.section--navy {
  background: var(--navy);
  backdrop-filter: none;
  color: var(--white);
}
.section--navy .section-title,
.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy p,
.section--navy .section-subtitle {
  color: var(--white);
}
.section--navy .section-subtitle {
  color: rgba(255,255,255,0.75);
}
.section--white {
  background: var(--white);
  backdrop-filter: none;
}
.section--white .section-title,
.section--white h2,
.section--white h3 {
  color: var(--text);
}
.section--white p {
  color: var(--text-muted);
}

/* ── Navigation ─────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(17, 27, 48, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; position: relative; }
.nav-logo { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--gold-light); letter-spacing: 0.03em; line-height: 1.2; }
.nav-logo span { display: block; font-size: 0.68rem; font-family: var(--font-body); font-weight: 300; color: var(--gold-light); letter-spacing: 0.12em; text-transform: uppercase; }
.nav-links { display: flex; gap: 8px; list-style: none; }
.nav-links a { font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-light); padding: 6px 14px; border-radius: 2px; transition: color 0.2s, background 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--navy); background: var(--gold); }
.nav-mobile-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.nav-mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--gold-light); }

/* ── Hero ────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: 20px clamp(16px, 4vw, 40px) 0;
}
.hero-sticky {
  position: sticky;
  top: var(--nav-height);
  z-index: 1;
  background: var(--navy-deep);
}
.hero-wrapper {
  position: relative;
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  aspect-ratio: 2 / 1;
  max-height: 520px;
  overflow: hidden;
}
.hero-wrapper .hero-photo,
.hero-wrapper picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-wrapper picture img,
.hero-wrapper > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
}
.hero-headline {
  text-align: center;
  padding: 0 20px;
  margin-bottom: 20px;
}
.hero-cemetery-name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 68px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 6px;
}
.hero-council-name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 56px);
  font-weight: 400;
  font-style: italic;
  color: var(--gold-light);
  line-height: 1.1;
  margin-bottom: 0;
}

/* Flat panel */
.hero-flat-panel {
  position: relative;
  z-index: 2;
  background: var(--navy-deep);
  margin-top: 10px;
  border-top: 4px solid var(--gold);
  padding: 20px 40px;
}
.hero-flat-panel .container {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 40px;
}
.panel-main-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 20px;
}
.panel-heading { flex: 1; }
.panel-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 10px;
}
.panel-h1 em { font-style: italic; color: var(--gold-light); }
.panel-p {
  font-size: 0.95rem;
  font-weight: 300;
  color: rgba(255,255,255,0.72);
  max-width: 480px;
  line-height: 1.7;
}
.panel-btns {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  align-items: flex-start;
  padding-top: 4px;
}
.hero-stats {
  display: flex;
  gap: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  flex-wrap: wrap;
  align-items: flex-end;
}
.hero-stat-item { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-number { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--gold-light); line-height: 1; }
.hero-stat-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.4); }

/* ── Hero responsive (mobile, <768px) ────────── */
@media (max-width: 767px) {
  .hero-wrapper {
    aspect-ratio: 2 / 1;
    max-height: 400px;
  }
  .hero-headline {
    top: 8%;
  }
  .hero-cemetery-name {
    font-size: 2.25rem;
    line-height: 1.1;
  }
  .hero-council-name {
    font-size: 1.5rem;
  }
}

/* ── Page Header (inner pages) ───────────────── */
.page-header {
  position: relative;
  z-index: 1;
  background: var(--navy);
  backdrop-filter: none;
  color: var(--white);
  padding: 56px 0 48px;
  border-bottom: 2px solid var(--gold);
}
.page-header h1,
.page-header p,
.page-header span {
  color: var(--white);
}
.page-header span { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.page-header h1 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.1; }
.page-header p { margin-top: 14px; font-size: 1.05rem; font-weight: 300; color: rgba(255,255,255,0.7); max-width: 560px; }

/* ── Buttons ─────────────────────────────────── */
.btn { display: inline-block; padding: 12px 28px; font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; border-radius: 2px; transition: all 0.2s; cursor: pointer; }
.btn-gold { background: var(--gold); color: var(--navy-deep); border: 2px solid var(--gold); }
.btn-gold:hover { background: transparent; color: var(--gold); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.4); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ── Section Titles ──────────────────────────── */
.section-title { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.15; margin-bottom: 12px; }
.section-title + .section-subtitle { font-size: 1rem; color: var(--text-muted); margin-bottom: 48px; max-width: 560px; }
.section--navy .section-title + .section-subtitle { color: rgba(255,255,255,0.65); }
.section-rule { display: block; width: 40px; height: 3px; background: var(--gold); margin-bottom: 20px; }

/* ── Cards ───────────────────────────────────── */
.card-grid { display: grid; gap: 24px; }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white);
  backdrop-filter: none;
  border: 1px solid rgba(255,255,255,0.7);
  border-top: 3px solid var(--gold);
  padding: 32px;
  transition: box-shadow 0.2s, background 0.2s;
}
.card:hover { background: rgba(255,255,255,0.7); box-shadow: 0 8px 32px rgba(0,0,0,0.1); }
.card-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.card h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

/* ── Placeholder Blocks ──────────────────────── */
.placeholder { background: rgba(235,235,235,0.6); border: 2px dashed #CCC; border-radius: 4px; padding: 40px 32px; text-align: center; color: var(--gray-mid); font-size: 0.9rem; font-style: italic; }
.placeholder-img { width: 100%; aspect-ratio: 16/9; background: rgba(235,235,235,0.6); border: 2px dashed #CCC; border-radius: 4px; display: flex; align-items: center; justify-content: flex-start; color: var(--gray-mid); font-size: 0.85rem; }
.placeholder-img.square   { aspect-ratio: 1/1; }
.placeholder-img.portrait { aspect-ratio: 3/4; }

/* ── Table ───────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.data-table th { background: rgba(28,43,74,0.9); color: var(--white); padding: 12px 16px; text-align: left; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-light); vertical-align: top; background: var(--white); color: var(--text); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--cream); }

/* ── Photo Grid ──────────────────────────────── */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo-grid .placeholder-img { aspect-ratio: 4/3; transition: opacity 0.2s; cursor: pointer; }
.photo-grid .placeholder-img:hover { opacity: 0.8; }

/* ── Contact Form ────────────────────────────── */
.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px 16px; border: 1px solid var(--gray-light); border-radius: 2px; font-family: var(--font-body); font-size: 0.95rem; color: var(--text); background: rgba(255,255,255,0.9); transition: border-color 0.2s; outline: none; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--gold); }
.form-group textarea { min-height: 140px; resize: vertical; }

/* ── Footer ──────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  background: rgba(13, 19, 36, 0.97);
  color: rgba(255,255,255,0.6);
  padding: 48px 0 28px;
  border-top: 2px solid var(--gold);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.footer-col h4 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { font-size: 0.9rem; color: rgba(255,255,255,0.55); transition: color 0.2s; }
.footer-col ul a:hover { color: var(--gold); }
.footer-bottom { padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.8rem; display: flex; justify-content: space-between; align-items: center; }
.footer-legal { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); font-size: 0.72rem; color: rgba(255,255,255,0.3); text-align: center; line-height: 1.6; }

/* ── Easter Egg Toast ─────────────────────────── */
.ee-toast { position: fixed; bottom: 28px; right: 28px; background: var(--gold); color: var(--navy-deep); font-size: 0.85rem; font-weight: 600; padding: 12px 20px; border-radius: 4px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); transform: translateY(80px); opacity: 0; transition: all 0.3s; z-index: 999; pointer-events: none; }
.ee-toast.show { transform: translateY(0); opacity: 1; pointer-events: all; cursor: pointer; }

/* ── Announce / Event items ──────────────────── */
.announce-item { padding: 24px 28px; background: rgba(255,255,255,0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-left: 4px solid var(--gold); border-bottom: 1px solid rgba(235,235,235,0.6); margin-bottom: 16px; }
.announce-item h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; }
.announce-item p { font-size: 0.95rem; color: var(--text-muted); }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
  .panel-main-row { flex-direction: column; gap: 20px; }
  .panel-btns { flex-direction: row; }
  .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 56px 0; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: var(--nav-height); left: 0; right: 0; background: rgba(17,27,48,0.98); padding: 16px; gap: 4px; border-top: 1px solid rgba(255,255,255,0.1); }
  .nav-mobile-toggle { display: flex; }
  .card-grid--2, .card-grid--3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .photo-grid { grid-template-columns: 1fr; }

  /* The desktop spacer that pushed the panel to the bottom — kill it on mobile */
  .hero-flat-panel-spacer { display: none; }

  /* Info panel sits flush against the photo, no gap */
  .hero-flat-panel {
    position: relative;
    z-index: 2;
    padding: 28px 20px 32px;
    background: var(--navy);
    border-top: 2px solid var(--gold);
    /* Subtle gold divider centered above the heading inside the panel */
  }
  .hero-flat-panel .container { padding: 0; }
  .hero-flat-panel .panel-main-row { flex-direction: column; gap: 18px; }
  .hero-flat-panel .panel-heading { text-align: center; }
  .hero-flat-panel .panel-h1 {
    font-size: 1.6rem;
    line-height: 1.15;
    margin-bottom: 10px;
  }
  /* Add the "Honoring Service and Sacrifice" subtitle as a small gold lead-in via a pseudo-element */
  .hero-flat-panel .panel-heading::before {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background: var(--gold);
    margin: 0 auto 14px;
  }

  /* Show description on mobile */
  .panel-p { display: block; font-size: 0.9rem; line-height: 1.55; margin-top: 10px; }
  .panel-btns { flex-direction: column; width: 100%; gap: 10px; }
  .panel-btns .btn { text-align: center; width: 100%; }
}

/* ── About page two-column responsive grid ───────────────────── */
.about-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-two-col--center {
  align-items: stretch;
}
/* Desktop image sizing: cap height, fill column, crop sensibly */
.about-two-col figure {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.about-two-col figure img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
  display: block;
}
@media (max-width: 768px) {
  .about-two-col,
  .about-two-col--center {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  /* Image first on mobile for visual impact */
  .about-two-col figure {
    order: -1;
    height: auto;
  }
  /* Cap image height on mobile to prevent tall portrait photos from dominating */
  .about-two-col figure img {
    max-height: 380px;
  }
}

/* ── Contact page two-column responsive grid ─────────────────── */
.contact-two-col {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 768px) {
  .contact-two-col {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ── Form row: side-by-side fields that stack on mobile ──────── */
.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
@media (max-width: 640px) {
  .contact-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ── Mobile form field touch targets (≥44px) ─────────────────── */
@media (max-width: 640px) {
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 14px 16px;
    font-size: 1rem;
    min-height: 44px;
  }
  .form-group textarea {
    min-height: 120px;
  }
}
