:root {
  --bg-primary: #ffffff;
  --bg-secondary: #bae6fd; /* Celeste más marcado (Sky 200) para degradados visibles */
  --bg-accent: #7dd3fc; /* Celeste aún más marcado (Sky 300) */
  --text-main: #0f172a; /* Slate oscuro para lectura óptima */
  --text-muted: #475569;
  --text-white: #ffffff;
  --blue-primary: #0284c7; /* Celeste / azul cielo de la iglesia */
  --blue-hover: #0369a1;
  --blue-light: #7dd3fc;
  --line-color: rgba(14, 165, 233, 0.28);
  --shadow-sm: 0 4px 6px -1px rgba(2, 132, 199, 0.08), 0 2px 4px -1px rgba(2, 132, 199, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(2, 132, 199, 0.12), 0 8px 10px -6px rgba(2, 132, 199, 0.12);
  --shadow-lg: 0 20px 40px -10px rgba(2, 132, 199, 0.18);
  --radius-lg: 16px;
  --radius-md: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-primary); /* Fondo blanco en el cuerpo para mantener la limpieza */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Tipografía */
h1, h2, h3, h4 {
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
}

.bebas-font {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

p {
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 200ms ease;
}

/* Utilidades */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 6rem 0;
}

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

.section-gray {
  background: linear-gradient(180deg, #ffffff 0%, rgba(2, 132, 199, 0.26) 100%); /* Degradado desde blanco al tono de la hora translúcido */
}

.section-celeste {
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.15) 0%, rgba(2, 132, 199, 0.35) 100%);
}

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

.eyebrow {
  color: var(--blue-primary);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  font-weight: 800;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 3rem;
  color: var(--text-main);
}

/* Botones al estilo Casa de Dios */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: 0;
  cursor: pointer;
  transition: all 200ms ease;
}

.btn-primary {
  color: var(--text-white);
  background-color: var(--blue-primary);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.2);
}

.btn-primary:hover {
  background-color: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.3);
}

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

.btn-secondary:hover {
  color: var(--text-white);
  background-color: var(--blue-primary);
  transform: translateY(-1px);
}

.btn-white {
  color: var(--blue-primary);
  background-color: var(--text-white);
  box-shadow: var(--shadow-sm);
}

.btn-white:hover {
  background-color: var(--bg-accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-color);
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blue-light);
}

.brand-text strong {
  font-size: 1.1rem;
  color: var(--blue-primary);
  font-weight: 800;
}

.brand-text small {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav a {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
}

.site-nav a:hover {
  color: var(--blue-primary);
  background-color: var(--bg-secondary);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: 
    linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.65)),
    url("FONDO.webp") center center / cover no-repeat;
  color: var(--text-white);
  padding: 4rem 0;
}

.hero-content {
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
}

.hero-content h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  color: var(--text-white);
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Nosotros Section (Bloque Alterno) */
.about-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.about-img-wrap {
  position: relative;
}

.about-img-wrap img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  object-position: center top;
  aspect-ratio: 4 / 3;
}

.about-info h2 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.about-info p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.about-quote {
  border-left: 4px solid var(--blue-primary);
  padding-left: 1.25rem;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-main);
}

.pastor-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pastor-badge-img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blue-primary);
}

.pastor-badge-info strong {
  display: block;
  font-size: 1.05rem;
  color: var(--text-main);
}

.pastor-badge-info span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Horarios y Ubicación Section */
.schedule-block {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: start;
}

.schedule-list {
  display: grid;
  gap: 1.5rem;
}

.schedule-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  border: 1px solid var(--line-color);
  box-shadow: var(--shadow-sm);
  transition: all 300ms ease;
}

.schedule-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-light);
}

.schedule-card-time {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--blue-primary);
  margin: 0.5rem 0;
}

.schedule-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.map-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  border: 1px solid var(--line-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: all 300ms ease;
}

.map-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue-light);
}

.map-container {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-color);
  aspect-ratio: 16 / 10;
}

/* Novedades Grid (Estilo Casa de Dios: Sin bordes marcados) */
.updates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.update-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 300ms ease;
  border: 1px solid var(--line-color);
  display: flex;
  flex-direction: column;
}

.update-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.update-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.update-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.update-card:hover .update-image {
  transform: scale(1.04);
}

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

.update-card-body h3 {
  font-size: 1.2rem;
  margin: 0.75rem 0;
  color: var(--text-main);
  line-height: 1.3;
}

.update-card-body p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.update-link {
  margin-top: auto;
  align-self: flex-start;
}

.update-card-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
}

/* Reels Carousel */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.carousel-container {
  overflow: hidden;
  padding: 1.5rem 0.5rem;
  width: 100%;
}

.reels-slider {
  display: flex;
  gap: 2rem;
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.reels-slider .reel-card {
  flex: 0 0 calc(33.333% - 1.333rem);
  max-width: calc(33.333% - 1.333rem);
}

.reel-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-color);
  display: flex;
  justify-content: center;
  transition: box-shadow 300ms ease;
}

.reel-card:hover {
  box-shadow: var(--shadow-md);
}

.reel-card iframe {
  width: 100%;
  max-width: 267px;
  border-radius: 12px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background-color: var(--bg-primary);
  border: 1px solid var(--line-color);
  color: var(--blue-primary);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all 200ms ease;
}

.carousel-btn:hover {
  background-color: var(--blue-primary);
  color: var(--text-white);
  border-color: var(--blue-primary);
  transform: translateY(-50%) scale(1.05);
}

.carousel-btn.btn-left {
  left: -1.75rem;
}

.carousel-btn.btn-right {
  right: -1.75rem;
}

/* Ofrendas / Generosidad Section (Estilo Casa de Dios) */
.giving-block {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.giving-content h2 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin-bottom: 1.5rem;
}

.giving-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.giving-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

.giving-method-item {
  background-color: var(--bg-primary);
  border: 1px solid var(--line-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.giving-method-icon {
  background-color: var(--bg-accent);
  color: var(--blue-primary);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.giving-method-details strong {
  display: block;
  font-size: 1rem;
}

.giving-method-details span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.giving-banner-card {
  background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-hover) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  color: var(--text-white);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.giving-banner-card h3 {
  color: var(--text-white);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.giving-banner-card p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Contact / Call to action Section */
.contact-banner {
  background: 
    linear-gradient(rgba(2, 132, 199, 0.88), rgba(3, 105, 161, 0.95)),
    url("FONDO.webp") center center / cover no-repeat;
  color: var(--text-white);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  box-shadow: var(--shadow-lg);
}

.contact-banner-text {
  max-width: 44rem;
}

.contact-banner-text h2 {
  color: var(--text-white);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 1rem;
}

.contact-banner-text p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
}

.contact-number-label {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--blue-light);
}

/* Footer */
.site-footer {
  background: linear-gradient(135deg, #0f172a 0%, #0284c7 100%);
  color: rgba(255, 255, 255, 0.75);
  padding: 4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--text-white);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  transition: all 200ms ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-btn:hover {
  background-color: var(--text-white);
  color: var(--blue-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-footer strong {
  font-size: 1.15rem;
  color: var(--text-white);
}

.site-footer p {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--blue-light);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 250ms ease;
}

.modal-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalFadeIn 300ms ease;
  border: 1px solid var(--line-color);
}

@keyframes modalFadeIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--line-color);
  color: var(--text-main);
  font-size: 1.5rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 200ms ease;
}

.modal-close:hover {
  background-color: var(--blue-primary);
  color: var(--text-white);
  border-color: var(--blue-primary);
}

.modal-body-content {
  padding: 2.5rem;
}

.modal-body-content .modal-media {
  margin-bottom: 1.5rem;
}

.modal-body-content .modal-media img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
}

.modal-body-content .modal-media iframe {
  width: 100%;
  min-height: 380px;
  border: 0;
  border-radius: var(--radius-md);
}

.modal-body-content h2 {
  font-size: 1.75rem;
  margin: 1rem 0;
  color: var(--text-main);
}

.modal-body-content p {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1rem;
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
}

/* Admin Panel layout match */
.admin-body {
  background-color: var(--bg-secondary);
}

.admin-shell {
  display: grid;
  gap: 2rem;
}

.admin-card {
  background-color: var(--bg-primary);
  padding: 3rem 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-color);
  box-shadow: var(--shadow-sm);
}

.admin-form {
  display: grid;
  gap: 1.25rem;
}

.admin-form label {
  display: grid;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  border: 1px solid var(--line-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-primary);
  color: var(--text-main);
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 200ms ease;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  border-color: var(--blue-primary);
}

.admin-posts {
  display: grid;
  gap: 1.25rem;
}

.admin-post-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
  border: 1px solid var(--line-color);
}

.admin-post-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.admin-post-copy h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.admin-post-copy p {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.admin-delete-button {
  background-color: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.admin-delete-button:hover {
  background-color: #ef4444;
  color: var(--text-white);
  border-color: #ef4444;
}

.is-hidden {
  display: none !important;
}

/* Responsividad */
@media (max-width: 1024px) {
  .about-block,
  .schedule-block {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .giving-block {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .reels-slider .reel-card {
    flex: 0 0 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }

  .updates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section-padding {
    padding: 4rem 0;
  }

  .site-header {
    position: static;
  }

  .header-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

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

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

  .contact-banner {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 3rem 1.5rem;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .admin-post-card {
    grid-template-columns: 1fr;
    text-align: center;
    place-items: center;
  }
}

@media (max-width: 640px) {
  .reels-slider .reel-card {
    flex: 0 0 100%;
    max-width: 100%;
  }

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