/* =============================================
   Mount Horeb Church — Shared Styles
   Vibrant & community-focused theme
   ============================================= */

:root {
  --color-primary: #0F62B8;        /* logo blue */
  --color-primary-dark: #072F6B;   /* deep logo blue */
  --color-primary-light: #3DA0F2;  /* lighter logo blue */
  --color-accent: #FFC72C;         /* warm gold (echoes logo yellow) */
  --color-accent-light: #FFE53D;
  --color-coral: #EF4444;
  --color-green: #43A047;          /* logo green accent */
  --color-cream: #F4FAFF;
  --color-bg: #F9FCFF;
  --color-text: #0E2138;
  --color-muted: #5C7290;
  --color-border: #DCE7F2;
  --shadow-sm: 0 2px 8px rgba(15, 98, 184, 0.10);
  --shadow-md: 0 8px 24px rgba(15, 98, 184, 0.15);
  --shadow-lg: 0 16px 40px rgba(15, 98, 184, 0.20);
  --radius: 12px;
  --radius-lg: 20px;
  --max-width: 1200px;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--color-primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--color-accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-primary-dark);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.4rem; }

p { margin-bottom: 1rem; color: #2C2640; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Top Bar ---------- */
.topbar {
  background: var(--color-primary-dark);
  color: #DCE7F2;
  font-size: 0.85rem;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.topbar a { color: #FFE53D; }
.topbar a:hover { color: #fff; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 245, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-primary-dark);
}
.brand-logo {
  height: 48px;
  width: auto;
  display: block;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text small {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--color-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}
.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all .2s ease;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--color-primary);
  color: #fff;
}
.nav-cta {
  background: var(--color-accent) !important;
  color: var(--color-primary-dark) !important;
  font-weight: 700 !important;
}
.nav-cta:hover { background: var(--color-accent-light) !important; color: var(--color-primary-dark) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-primary);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--color-accent);
  color: #1A1300;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: #1A1300; }
.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}
.btn-outline:hover { background: white; color: var(--color-primary-dark); }
.btn-outline:visited { color: white; }
.btn-dark {
  background: var(--color-primary);
  color: white;
}
.btn-dark:hover { background: var(--color-primary-dark); color: white; transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 80vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: white;
  overflow: hidden;
  background: linear-gradient(135deg, #072F6B 0%, #0F62B8 45%, #3DA0F2 75%, #43A047 100%);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("https://images.unsplash.com/photo-1438232992991-995b7058bbb3?w=1600&q=80");
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  mix-blend-mode: overlay;
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 5rem 1.5rem;
  max-width: 900px;
}
.hero h1 { color: white; margin-bottom: 1rem; text-shadow: 0 2px 30px rgba(0,0,0,0.25); }
.hero .eyebrow {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.hero p.lead {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.92);
  margin: 1.5rem auto 2rem;
  max-width: 640px;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Page hero (smaller, for inner pages) */
.page-hero {
  position: relative;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  color: white;
  background: linear-gradient(135deg, #072F6B 0%, #0F62B8 60%, #3DA0F2 100%);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255, 229, 61, 0.25), transparent 55%),
                    radial-gradient(circle at 80% 70%, rgba(67, 160, 71, 0.30), transparent 55%);
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 { color: white; }
.page-hero p { color: rgba(255,255,255,0.9); max-width: 700px; margin: 1rem auto 0; font-size: 1.1rem; }

/* ---------- Sections ---------- */
section { padding: 5rem 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.section-head .eyebrow {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.section-head h2 { margin-bottom: 1rem; }
.section-head p { color: var(--color-muted); font-size: 1.1rem; }

/* alt section background */
.section-alt { background: linear-gradient(180deg, #F9FCFF 0%, #E6F2FB 100%); }
.section-dark { background: var(--color-primary-dark); color: #F8F1FF; }
.section-dark h2 { color: white; }
.section-dark p { color: rgba(255,255,255,0.85); }

/* ---------- Cards & Grids ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  border: 1px solid var(--color-border);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-green) 100%);
  display: grid; place-items: center;
  color: white; font-size: 1.5rem;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--color-muted); margin-bottom: 0; }

/* Service times card */
.service-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all .25s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service-card-head {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: white;
  padding: 1.5rem;
  text-align: center;
}
.service-card-head .day {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}
.service-card-head .time {
  color: var(--color-accent-light);
  font-weight: 600;
  margin-top: 0.25rem;
}
.service-card-body {
  padding: 1.5rem;
  text-align: center;
}
.service-card-body h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-primary-dark);
  margin-bottom: 0.5rem;
}
.service-card-body p {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Event cards */
.event-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: all .25s ease;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.event-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.event-date {
  position: absolute;
  top: 1rem; left: 1rem;
  background: white;
  color: var(--color-primary-dark);
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  line-height: 1;
}
.event-date .day-num { font-size: 1.4rem; display: block; }
.event-date .month { font-size: 0.7rem; letter-spacing: 0.1em; color: var(--color-primary); text-transform: uppercase; }
.event-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.event-body h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.event-body .meta { color: var(--color-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.event-body p { margin-bottom: 1rem; flex: 1; color: var(--color-muted); }

/* Sermon cards */
.sermon-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all .25s ease;
}
.sermon-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.sermon-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-green) 100%);
  display: grid;
  place-items: center;
  color: white;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.sermon-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.15);
}
.sermon-thumb svg { position: relative; z-index: 1; }
.sermon-body { padding: 1.5rem; }
.sermon-body .series { color: var(--color-primary); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.sermon-body h3 { font-size: 1.2rem; margin: 0.4rem 0; }
.sermon-body .meta { color: var(--color-muted); font-size: 0.9rem; }

/* Two-column split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.split-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/5;
  background-size: cover;
  background-position: center;
}
@media (max-width: 768px) {
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .split-image { aspect-ratio: 4/3; }
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 55%, var(--color-green) 100%);
  color: white;
  text-align: center;
  padding: 5rem 1.5rem;
  border-radius: 0;
}
.cta-banner h2 { color: white; margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.92); max-width: 600px; margin: 0 auto 2rem; font-size: 1.1rem; }

/* Forms */
.form {
  display: grid;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary-dark);
  display: block;
  margin-bottom: 0.4rem;
}
.form input, .form textarea, .form select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: white;
  transition: border .2s ease, box-shadow .2s ease;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(76, 29, 149, 0.15);
}
.form textarea { min-height: 140px; resize: vertical; }
.form .checkbox { display: flex; gap: 0.6rem; align-items: flex-start; }
.form .checkbox input { width: auto; margin-top: 0.3rem; }
.form-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  display: none;
}
.form-status.success { display: block; background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }

/* Map */
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 420px;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* Footer */
.site-footer {
  background: var(--color-primary-dark);
  color: #C7DAEF;
  padding: 4rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-logo {
  max-width: 240px;
  height: auto;
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.95);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  display: block;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  color: white;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-grid a { color: #B8CDE3; }
.footer-grid a:hover { color: var(--color-accent); }
.footer-grid p { color: #B8CDE3; font-size: 0.95rem; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
}
.socials { display: flex; gap: 0.75rem; margin-top: 1rem; }
.socials a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: grid; place-items: center;
  color: #C7DAEF;
  transition: all .2s ease;
}
.socials a:hover { background: var(--color-accent); color: var(--color-primary-dark); }
.copyright {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: #8FA9C7;
}
/* Hero logo */
.hero-logo {
  max-width: 300px;
  width: 80%;
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.25));
  background: rgba(255,255,255,0.95);
  padding: 1rem 1.25rem;
  border-radius: 18px;
}
.placeholder-note {
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed rgba(245, 158, 11, 0.6);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #FCD34D;
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile nav ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    display: none;
    gap: 0.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.85rem 1rem; }
}
