/* Variables CSS */
:root {
  --primary-color: #2c5aa0;
  --secondary-color: #f4f7fc;
  --accent-color: #ff6b35;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --white: #ffffff;
  --gradient-primary: linear-gradient(135deg, #2c5aa0 0%, #1e3a8a 100%);
  --gradient-secondary: linear-gradient(135deg, #ff6b35 0%, #e55a2b 100%);
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
}

/* Reset y base */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* --- NAVBAR FIJA --- */
#navbara {
  position: fixed; top: 0; left: 0; width: 100%;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  z-index: 10000;
}

/* Compensación del header fijo */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  overflow-x: hidden;
  padding-top: 72px; /* si usas margin-top en el header, quita esta línea */
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Preloader */
#preloader {
  position: fixed; inset: 0;
  background: var(--white);
  display: flex; justify-content: center; align-items: center;
  z-index: 9999;
}
.preloader-logo { width: 100px; height: 100px; object-fit: contain; }

/* Contenedor del nav */
.nav-container {
  max-width: 1200px; margin: 0 auto;
  padding: 12px 20px; display: flex; align-items: center; justify-content: space-between;
}

/* Logo */
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { width: 40px; height: 40px; object-fit: contain; }
.nav-logo span { font-weight: 700; font-size: 1.1rem; color: var(--primary-color); }

/* Menú (desktop) */
.nav-menu { list-style: none; display: flex; gap: 2rem; }
.nav-menu a {
  text-decoration: none; color: var(--text-dark); font-weight: 600; transition: color .2s ease;
}
.nav-menu a:hover { color: var(--primary-color); }

/* Botón hamburguesa (oculto en desktop) */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hamburger span { width: 26px; height: 3px; background: #333; border-radius: 2px; }

/* --- Vista móvil --- */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-menu {
    position: absolute; top: 64px; right: 12px; left: 12px;
    background: #fff; border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    padding: 10px 0; display: none; flex-direction: column; gap: 0; overflow: hidden; z-index: 10001;
  }
  /* Necesario para que se vea el menú al activar la clase */
  .nav-menu.active { display: flex; }

  .nav-menu li { width: 100%; }
  .nav-menu a { display: block; padding: 12px 16px; color: #333; }
  .nav-menu a:active { background: #f5f7fb; }
}

/* Hero Section */
.hero-ed {
  min-height: 60vh; background: var(--gradient-primary);
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: var(--white);
  position: relative; overflow: hidden;
}
.hero-ed::before {
  content: ""; position: absolute; inset: 0;
  background: url("/placeholder.svg?height=1080&width=1920") center / cover;
  opacity: 0.1; z-index: 1;
}
.hero-content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  max-width: 1200px; margin: 0 auto; padding: 2rem; position: relative; z-index: 2; margin-top: 80px;
}
.hero-text h1 { font-size: 3.5rem; font-weight: bold; margin-bottom: 1rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
.hero-text h2 { font-size: 1.8rem; font-weight: 300; margin-bottom: 2rem; opacity: 0.9; }
.hero-subtitle {
  font-size: 1.2rem; font-style: italic; margin-bottom: 2rem; padding: 1rem;
  background: rgba(255, 255, 255, 0.1); border-radius: var(--border-radius); border-left: 4px solid var(--accent-color);
}
.hero-description p { font-size: 1.1rem; line-height: 1.8; opacity: 0.9; }
.hero-image img, .hero-image video {
  width: 100%; height: 400px; object-fit: cover; border-radius: var(--border-radius); box-shadow: var(--shadow-medium);
}

/* Secciones generales */
section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 1rem; }
.section-divider { width: 80px; height: 4px; background: var(--gradient-secondary); margin: 0 auto 2rem; border-radius: 2px; }
.section-header p { font-size: 1.1rem; color: var(--text-light); max-width: 600px; margin: 0 auto; }

/* Sección Misión */
.mission-section { background: var(--secondary-color); }
.mission-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.mission-text h3 { font-size: 2rem; color: var(--primary-color); margin-bottom: 1.5rem; }
.mission-text p { font-size: 1.1rem; line-height: 1.8; margin-bottom: 1.5rem; color: var(--text-dark); }
.mission-list { list-style: none; margin: 2rem 0; }
.mission-list li { padding: 0.8rem 0 0.8rem 2rem; position: relative; font-size: 1.1rem; }
.mission-list li::before { content: "✨"; position: absolute; left: 0; top: 0.8rem; }
.mission-quote {
  font-style: italic; font-size: 1.2rem; color: var(--primary-color); text-align: center; padding: 1.5rem;
  background: var(--white); border-radius: var(--border-radius); border-left: 4px solid var(--accent-color); box-shadow: var(--shadow-light);
}
.mission-image img { width: 100%; height: 350px; object-fit: cover; border-radius: var(--border-radius); box-shadow: var(--shadow-medium); }

/* Sección Horarios */
.schedule-section { background: var(--white); }
.schedule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.schedule-card {
  background: var(--white); border-radius: var(--border-radius); box-shadow: var(--shadow-medium);
  overflow: hidden; transition: transform .3s ease, box-shadow .3s ease;
}
.schedule-card:hover { transform: translateY(-5px); box-shadow: 0 12px 35px rgba(0,0,0,0.2); }
.schedule-header { padding: 1.5rem; color: var(--white); display: flex; justify-content: space-between; align-items: center; }
.schedule-header.sunday { background: var(--gradient-primary); }
.schedule-header.sunday-evening { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.schedule-header.wednesday { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.schedule-header.friday { background: var(--gradient-secondary); }
.schedule-header h3 { font-size: 1.3rem; font-weight: 600; }
.schedule-icon { font-size: 1.5rem; }
.schedule-content { padding: 1.5rem; }
.time-slot {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;
  padding: 0.8rem; background: var(--secondary-color); border-radius: 8px;
}
.time { font-weight: bold; color: var(--primary-color); font-size: 1.1rem; }
.service { font-size: 0.9rem; color: var(--text-dark); }
.schedule-description { font-style: italic; color: var(--text-light); text-align: center; margin-top: 1rem; }

/* Sección Grupos */
.groups-section { background: var(--secondary-color); }
.groups-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; }
.group-card { background: var(--white); border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow-medium); transition: transform .3s ease; }
.group-card:hover { transform: translateY(-5px); }
.group-image img { width: 100%; height: 200px; object-fit: cover; }
.group-content { padding: 1.5rem; }
.group-content h3 { font-size: 1.5rem; color: var(--primary-color); margin-bottom: 0.5rem; }
.age-range {
  display: inline-block; background: var(--gradient-secondary); color: var(--white);
  padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.9rem; font-weight: 500; margin-bottom: 1rem;
}
.group-content p { line-height: 1.6; margin-bottom: 1.5rem; color: var(--text-dark); }
.group-features { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.feature { background: var(--secondary-color); color: var(--primary-color); padding: 0.3rem 0.8rem; border-radius: 15px; font-size: 0.8rem; font-weight: 500; }

/* Sección Versículos */
.verses-section { background: var(--white); }
.verses-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-bottom: 4rem; }
.verse-card {
  background: var(--secondary-color); padding: 2rem; border-radius: var(--border-radius); text-align: center; box-shadow: var(--shadow-light);
  transition: transform .3s ease;
}
.verse-card:hover { transform: translateY(-3px); }
.verse-icon { font-size: 2rem; margin-bottom: 1rem; }
.verse-card blockquote { font-size: 1.1rem; line-height: 1.6; font-style: italic; color: var(--text-dark); margin-bottom: 1rem; }
.verse-card cite { font-weight: bold; color: var(--primary-color); font-size: 1rem; }

.call-to-action {
  background: var(--gradient-primary); color: var(--white); padding: 3rem; border-radius: var(--border-radius); text-align: center; box-shadow: var(--shadow-medium);
}
.call-to-action h3 { font-size: 2rem; margin-bottom: 1rem; }
.call-to-action p { font-size: 1.1rem; line-height: 1.8; margin-bottom: 2rem; opacity: 0.9; }
.contact-info p { margin-bottom: 0.5rem; }
.contact-info p:first-child { font-weight: bold; font-size: 1.2rem; }

/* Footer */
.footer { background: var(--text-dark); color: var(--white); padding: 3rem 0; text-align: center; }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.footer-logo { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.footer-logo img { width: 60px; height: 60px; object-fit: contain; }
.footer-logo h3 { font-size: 1.3rem; color: var(--white); }
.footer-text p { margin-bottom: 0.5rem; opacity: 0.8; }

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu { display: none; } /* .nav-menu.active arriba la vuelve visible */
  .hero-content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .hero-text h1 { font-size: 2.5rem; }
  .mission-content { grid-template-columns: 1fr; gap: 2rem; }
  .schedule-grid { grid-template-columns: 1fr; }
  .groups-grid { grid-template-columns: 1fr; }
  .verses-grid { grid-template-columns: 1fr; }
  .section-header h2 { font-size: 2rem; }
  .container { padding: 0 15px; }
}
@media (max-width: 480px) {
  .hero-text h1 { font-size: 2rem; }
  .hero-text h2 { font-size: 1.3rem; }
  .nav-container { padding: 1rem; }
  section { padding: 3rem 0; }
}

/* Animaciones */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.animate-on-scroll.animated { opacity: 1; transform: translateY(0); }

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
