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

:root {
  /* Modern Church Color Palette - Warm & Welcoming */
  --primary-color: #1a4d6d;        /* Deep blue - trust & stability */
  --secondary-color: #c99047;      /* Warm gold - welcoming */
  --accent-color: #6b8e9f;         /* Soft teal - peace */
  --text-dark: #2d3436;            /* Almost black */
  --text-medium: #636e72;          /* Medium gray */
  --text-light: #b2bec3;           /* Light gray */
  --bg-white: #ffffff;
  --bg-cream: #faf8f5;             /* Warm off-white */
  --bg-light: #f5f6fa;
  --success-color: #00b894;
  --border-color: #e1e8ed;

  /* Typography */
  --font-heading: 'Merriweather', Georgia, serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-base: 16px;
  --line-height: 1.7;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;

  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
  --border-radius: 4px;
  --box-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --box-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  line-height: var(--line-height);
  color: var(--text-dark);
  background-color: var(--bg-cream);
  overflow-x: hidden;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: var(--primary-color);
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-medium);
}

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

a:hover {
  color: var(--secondary-color);
}

/* ===== Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ===== Navigation ===== */
.navbar {
  background-color: var(--bg-white);
  color: var(--text-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--box-shadow-sm);
  height: var(--header-height);
  border-bottom: 1px solid var(--border-color);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.nav-brand h1 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-xs);
  align-items: center;
}

.nav-menu a {
  color: var(--text-dark);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  transition: var(--transition);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-menu a:hover {
  color: var(--primary-color);
  background-color: var(--bg-light);
}

.nav-menu a.active {
  color: var(--primary-color);
  background-color: var(--bg-light);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-dark);
  margin: 3px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #2d5f7f 100%);
  color: var(--bg-white);
  padding: var(--spacing-xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.03)"/></svg>');
  opacity: 0.3;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--bg-white);
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  font-weight: 300;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
}

/* ===== Cards & Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

.card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  box-shadow: var(--box-shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

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

.card h3 {
  margin-bottom: var(--spacing-sm);
  font-size: 1.5rem;
}

.card p {
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 0.95rem;
  text-decoration: none;
  font-family: var(--font-body);
}

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

.btn-primary:hover {
  background-color: #143d57;
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-sm);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--bg-white);
}

.btn-secondary:hover {
  background-color: #b37d39;
  transform: translateY(-2px);
}

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

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

/* Hero needs higher contrast than default outline button */
.hero .btn-outline {
  color: var(--bg-white);
  border-color: rgba(255, 255, 255, 0.95);
  background-color: rgba(255, 255, 255, 0.12);
}

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

.btn-light {
  background-color: var(--bg-white);
  color: var(--primary-color);
  border: 2px solid var(--bg-white);
}

.btn-light:hover {
  background-color: transparent;
  color: var(--bg-white);
}

/* ===== Sections ===== */
.content-section {
  padding: var(--spacing-xl) 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--spacing-lg);
}

.section-header h2 {
  margin-bottom: var(--spacing-sm);
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-medium);
}

/* ===== Info Box ===== */
.info-box {
  background-color: var(--bg-white);
  border-left: 4px solid var(--secondary-color);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-sm);
}

.info-box h4 {
  margin-bottom: var(--spacing-xs);
  color: var(--secondary-color);
}

/* ===== Footer ===== */
.footer {
  background-color: var(--primary-color);
  color: var(--bg-white);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h3,
.footer-section h4 {
  color: var(--bg-white);
  margin-bottom: var(--spacing-sm);
  font-size: 1.2rem;
}

.footer-section p,
.footer-section ul {
  color: rgba(255, 255, 255, 0.8);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--spacing-xs);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer-bottom p {
  margin-bottom: var(--spacing-xs);
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.6);
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--bg-white);
}

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

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

/* ===== Loading & Utilities ===== */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading.hidden {
  display: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--bg-white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.hidden {
  display: none !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root {
    --spacing-xl: 2.5rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.4rem; }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--box-shadow-md);
    border-top: 1px solid var(--border-color);
    gap: 0;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu li {
    border-bottom: 1px solid var(--border-color);
  }

  .nav-menu a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* ===== Page-specific styles ===== */
.page-header {
  text-align: center;
  padding: var(--spacing-lg) 0;
  background-color: var(--bg-white);
  margin-bottom: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-sm);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

.service-time {
  background-color: var(--bg-white);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin: var(--spacing-md) 0;
  border-left: 4px solid var(--secondary-color);
  box-shadow: var(--box-shadow-sm);
}

.service-time h4 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-xs);
}

.service-time p {
  margin: 0;
  color: var(--text-medium);
}
