/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2c4a3e;
  --primary-light: #3d6b5a;
  --primary-dark: #1a2e27;
  --accent: #c7a94e;
  --accent-light: #dfc572;
  --accent-dark: #8c6f29;
  --text: #333;
  --text-light: #666;
  --bg: #faf9f6;
  --bg-alt: #f0ede6;
  --white: #fff;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --font: 'Georgia', 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Offset anchored sections so the fixed navbar doesn't cover headings */
.section, .hero { scroll-margin-top: 64px; }
.anchor-offset { display: block; height: 0; scroll-margin-top: 64px; }

/* --- Navbar --- */
.navbar {
  position: fixed; top: 0; width: 100%; z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: background 0.3s;
}
.nav-container {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 64px;
}
.nav-brand {
  font-family: var(--font); font-size: 1.3rem; font-weight: bold;
  color: var(--primary); text-decoration: none;
}
.nav-links {
  display: flex; list-style: none; gap: 8px;
}
.nav-links a {
  text-decoration: none; color: var(--text);
  padding: 8px 14px; border-radius: var(--radius);
  font-size: 0.9rem; transition: all 0.2s;
}
.nav-links a:hover { background: var(--bg-alt); color: var(--primary); }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text); transition: 0.3s;
}

/* --- Hero --- */
.hero {
  position: relative; min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
  overflow: hidden;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: url('') center/cover no-repeat;
  opacity: 0.2;
}
.hero-content { position: relative; z-index: 1; padding: 120px 24px 80px; }
/* Two-column hero when a photo is set (has-photo added by app.js) */
.hero-content.has-photo {
  display: flex; align-items: center; justify-content: center;
  gap: 64px; text-align: left;
}
.hero-content.has-photo .hero-tagline { margin-inline: 0; }
.hero-photo { margin: 0; flex-shrink: 0; }
.hero-photo img {
  display: block; width: 300px; max-width: 100%;
  border: 10px solid var(--white); border-radius: 4px;
  box-shadow: var(--shadow-lg);
}
.hero h1 {
  font-family: var(--font); font-size: 3.5rem;
  margin-bottom: 16px; letter-spacing: -0.5px;
}
.hero-tagline { font-size: 1.25rem; opacity: 0.9; margin-bottom: 8px; max-width: 600px; margin-inline: auto; }
.hero-address { font-size: 1rem; opacity: 0.7; margin-bottom: 32px; }

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 12px 28px;
  border-radius: var(--radius); font-size: 1rem;
  text-decoration: none; cursor: pointer;
  transition: all 0.2s; border: 2px solid transparent;
  font-weight: 500;
}
.btn-primary {
  background: var(--accent); color: var(--primary-dark);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); }
.btn-outline {
  background: transparent; color: var(--white);
  border-color: rgba(255,255,255,0.5); margin-left: 12px;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }

/* --- Sections --- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-highlight {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
}
.section-title {
  font-family: var(--font); font-size: 2rem;
  text-align: center; margin-bottom: 16px;
  color: var(--primary);
}
.section-highlight .section-title { color: var(--white); }
.section-subtitle {
  text-align: center; max-width: 650px;
  margin: 0 auto 40px; color: var(--text-light);
  font-size: 1.05rem;
}
.section-highlight .section-subtitle { color: rgba(255,255,255,0.85); }

/* --- About --- */
.about-content {
  max-width: 700px; margin: 0 auto 40px;
  text-align: center; font-size: 1.1rem;
  color: var(--text-light); line-height: 1.8;
}
.about-video {
  max-width: 720px; margin: 0 auto 48px; text-align: center;
}
.about-video h3 {
  font-family: var(--font); color: var(--primary);
  font-size: 1.3rem; margin-bottom: 16px;
}
.about-video video {
  /* Cap by viewport height (the video is portrait); width follows the aspect
     ratio so there are no letterbox bars. */
  display: block; width: auto; max-width: 100%;
  max-height: 70vh; margin: 0 auto;
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  background: #000;
}
.service-schedule {
  text-align: center; background: var(--white);
  padding: 32px; border-radius: var(--radius);
  box-shadow: var(--shadow); max-width: 400px; margin: 0 auto;
}
.schedule-icon { font-size: 2rem; margin-bottom: 8px; }
.service-schedule h3 {
  font-family: var(--font); color: var(--primary); margin-bottom: 8px;
}

/* --- Social Media --- */
.social-links {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 16px;
}
.yt-icon { margin-right: 8px; vertical-align: -5px; }
.fb-icon { margin-right: 8px; vertical-align: -3px; }

/* --- Calendar --- */
.events-list { max-width: 700px; margin: 0 auto; }
.event-card {
  background: var(--white); border-radius: var(--radius);
  padding: 24px; margin-bottom: 16px;
  box-shadow: var(--shadow);
  display: flex; gap: 24px; align-items: flex-start;
}
.event-date {
  background: var(--primary); color: var(--white);
  border-radius: var(--radius); padding: 12px 16px;
  text-align: center; min-width: 70px;
  flex-shrink: 0;
}
.event-date .month { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }
.event-date .day { font-size: 1.5rem; font-weight: bold; }
.event-details h3 { color: var(--primary); margin-bottom: 4px; font-size: 1.1rem; }
.event-details .event-time { color: var(--accent); font-weight: 500; font-size: 0.9rem; }
.event-details .event-desc { color: var(--text-light); font-size: 0.95rem; margin-top: 6px; }
.event-details .event-loc { color: var(--text-light); font-size: 0.85rem; font-style: italic; }
.no-events { text-align: center; color: var(--text-light); padding: 40px; }

/* --- Photo Gallery --- */
.photos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.photo-card {
  display: block; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.photo-card img {
  display: block; width: 100%; height: 240px;
  object-fit: cover; transition: transform 0.3s;
}
.photo-card:hover img { transform: scale(1.03); }
.photo-credit {
  text-align: center; color: var(--text-light);
  font-size: 0.9rem; font-style: italic; margin-top: 16px;
}
/* Album cards sit below the gallery when both are shown */
.photos-grid:not(:empty) ~ .albums-grid { margin-top: 32px; }

/* --- Photo Albums --- */
.albums-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.album-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none; color: inherit; display: block;
}
.album-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.album-cover {
  height: 200px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: 3rem;
  background-size: cover; background-position: center;
}
.album-info { padding: 20px; }
.album-info h3 { color: var(--primary); margin-bottom: 6px; }
.album-info p { color: var(--text-light); font-size: 0.9rem; }

/* --- Donate --- */
#donateButton { text-align: center; }
.donation-text {
  max-width: 650px; margin: 0 auto;
  text-align: center; font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
}
.donation-text p { margin-bottom: 16px; }
.donation-text a { color: var(--accent-light); }
.donation-text-below p { margin: 32px 0 0; font-size: 0.95rem; }

/* --- Contact --- */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: start;
}
.contact-item { margin-bottom: 24px; }
.contact-item strong { color: var(--primary); display: block; margin-bottom: 4px; }
.contact-form .form-group { margin-bottom: 16px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 16px;
  border: 2px solid #ddd; border-radius: var(--radius);
  font-size: 1rem; font-family: var(--font-sans);
  transition: border-color 0.2s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--primary);
}
.form-status { margin-top: 12px; font-size: 0.9rem; }
.form-status.success { color: var(--primary); }
.form-status.error { color: #c0392b; }

/* --- Footer --- */
.footer {
  background: var(--primary-dark); color: rgba(255,255,255,0.7);
  text-align: center; padding: 40px 24px;
}
.footer-name {
  font-family: var(--font); font-size: 1.2rem;
  color: var(--white); margin-bottom: 8px;
}

/* --- Legal / content pages --- */
.legal { padding: 120px 0 80px; }
.legal .container { max-width: 800px; }
.legal .section-title { text-align: left; }
.legal-updated { color: var(--text-light); font-size: 0.9rem; margin-bottom: 32px; }
.legal h3 {
  font-family: var(--font); color: var(--primary);
  font-size: 1.3rem; margin: 36px 0 10px;
}
.legal h4 {
  color: var(--primary); font-size: 1.05rem; margin: 24px 0 6px;
}
.legal p { color: var(--text); margin-bottom: 16px; line-height: 1.8; }
/* Shared brand-gold link identity: same hue + hover underline in both places,
   two shades so it stays legible on dark (footer) and light (page) backgrounds. */
.footer-links a, .legal .back-link {
  font-weight: 500; text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.footer-links a:hover, .legal .back-link:hover { border-bottom-color: currentColor; }

.footer-links { margin-top: 12px; font-size: 0.9rem; }
.footer-links a { color: var(--accent-light); }

.legal .back-link {
  display: inline-block; margin-top: 40px;
  color: var(--accent-dark);
}

/* --- Utilities --- */
.muted { color: var(--text-light); text-align: center; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute;
    top: 64px; left: 0; width: 100%;
    background: var(--white);
    flex-direction: column; padding: 16px;
    box-shadow: var(--shadow);
  }
  .nav-links.active { display: flex; }
  .hero h1 { font-size: 2.2rem; }
  .hero-tagline { font-size: 1rem; }
  .hero-content.has-photo { flex-direction: column; gap: 40px; text-align: center; }
  .hero-content.has-photo .hero-tagline { margin-inline: auto; }
  .hero-photo img { width: 230px; }
  .contact-grid { grid-template-columns: 1fr; }
  .event-card { flex-direction: column; gap: 12px; }
  .btn-outline { margin-left: 0; margin-top: 12px; }
}
