:root {
  /* Brand Colors - Aligned with website */
  --churches-primary: #004799;
  --churches-primary-light: #0066cc;
  --churches-secondary: #ffbf00;
  --churches-secondary-light: #ffd633;

  /* Neutrals */
  --churches-white: #ffffff;
  --churches-black: #000000;
  --churches-gray-50: #f8fafc;
  --churches-gray-100: #f1f5f9;
  --churches-gray-200: #e2e8f0;
  --churches-gray-300: #cbd5e1;
  --churches-gray-600: #475569;
  --churches-gray-700: #334155;
  --churches-gray-800: #1e293b;

  /* Apple-Style Shadows */
  --churches-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --churches-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --churches-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --churches-shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.1);
  --churches-shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --churches-transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --churches-transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --churches-transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Churches Section */
#global-churches-section {
  background: var(--churches-white);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

/* Section Header - Apple Style */
#global-churches-section .churches-header {
  text-align: center;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

#global-churches-section .churches-label {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, rgba(0, 71, 153, 0.08) 0%, rgba(255, 191, 0, 0.08) 100%);
  border: 1.5px solid rgba(0, 71, 153, 0.2);
  border-radius: 100px;
  color: var(--churches-primary);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
  box-shadow: var(--churches-shadow-sm);
}

#global-churches-section .churches-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--churches-gray-800);
  margin: 0 0 32px 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Statistics Pills */
.churches-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.stat-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 32px;
  background: var(--churches-white);
  border: 1px solid var(--churches-gray-200);
  border-radius: 20px;
  box-shadow: var(--churches-shadow-md);
  transition: all var(--churches-transition-base);
  min-width: 140px;
}

.stat-badge:hover {
  transform: translateY(-4px);
  box-shadow: var(--churches-shadow-lg);
  border-color: var(--churches-gray-300);
}

.stat-badge-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--churches-primary) 0%, var(--churches-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-badge-label {
  font-size: 0.875rem;
  color: var(--churches-gray-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Map Container - Apple Style */
#church-map {
  height: 600px;
  width: 100%;
  border-radius: 24px;
  border: 1px solid var(--churches-gray-200);
  box-shadow: var(--churches-shadow-lg);
  margin-bottom: 48px;
  overflow: hidden;
  position: relative;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

#church-map::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
    rgba(0, 71, 153, 0.02) 0%,
    rgba(255, 191, 0, 0.02) 100%);
  pointer-events: none;
  z-index: 1000;
  border-radius: 24px;
}

/* Custom Map Controls - Apple Style */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--churches-shadow-md) !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--churches-gray-200) !important;
  color: var(--churches-primary) !important;
  font-weight: 700;
  transition: all var(--churches-transition-fast) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--churches-primary) !important;
  color: white !important;
  transform: scale(1.05);
}

/* Map Popup - Apple Style */
.leaflet-popup-content-wrapper {
  background: var(--churches-white);
  border-radius: 16px;
  box-shadow: var(--churches-shadow-xl);
  border: 1px solid var(--churches-gray-200);
  padding: 0;
  overflow: hidden;
}

.leaflet-popup-tip {
  background: var(--churches-white);
  border: 1px solid var(--churches-gray-200);
  box-shadow: var(--churches-shadow-md);
}

.church-popup {
  padding: 24px;
  max-width: 320px;
}

.church-popup h3 {
  margin: 0 0 16px 0;
  color: var(--churches-gray-800);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--churches-gray-100);
}

.church-popup p {
  margin: 12px 0;
  color: var(--churches-gray-600);
  font-size: 0.938rem;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.church-popup p strong {
  color: var(--churches-gray-700);
  font-weight: 600;
  min-width: 90px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.church-popup p strong i {
  color: var(--churches-primary);
  font-size: 0.875rem;
}

.popup-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--churches-gray-100);
}

.map-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--churches-primary) 0%, var(--churches-primary-light) 100%);
  color: white;
  text-decoration: none;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--churches-transition-base);
  box-shadow: var(--churches-shadow-sm);
  position: relative;
  overflow: hidden;
}

.map-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.map-btn:active::before {
  width: 300px;
  height: 300px;
}

.map-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--churches-shadow-md);
  color: white;
}

.map-btn i {
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}

.map-btn span {
  position: relative;
  z-index: 1;
}

.map-btn:last-child {
  background: var(--churches-white);
  color: var(--churches-primary);
  border: 1.5px solid var(--churches-primary);
}

.map-btn:last-child:hover {
  background: var(--churches-gray-50);
}

/* Church List Container */
#church-list-container {
  margin-top: 48px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.6s forwards;
}

.church-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

/* Church Item Card - Apple Style */
.church-item {
  background: var(--churches-white);
  padding: 28px;
  border-radius: 20px;
  border: 1px solid var(--churches-gray-200);
  box-shadow: var(--churches-shadow-md);
  cursor: pointer;
  transition: all var(--churches-transition-base);
  position: relative;
  overflow: hidden;
}

.church-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    var(--churches-primary) 0%,
    var(--churches-secondary) 100%);
  transform: scaleX(0);
  transition: transform var(--churches-transition-base);
}

.church-item:hover::before {
  transform: scaleX(1);
}

.church-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--churches-shadow-xl);
  border-color: var(--churches-gray-300);
}

.church-item h4 {
  margin: 0 0 16px 0;
  color: var(--churches-gray-800);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.church-item h4 i {
  color: var(--churches-primary);
  font-size: 1.125rem;
}

.church-info-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--churches-gray-50);
  border: 1px solid var(--churches-gray-200);
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 0.875rem;
  color: var(--churches-gray-700);
  transition: all var(--churches-transition-fast);
}

.church-info-pill:hover {
  background: var(--churches-gray-100);
  border-color: var(--churches-gray-300);
}

.church-info-pill i {
  color: var(--churches-primary);
  font-size: 0.875rem;
  min-width: 16px;
}

.church-info-pill strong {
  font-weight: 600;
  color: var(--churches-gray-800);
  min-width: 80px;
}

/* Service Time Badge */
.service-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg,
    rgba(255, 191, 0, 0.12) 0%,
    rgba(255, 191, 0, 0.06) 100%);
  border: 1.5px solid var(--churches-secondary);
  border-radius: 100px;
  margin: 16px 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--churches-gray-800);
}

.service-time-badge i {
  color: var(--churches-secondary);
  font-size: 0.875rem;
}

/* Church Actions */
.church-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--churches-gray-100);
}

.list-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--churches-primary) 0%, var(--churches-primary-light) 100%);
  color: white;
  text-decoration: none;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--churches-transition-base);
  box-shadow: var(--churches-shadow-sm);
  position: relative;
  overflow: hidden;
}

.list-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.list-btn:active::before {
  width: 300px;
  height: 300px;
}

.list-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--churches-shadow-md);
  color: white;
}

.list-btn i {
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}

.list-btn span {
  position: relative;
  z-index: 1;
}

.list-btn:last-child {
  background: var(--churches-white);
  color: var(--churches-primary);
  border: 1.5px solid var(--churches-primary);
}

.list-btn:last-child:hover {
  background: var(--churches-gray-50);
}

/* Country Flag Badge */
.country-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--churches-gray-50);
  border: 1px solid var(--churches-gray-200);
  border-radius: 100px;
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--churches-gray-700);
  margin-bottom: 12px;
}

/* Responsive Design - Apple Approach */
@media (max-width: 1024px) {
  #global-churches-section {
    padding: 60px 0;
  }

  #church-map {
    height: 500px;
  }

  .church-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .stat-badge {
    padding: 16px 28px;
    min-width: 120px;
  }

  .stat-badge-number {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  #global-churches-section {
    padding: 48px 0;
  }

  #global-churches-section .churches-title {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    margin-bottom: 24px;
  }

  .churches-stats {
    gap: 12px;
    margin-bottom: 36px;
  }

  .stat-badge {
    padding: 14px 24px;
    min-width: 100px;
  }

  .stat-badge-number {
    font-size: 1.75rem;
  }

  .stat-badge-label {
    font-size: 0.75rem;
  }

  #church-map {
    height: 400px;
    border-radius: 20px;
    margin-bottom: 36px;
  }

  .church-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .church-item {
    padding: 24px;
  }

  .church-item h4 {
    font-size: 1.25rem;
  }

  .church-popup {
    padding: 20px;
  }

  .church-popup h3 {
    font-size: 1.125rem;
  }

  .popup-actions,
  .church-actions {
    flex-direction: column;
  }

  .map-btn,
  .list-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  #global-churches-section {
    padding: 40px 0;
  }

  .churches-stats {
    gap: 10px;
  }

  .stat-badge {
    padding: 12px 20px;
    min-width: 90px;
  }

  .stat-badge-number {
    font-size: 1.5rem;
  }

  #church-map {
    height: 350px;
    border-radius: 16px;
  }

  .church-item {
    padding: 20px;
    border-radius: 16px;
  }

  .church-item h4 {
    font-size: 1.125rem;
  }

  .church-info-pill {
    padding: 8px 14px;
    font-size: 0.813rem;
  }

  .service-time-badge {
    padding: 8px 16px;
    font-size: 0.813rem;
  }

  .map-btn,
  .list-btn {
    padding: 10px 18px;
    font-size: 0.813rem;
  }
}

/* Smooth Scroll Behavior */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
