/* =============================================================
   base.css – Global styles (reset, header, footer, utilities)
   ============================================================= */

/* ---------------- RESET & TYPOGRAPHY ---------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background: #ffffff;
  min-height: 100vh;
}

html {
  scroll-behavior: smooth;
}

/* ---------------- CONTAINERS ---------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------------- MOTTO BAR ---------------- */
#motto-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001;
  background: white;
  color: #b45309;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-style: italic;
  font-family: 'Georgia', serif;
  transition: all 0.3s ease;
  /* Decorative only — on mobile the wrapped quote grows taller than the
     header offset and sits above it (z-index 1001 vs 1000), swallowing
     taps meant for the hamburger. Let clicks pass through. */
  pointer-events: none;
}

#motto-bar.transparent {
  background: transparent;
  color: white;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* ---------------- HEADER ---------------- */
.header {
  position: fixed;
  top: 2rem;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.header.transparent {
  background: transparent;
  box-shadow: none;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-img {
  position: fixed;
  top: 0;
  left: 20px;
  height: 80px;
  width: auto;
  object-fit: contain;
  margin: 0;
  z-index: 1100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #b45309;
  text-decoration: none;
}

.header.transparent .logo {
  color: white;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: #b45309;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.header.transparent .nav-link {
  color: white;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.nav-link:hover {
  color: #d97706;
  background: rgba(217, 119, 6, 0.1);
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 200px;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 1002;
  padding: 0.5rem 0;
}

.dropdown-content a {
  display: block;
  padding: 0.75rem 1rem;
  color: #b45309;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.3s ease;
}

.dropdown-content a:hover {
  background: #fef7ed;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #b45309;
}

.header.transparent .hamburger {
  color: white;
}

/* ---------------- BUTTONS ---------------- */
.btn-primary {
  display: inline-block;
  background: linear-gradient(to right, #d97706, #ea580c);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background: linear-gradient(to right, #b45309, #c2410c);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* ---------------- ANIMATIONS ---------------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- FOOTER ---------------- */
.footer {
  background: linear-gradient(to bottom, #b45309, #92400e);
  color: white;
  padding: 3rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 72rem;
  margin: 0 auto;
}

.footer-section h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fbbf24;
}

.footer-section p,
.footer-section a {
  color: white;
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: block;
}

.footer-section a:hover {
  color: #fbbf24;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
}

.footer-highlight {
  color: #fbbf24;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

/* ---------------- RESPONSIVE DESIGN ---------------- */
@media (max-width: 1024px) {
  .navbar {
    padding: 1rem;
  }

  .nav-menu {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    display: flex;
  }

  .header.transparent .nav-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
  }

  .header.transparent .nav-menu .nav-link {
    color: #b45309;
    text-shadow: none;
  }

  .logo-img {
    height: 60px;
  }

  /* Compact footer: the 2rem grid gap + heading margins stacked up to a
     lot of dead space once the columns collapse to a single column. */
  .footer {
    padding: 2rem 0;
  }
  .footer-content {
    gap: 1.25rem;
  }
  .footer-section h4 {
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
  }
  .footer-section p,
  .footer-section a {
    margin-bottom: 0.25rem;
    line-height: 1.5;
  }
  .footer-bottom {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }
}

/* ---------------- UTILITY CLASSES ---------------- */
.hidden {
  display: none;
}

.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}

.p-4 {
  padding: 1rem;
}

.rounded {
  border-radius: 0.5rem;
}

.shadow {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* =============================================================
   SITE HEADER (header.html uses .site-header.sticky-header)
   Added during audit fix – previously these classes had NO styles,
   which is why the navbar was invisible.
   ============================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* On the home page the motto bar sits in the top strip,
   so the header drops just below it. */
body.home .site-header {
  top: 2.4rem;
}

/* Transparent state over the hero (toggled by inject.js on scroll) */
.site-header.transparent {
  background: transparent;
  box-shadow: none;
}
.site-header.transparent .nav-link,
.site-header.transparent .hamburger {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Interior pages have a solid fixed header – reserve space so the
   page content isn't hidden underneath it. */
body.fixed-header {
  padding-top: 84px;
}

/* Mobile: let dropdowns sit inline inside the open menu instead of
   floating off-screen (they were unreachable on touch devices). */
@media (max-width: 768px) {
  .nav-menu .dropdown-content {
    position: static;
    box-shadow: none;
    min-width: 0;
    padding-left: 1rem;
  }

  /* The quote wraps to two lines on phones (~61px tall), so push the
     home header below it instead of letting the two overlap. */
  body.home .site-header {
    top: 3.9rem;
  }

  /* The 84px reservation matches the DESKTOP header; the mobile bar is
     much shorter, which left a band of dead space above page content.
     64px still clears the fixed 60px logo. */
  body.fixed-header {
    padding-top: 64px;
  }


  /* Home page: the transparent-over-hero header paints nav links WHITE,
     but the opened mobile menu panel is white too — links were invisible.
     (The existing fix above only covered `.header`, not `.site-header`.) */
  .site-header.transparent .nav-menu {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
  }
  .site-header.transparent .nav-menu .nav-link {
    color: #b45309;
    text-shadow: none;
  }
}

/* Breathing room between page content and the footer.
   .content-section had no styles, so interior pages rendered with the
   footer flush against the content. (Home/prayers already had trailing
   margins of their own.)
   Top padding kept at ~28px: enough that headings still clear the fixed
   header when the nav wraps to two lines at mid-size widths (~800px). */
.content-section {
  padding-top: 28px;
  padding-bottom: 60px;
}

/* Mobile header never wraps (hamburger), so content can sit closer.
   NOTE: must come AFTER the .content-section rule above — media queries
   don't add specificity, source order decides. */
@media (max-width: 768px) {
  .content-section {
    padding-top: 12px;
  }
}
