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

:root {
  /* Colors */
  --color-primary: #1a2744;     /* Deep navy blue */
  --color-secondary: #2c3e6b;   /* Mid navy */
  --color-accent: #c9a84c;      /* Warm gold */
  --color-accent-lt: #f0d080;   /* Light gold */
  --color-white: #ffffff;
  --color-light: #f4f6fb;
  --color-text: #2d2d2d;
  --color-text-muted: #6b7280;
  --color-border: #e2e8f0;
  --color-overlay: rgba(26, 39, 68, 0.72);
  --color-footer: #0f172a;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.18);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Layout */
  --transition: 0.3s ease;
  --header-h: 80px;
  --container-width: 1400px;
}

/* =========================================================================
   Reset & Base Styles
   ========================================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-lt);
}

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

ul {
  list-style: none;
}

/* =========================================================================
   Container & Layout Utility
   ========================================================================= */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section-bg-light {
  background-color: var(--color-light);
}

.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* =========================================================================
   Typography & Elements
   ========================================================================= */
.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  max-width: 700px;
  margin: -2rem auto 3rem auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.4);
}

.btn-primary:hover {
  background-color: var(--color-accent-lt);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.6);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn-outline:hover {
  background-color: var(--color-white);
  color: var(--color-primary);
}

/* Cards */
.card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.card-img-top {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.card-text {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* =========================================================================
   Header & Navigation
   ========================================================================= */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  background-color: transparent;
  z-index: 1000;
  transition: background-color var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
}

#main-header.scrolled {
  background-color: rgba(26, 39, 68, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  z-index: 1001;
  flex-shrink: 0; /* Never shrink the brand */
}

.brand img {
  height: 36px;
  width: auto;
  border-radius: 4px;
}

.brand-name {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  /* Remove all truncation — always show full text */
  overflow: visible;
  text-overflow: unset;
  max-width: none;
}

#main-nav {
  display: flex;
  flex-shrink: 1;
}

#main-nav ul {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem;
}

#main-nav li {
  white-space: nowrap;
}

#main-nav a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0;
  position: relative;
  text-decoration: none;
  letter-spacing: 0.01em;
}

#main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition);
}

#main-nav a:hover::after,
#main-nav a.active::after {
  width: 100%;
}

#main-nav a:hover,
#main-nav a.active {
  color: var(--color-white);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-white);
  margin: 5px 0;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* =========================================================================
   Hero Sections
   ========================================================================= */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--color-white);
  padding-top: var(--header-h); /* Avoid overlap with header */
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-overlay);
  z-index: 1;
}

.hero-page {
  min-height: 50vh;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-white);
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 400;
  margin-bottom: 2.5rem;
  text-shadow: 0 1px 5px rgba(0,0,0,0.3);
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================================================
   Home Page Specific Sections
   ========================================================================= */
/* Welcome Strip */
.welcome-strip {
  margin-top: -60px;
  position: relative;
  z-index: 10;
}

.welcome-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.welcome-card {
  background: var(--color-white);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: transform var(--transition);
}

.welcome-card:hover {
  transform: translateY(-8px);
}

.welcome-icon {
  width: 60px;
  height: 60px;
  background-color: var(--color-light);
  color: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  font-size: 1.5rem;
}

.welcome-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

/* Standard Two Column Text/Image */
.about-snapshot {
  padding: 6rem 0;
}

.about-img-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 1rem;
}

.about-text h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--color-accent);
}

.about-text p {
  margin-bottom: 1.25rem;
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

/* Service Times Banner */
.service-times-banner {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 4rem 0;
  text-align: center;
}

.service-times-banner h2 {
  color: var(--color-white);
  margin-bottom: 2rem;
}

.service-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 2rem;
}

.service-item h4 {
  color: var(--color-accent);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
}

.service-address {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Gallery Strip */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background-color: var(--color-primary); /* Fallback */
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* =========================================================================
   Inner Pages Specifics
   ========================================================================= */

/* Faith & Beliefs List */
.beliefs-list {
  counter-reset: belief-counter;
}

.belief-item {
  margin-bottom: 2rem;
  padding-left: 3rem;
  position: relative;
}

.belief-item::before {
  counter-increment: belief-counter;
  content: counter(belief-counter);
  position: absolute;
  left: 0;
  top: -4px;
  width: 35px;
  height: 35px;
  background-color: var(--color-light);
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.belief-item h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

/* Scripture Banner */
.scripture-banner {
  background-color: var(--color-primary);
  color: var(--color-accent);
  padding: 5rem 2rem;
  text-align: center;
}

.scripture-text {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-style: italic;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Event List */
.event-card {
  display: flex;
  flex-direction: column;
}

.event-date-badge {
  background-color: var(--color-primary);
  color: var(--color-white);
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  align-self: flex-start;
}

.event-card .card-body {
  padding-top: 1.5rem;
}

/* Outreach Stats */
.stats-bar {
  background-color: var(--color-light);
  padding: 4rem 0;
  margin: 4rem 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Contact Page */
.contact-info-card {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.contact-icon {
  font-size: 1.5rem;
  color: var(--color-accent);
}

.contact-details h4 {
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
}

.contact-details p, .contact-details a {
  color: var(--color-text-muted);
}

.contact-form {
  background-color: var(--color-white);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-primary);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 39, 68, 0.1);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.map-container {
  height: 400px;
  width: 100%;
  background-color: #e5e3df; /* Placeholder map background */
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 3rem;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background-color: var(--color-footer);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand {
  margin-bottom: 1.5rem;
}

.footer-brand .brand-name {
  font-size: 1.4rem;
}

.footer-about {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.footer-title {
  color: var(--color-white);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--color-accent);
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition), padding-left var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--color-accent);
  padding-left: 5px;
}

.footer-contact li {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact a:hover {
  color: var(--color-white);
}

.footer-bottom {
  background-color: #0b1120;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.copyright span, .charity-no {
  display: block;
  margin-bottom: 0.5rem;
}

/* =========================================================================
   Animations
   ========================================================================= */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delay classes for grid items */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* =========================================================================
   Responsive Design
   ========================================================================= */
@media (max-width: 1250px) {
  .hamburger {
    display: block;
  }

  /* Main Navigation overlay */
  #main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
  }

  #main-nav.open {
    opacity: 1;
    visibility: visible;
  }

  #main-nav ul {
    flex-direction: column;
    gap: 2rem;
  }
  
  #main-nav li {
    text-align: center;
  }

  #main-nav a {
    font-size: 1.5rem;
    color: var(--color-white);
  }

  .brand-name {
    font-size: 1.05rem;
  }
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

@media (max-width: 992px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .welcome-card-grid {
    grid-template-columns: 1fr;
  }

  .welcome-strip {
    margin-top: 3rem;
  }
  
  .about-img-wrap {
    order: -1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 70px;
  }
  
  .section {
    padding: 3rem 0;
  }

  .brand-name {
    font-size: 0.82rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .gallery-strip {
    grid-template-columns: 1fr;
  }
  
  .service-times-banner {
    padding: 3rem 1rem;
  }
}
