/* ============================================
   SPANISH BAPTIST CHURCH — Design System
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --primary: #1B3A5C;
  --primary-light: #2A5A8C;
  --secondary: #C8913A;
  --secondary-light: #E8B960;
  --accent: #D44D2D;
  --bg-light: #F8F6F1;
  --bg-dark: #0F1E2E;
  --text-primary: #1A1A1A;
  --text-secondary: #555555;
  --text-light: #FFFFFF;
  --border: #E0DCD4;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.15);
  --radius: 12px;
  --transition: 0.3s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-light);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color var(--transition); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-family: 'Playfair Display', serif; font-weight: 700; line-height: 1.2; color: var(--primary); }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h4 { font-size: 1.2rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }

/* --- Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-dark { background: var(--bg-dark); color: var(--text-light); }
.section-dark h2, .section-dark h3, .section-dark p { color: var(--text-light); }
.section-alt { background: #FFFFFF; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.text-center { text-align: center; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { max-width: 650px; margin: 0 auto; font-size: 1.1rem; }
.section-header .divider {
  width: 60px; height: 3px; background: var(--secondary);
  margin: 16px auto 0; border-radius: 2px;
}

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 14px 32px;
  font-weight: 600; font-size: 0.95rem;
  border-radius: 50px; transition: all var(--transition);
  letter-spacing: 0.3px; text-transform: uppercase;
}
.btn-primary {
  background: var(--secondary); color: var(--text-light);
  box-shadow: 0 4px 15px rgba(200,145,58,0.35);
}
.btn-primary:hover { background: var(--secondary-light); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,145,58,0.5); }
.btn-outline {
  border: 2px solid var(--text-light); color: var(--text-light);
}
.btn-outline:hover { background: var(--text-light); color: var(--primary); }
.btn-dark {
  background: var(--primary); color: var(--text-light);
}
.btn-dark:hover { background: var(--primary-light); transform: translateY(-2px); }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 16px 0;
  background: transparent;
  transition: all var(--transition);
}
.site-header.scrolled {
  background: var(--bg-dark);
  padding: 10px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.header-brand { display: flex; align-items: center; gap: 12px; }
.header-brand img { height: 48px; width: auto; border-radius: 6px; }
.header-brand span {
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: 1.25rem; color: var(--text-light);
  white-space: nowrap;
}
.header-nav { display: flex; align-items: center; }
.header-nav ul {
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; flex-wrap: nowrap;
}
.header-nav a {
  color: rgba(255,255,255,0.85); font-weight: 500;
  font-size: 0.9rem; padding: 8px 14px;
  border-radius: 6px; transition: all var(--transition);
  position: relative;
}
.header-nav a::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; width: 0; height: 2px;
  background: var(--secondary); transition: all var(--transition); transform: translateX(-50%);
}
.header-nav a:hover, .header-nav a.active { color: var(--text-light); }
.header-nav a:hover::after, .header-nav a.active::after { width: 60%; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; z-index: 1001; }
.hamburger span { display: block; width: 26px; height: 2.5px; background: var(--text-light); border-radius: 2px; transition: all var(--transition); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav overlay */
.mobile-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15,30,46,0.95); z-index: 999;
  flex-direction: column; justify-content: center; align-items: center; gap: 12px;
}
.mobile-overlay.active { display: flex; }
.mobile-overlay a {
  color: var(--text-light); font-size: 1.4rem; font-weight: 600;
  padding: 12px 24px; transition: color var(--transition);
}
.mobile-overlay a:hover { color: var(--secondary); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 70vh; text-align: center; overflow: hidden;
}
.hero-home { min-height: 90vh; }
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  z-index: 0;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,30,46,0.75) 0%, rgba(15,30,46,0.55) 60%, rgba(15,30,46,0.8) 100%);
}
.hero-content {
  position: relative; z-index: 1; max-width: 800px; padding: 0 24px;
}
.hero-content h1 {
  color: var(--text-light); margin-bottom: 20px;
  font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 800;
}
.hero-content p {
  color: rgba(255,255,255,0.9); font-size: 1.2rem;
  margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.hero-content .btn { margin: 0 8px; }
.hero-badge {
  display: inline-block; padding: 6px 18px; border-radius: 50px;
  background: rgba(200,145,58,0.2); border: 1px solid var(--secondary);
  color: var(--secondary-light); font-size: 0.85rem; font-weight: 600;
  margin-bottom: 20px; letter-spacing: 1px; text-transform: uppercase;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: #FFFFFF; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: all var(--transition);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-img { height: 220px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 28px; }
.card-body h3 { margin-bottom: 12px; font-size: 1.3rem; }
.card-body p { font-size: 0.95rem; line-height: 1.7; }
.card-body .btn { margin-top: 16px; }

/* Glass Card */
.glass-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); padding: 36px; text-align: center;
  transition: all var(--transition);
}
.glass-card:hover { background: rgba(255,255,255,0.14); transform: translateY(-4px); }

/* ============================================
   STATS
   ============================================ */
.stats-section { background: var(--primary); }
.stat-item { text-align: center; padding: 30px 16px; }
.stat-number {
  font-family: 'Playfair Display', serif; font-size: 3rem; font-weight: 800;
  color: var(--secondary); margin-bottom: 8px;
}
.stat-label { color: rgba(255,255,255,0.85); font-size: 0.95rem; font-weight: 500; }

/* ============================================
   MISSION / TWO-COL
   ============================================ */
.mission-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.mission-img img { width: 100%; height: 100%; object-fit: cover; min-height: 350px; }
.mission-text h2 { margin-bottom: 20px; }
.mission-text p { font-size: 1.05rem; }

/* ============================================
   SERVICE TIMES BANNER
   ============================================ */
.service-banner { background: var(--bg-dark); text-align: center; padding: 60px 0; }
.service-banner h2 { color: var(--secondary); margin-bottom: 30px; }
.service-grid { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.service-item {
  background: rgba(255,255,255,0.06); padding: 24px 32px;
  border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.1);
  min-width: 200px;
}
.service-item h4 { color: var(--secondary-light); margin-bottom: 6px; font-family: 'Inter', sans-serif; font-weight: 600; }
.service-item p { color: rgba(255,255,255,0.8); margin: 0; font-size: 1.1rem; font-weight: 500; }

/* ============================================
   QUOTE / SCRIPTURE
   ============================================ */
.quote-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--bg-dark) 100%);
  text-align: center; padding: 80px 0;
}
.quote-section blockquote {
  font-family: 'Playfair Display', serif; font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--text-light); font-style: italic; max-width: 800px;
  margin: 0 auto 16px; line-height: 1.6;
}
.quote-section cite { color: var(--secondary); font-size: 1rem; font-style: normal; font-weight: 600; }

/* ============================================
   VALUES
   ============================================ */
.value-card {
  text-align: center; padding: 36px 24px;
  border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow); transition: all var(--transition);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.value-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; font-size: 1.6rem; color: var(--text-light);
}
.value-card h4 { margin-bottom: 10px; color: var(--primary); }
.value-card p { font-size: 0.95rem; }

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; margin-bottom: 6px; font-weight: 600;
  font-size: 0.9rem; color: var(--text-primary);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 14px 18px; border: 1px solid var(--border);
  border-radius: 8px; font-family: 'Inter', sans-serif;
  font-size: 0.95rem; transition: border var(--transition);
  background: #fff;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42,90,140,0.1);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-btn {
  padding: 15px 40px; background: var(--secondary); color: var(--text-light);
  border: none; border-radius: 50px; font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: all var(--transition); text-transform: uppercase;
}
.form-btn:hover { background: var(--secondary-light); transform: translateY(-2px); }

.contact-info-card {
  background: var(--bg-dark); border-radius: var(--radius); padding: 36px;
  color: var(--text-light);
}
.contact-info-card h3 { color: var(--secondary); margin-bottom: 24px; }
.contact-info-item { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.contact-info-item .icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(200,145,58,0.15); display: flex;
  align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--secondary); flex-shrink: 0;
}
.contact-info-item p { margin: 0; color: rgba(255,255,255,0.85); }
.contact-info-item strong { color: var(--text-light); display: block; margin-bottom: 2px; }
.map-container { margin-top: 24px; border-radius: var(--radius); overflow: hidden; }
.map-container iframe { width: 100%; height: 250px; border: 0; }

/* ============================================
   MINISTRY DETAIL (Services page)
   ============================================ */
.schedule-card {
  display: flex; align-items: stretch; background: #fff;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); margin-bottom: 30px;
  transition: all var(--transition);
}
.schedule-card:hover { box-shadow: var(--shadow-lg); }
.schedule-time {
  background: var(--primary); color: var(--text-light);
  padding: 30px; min-width: 160px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
}
.schedule-time .day { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; margin-bottom: 4px; }
.schedule-time .time { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; }
.schedule-details { padding: 30px; flex: 1; }
.schedule-details h3 { margin-bottom: 10px; }
.schedule-details p { margin-bottom: 0; }

/* Visitor Box */
.visitor-box {
  background: linear-gradient(135deg, rgba(200,145,58,0.08), rgba(200,145,58,0.03));
  border: 2px solid rgba(200,145,58,0.2); border-radius: var(--radius);
  padding: 40px; margin-top: 50px;
}
.visitor-box h3 { color: var(--secondary); margin-bottom: 16px; }
.visitor-box ul { padding-left: 0; }
.visitor-box li {
  padding: 8px 0 8px 28px; position: relative;
  color: var(--text-secondary); font-size: 1.02rem;
}
.visitor-box li::before {
  content: '✓'; position: absolute; left: 0; color: var(--secondary); font-weight: 700;
}

/* ============================================
   COMMUNITY PAGE
   ============================================ */
.program-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: center; margin-bottom: 60px;
}
.program-row.reverse { direction: rtl; }
.program-row.reverse > * { direction: ltr; }
.program-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.program-img img { width: 100%; height: 300px; object-fit: cover; }
.program-text h3 { margin-bottom: 12px; }

/* ============================================
   PRIVACY PAGE
   ============================================ */
.privacy-content { max-width: 800px; margin: 0 auto; }
.privacy-content h2 { font-size: 1.6rem; margin: 40px 0 16px; }
.privacy-content h2:first-child { margin-top: 0; }
.privacy-content p, .privacy-content li { font-size: 1rem; line-height: 1.8; }
.privacy-content ul { padding-left: 24px; margin-bottom: 16px; }
.privacy-content li { list-style: disc; margin-bottom: 6px; }

/* ============================================
   FOOTER
   ============================================ */
.pre-footer {
  background: linear-gradient(135deg, var(--secondary), #A97520);
  text-align: center; padding: 50px 24px;
}
.pre-footer blockquote {
  font-family: 'Playfair Display', serif; font-size: 1.4rem;
  color: var(--text-light); font-style: italic; max-width: 700px;
  margin: 0 auto 10px; line-height: 1.5;
}
.pre-footer cite { color: rgba(255,255,255,0.85); font-style: normal; }

.site-footer { background: var(--bg-dark); color: rgba(255,255,255,0.75); padding: 60px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand img { height: 44px; border-radius: 6px; }
.footer-brand span { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.1rem; color: var(--text-light); }
.footer-col h4 {
  color: var(--secondary); font-family: 'Inter', sans-serif;
  font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 20px; font-weight: 700;
}
.footer-col p { font-size: 0.9rem; line-height: 1.7; margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.9rem; display: block; padding: 4px 0; transition: color var(--transition); }
.footer-col a:hover { color: var(--secondary); padding-left: 4px; }
.footer-bottom {
  text-align: center; padding: 24px 0;
  font-size: 0.85rem; color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.6); text-decoration: underline; }
.footer-bottom a:hover { color: var(--secondary); }

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-left {
  opacity: 0; transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-left.visible { opacity: 1; transform: translateX(0); }
.fade-in-right {
  opacity: 0; transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-right.visible { opacity: 1; transform: translateX(0); }

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content > * { animation: heroFadeIn 0.8s ease forwards; opacity: 0; }
.hero-content > *:nth-child(1) { animation-delay: 0.2s; }
.hero-content > *:nth-child(2) { animation-delay: 0.4s; }
.hero-content > *:nth-child(3) { animation-delay: 0.6s; }
.hero-content > *:nth-child(4) { animation-delay: 0.8s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .grid-2, .grid-3, .program-row { grid-template-columns: 1fr; }
  .program-row.reverse { direction: ltr; }
  .hero { min-height: 60vh; }
  .hero-home { min-height: 75vh; }
  .section { padding: 60px 0; }
  .stat-number { font-size: 2.4rem; }
  .schedule-card { flex-direction: column; }
  .schedule-time { min-width: unset; padding: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .service-grid { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-content .btn { display: block; margin: 8px auto; max-width: 240px; }
  .card-img { height: 180px; }
}
