/* Sitio público ICTUE Lo Espejo.
   Portado del prototipo aprobado (prototipo/style.css): mismos colores, tipografía
   y componentes. Cambios respecto al prototipo: las fuentes se cargan desde la
   plantilla (no con @import), el logo es una imagen, el menú móvil usa una clase
   en vez de estilos inline, y se agregan estados vacíos, formularios reales,
   imágenes subidas y videos incrustados. El color de marca llega por --color-primary. */

:root {
  --color-primary: #E1261C;
  --color-primary-dark: color-mix(in srgb, var(--color-primary) 80%, #000);
  --color-primary-light: color-mix(in srgb, var(--color-primary) 12%, #fff);

  --color-text-main: #111827;
  --color-text-muted: #4B5563;
  --color-bg-body: #ffffff;
  --color-bg-subtle: #f9fafb;
  --color-bg-dark: #111827;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-manuscrita: 'Caveat', cursive;

  --max-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background-color: var(--color-bg-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
img { max-width: 100%; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.2; font-weight: 800; }

.container { width: 90%; max-width: var(--max-width); margin: 0 auto; }
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-text-muted); }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.seccion-pie { margin-top: 40px; }
.grid-centrada { max-width: 1000px; margin: 0 auto; }
.titulo-bloque { font-size: 24px; margin-bottom: 16px; }

.saltar { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 16px; z-index: 100; }
.saltar:focus { left: 16px; }
.visualmente-oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.honeypot { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* ---------- Header ---------- */

header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; position: relative; }
.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; display: block; }

nav { display: flex; gap: 24px; align-items: center; }
nav a { font-weight: 600; font-size: 15px; color: var(--color-text-muted); }
nav a.activo { color: var(--color-primary); }
nav a:not(.btn):hover { color: var(--color-primary); }
/* El botón Donaciones vive dentro del <nav>: sin esta regla hereda el hover
   rojo de arriba y el texto desaparece sobre su propio fondo rojo. */
nav a.btn-primary, nav a.btn-primary:hover { color: #fff; }
.btn-nav { padding: 10px 20px; }

.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; line-height: 1; }

@media (max-width: 900px) {
  nav { display: none; }
  nav.abierto {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    gap: 16px;
  }
  nav.abierto a { font-size: 17px; }
  nav.abierto .btn { justify-content: center; }
  .mobile-menu-btn { display: block; }
}

/* ---------- Botones ---------- */

.btn {
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 4px 12px rgba(225, 38, 28, 0.25); }
.btn-primary:hover { transform: translateY(-2px); color: #fff; }
.btn-white { background: #fff; color: var(--color-primary); box-shadow: var(--shadow-md); }
.btn-white:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.btn-outline-white { border: 2px solid rgba(255,255,255,0.8); color: #fff; background: transparent; }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); }
.btn-outline-primary { border: 2px solid var(--color-primary); color: var(--color-primary); background: transparent; }
.btn-outline-primary:hover { background: var(--color-primary-light); }
.btn-chico { padding: 8px 18px; font-size: 14px; }
.btn-ancho { width: 100%; }

/* ---------- Secciones ---------- */

section { padding: 80px 0; }
.section-alt { background: var(--color-bg-subtle); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: clamp(28px, 4vw, 36px); color: var(--color-text-main); margin-bottom: 12px; }
.section-header p { color: var(--color-text-muted); font-size: 18px; max-width: 600px; margin: 0 auto; }

.page-header {
  background: linear-gradient(135deg, var(--color-bg-dark), #1f2937);
  color: white;
  padding: 80px 0 60px;
  text-align: center;
}
.page-header h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 16px; }
.page-header p { font-size: 18px; opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* Estado vacío: cuando una sección todavía no tiene contenido cargado. */
.vacio {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
  background: var(--color-bg-subtle);
  border: 1px dashed rgba(0,0,0,0.12);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
}
.vacio span { display: block; font-size: 36px; margin-bottom: 8px; }
.vacio p { font-size: 16px; }
.vacio-chico { padding: 24px 16px; margin-bottom: 16px; }
.nota-pie { max-width: 700px; margin: 40px auto 0; text-align: center; color: var(--color-text-muted); font-size: 15px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  padding: 100px 0 120px;
  text-align: center;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
  pointer-events: none;
}
.hero-con-imagen { background-size: cover; background-position: center; }
.hero-con-imagen::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.35)); }
.hero-con-imagen::after { display: none; }
.hero-content { position: relative; z-index: 10; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); margin-bottom: 24px; letter-spacing: -1px; }
.hero-manuscrito { font-family: var(--font-manuscrita); font-size: 1.2em; font-weight: 700; letter-spacing: 0; }
.hero p { font-size: clamp(16px, 2vw, 20px); opacity: 0.95; max-width: 640px; margin: 0 auto 32px; font-weight: 400; }
.hero-botones { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Grillas ---------- */

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }

/* ---------- Horarios ---------- */

.card-horario {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--color-primary);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-horario:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-horario-suave { opacity: 0.85; }
.card-horario .dia { font-weight: 800; font-size: 18px; margin-bottom: 8px; font-family: var(--font-heading); }
.card-horario .hora { font-size: 28px; font-weight: 800; color: var(--color-primary); font-family: var(--font-heading); }
.card-horario .detalle { font-size: 14px; color: var(--color-text-muted); margin-top: 8px; }
.card-horario .modalidad { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: var(--radius-full); background: var(--color-primary-light); color: var(--color-primary); font-size: 12px; font-weight: 700; }

/* ---------- Eventos ---------- */

.card-evento {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #fff;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.card-evento:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.card-evento .img {
  height: 180px;
  background: var(--color-bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-evento .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-evento .img-vacia { font-size: 40px; opacity: 0.4; }
.card-evento .img:has(.img-vacia)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.02), rgba(0,0,0,0.02) 10px, transparent 10px, transparent 20px);
}
.card-evento .info { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card-evento .fecha { color: var(--color-primary); font-weight: 700; font-size: 13px; margin-bottom: 8px; letter-spacing: 0.5px; }
.card-evento h3 { font-size: 18px; margin-bottom: 8px; }
.card-evento p { font-size: 14px; color: var(--color-text-muted); margin-bottom: 12px; }
.card-evento .descripcion { font-size: 14px; color: var(--color-text-muted); margin-bottom: 12px; flex: 1; }
.card-evento .descripcion p { margin-bottom: 8px; }
.card-evento-acciones { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.card-evento-acciones .link-red { margin-top: 0; }

/* ---------- Noticias ---------- */

.card-noticia { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.card-noticia img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.card-noticia .info { padding: 24px; }
.card-noticia .fecha { color: var(--color-primary); font-weight: 700; font-size: 13px; margin-bottom: 8px; text-transform: uppercase; }
.card-noticia h3 { font-size: 18px; margin-bottom: 8px; }
.card-noticia p { font-size: 14px; color: var(--color-text-muted); margin-bottom: 8px; }

/* ---------- Pastores ---------- */

.pastores { background: var(--color-bg-subtle); padding: 40px; border-radius: var(--radius-lg); text-align: center; margin-top: 24px; max-width: 640px; margin-left: auto; margin-right: auto; }
.pastores-foto { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; display: block; }
.pastores-foto-vacia { background: #d1d5db; }
.pastores h4 { font-size: 20px; margin-bottom: 4px; }
.pastores-bio { margin-top: 16px; text-align: left; font-size: 15px; }
.pastores-bio p { margin-bottom: 12px; }

/* ---------- Ministerios ---------- */

.card-min {
  background: var(--color-bg-dark);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  font-family: var(--font-heading);
  transition: transform 0.2s, background 0.2s;
  display: block;
}
.card-min:hover { transform: translateY(-4px); background: #1f2937; }
.card-min small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 13px; opacity: 0.7; margin-top: 8px; }
.card-min-detalle img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-md); margin-bottom: 16px; }
.card-min-texto { font-family: var(--font-body); font-weight: 400; font-size: 14px; opacity: 0.85; margin-top: 16px; text-align: left; }
.card-min-texto p { margin-bottom: 8px; }

/* ---------- Redes y videos ---------- */

.bloque-red { background: #fff; border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.bloque-red h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; font-size: 20px; }
.bloque-video h3 { margin: 16px 0 0; font-size: 18px; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ig-post { aspect-ratio: 1; background: var(--color-bg-subtle); border-radius: var(--radius-sm); position: relative; overflow: hidden; display: block; }
.ig-post img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.ig-post:hover img { transform: scale(1.05); }
.ig-post-texto { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 8px; text-align: center; font-size: 13px; font-weight: 700; color: var(--color-primary); background: var(--color-primary-light); }
.ig-post-texto small { font-weight: 500; color: var(--color-text-muted); font-size: 11px; margin-top: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.video { position: relative; aspect-ratio: 16 / 9; background: var(--color-bg-dark); border-radius: var(--radius-md); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-titulo { margin-top: 12px; font-weight: 600; }
.enlaces-red { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.link-red { display: inline-block; margin-top: 20px; font-size: 15px; font-weight: 600; color: var(--color-primary); }
.link-red:hover { color: var(--color-primary-dark); }

/* ---------- Formularios ---------- */

.wsp { background: var(--color-bg-dark); color: #fff; }
.wsp .section-header h2 { color: #fff; }
.wsp .wsp-bajada { color: #9ca3af; }
.wsp-form, .contact-form { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.contact-form { max-width: 600px; }
input, textarea, select {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,0.1);
  font-size: 15px;
  font-family: var(--font-body);
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
  color: var(--color-text-main);
}
.wsp-form input { border: none; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.campo-publico { display: block; }
.campo-publico.con-error input, .campo-publico.con-error textarea { border-color: var(--color-primary); }
.error-publico { display: block; margin-top: 6px; font-size: 13px; font-style: normal; font-weight: 600; color: var(--color-primary); }
.checkbox-label { font-size: 13px; opacity: 0.85; text-align: left; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.checkbox-label input { width: auto; margin-top: 4px; }
.aviso-formulario { max-width: 600px; margin: 0 auto 24px; padding: 16px 20px; border-radius: var(--radius-md); font-weight: 600; }
.aviso-ok { background: #e6f4ea; color: #1a7f37; border: 1px solid #b7e0c3; }
.aviso-error { background: #fdecea; color: #b42318; border: 1px solid #f3c1bb; }
.gracias { text-align: center; padding: 40px 24px; }
.gracias p { font-size: 18px; margin-bottom: 24px; }
.wsp .aviso-ok { text-align: center; font-size: 17px; }

/* ---------- Filtro de eventos ---------- */

.filtro-eventos { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.filtro-rapido { display: flex; gap: 8px; }
.filtro-rapido a { padding: 8px 18px; border-radius: var(--radius-full); border: 1px solid rgba(0,0,0,0.1); font-weight: 600; font-size: 14px; color: var(--color-text-muted); }
.filtro-rapido a.activo { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.filtro-fechas { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.filtro-fechas label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--color-text-muted); }
.filtro-fechas input { padding: 10px 12px; width: auto; }

/* ---------- Ofrendas ---------- */

.donaciones-box {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.05);
}
.donaciones-box h2 { font-size: 24px; margin-bottom: 8px; }
.donaciones-box .datos { background: var(--color-bg-subtle); border-radius: var(--radius-md); padding: 24px; margin-top: 24px; font-size: 15px; text-align: left; line-height: 2; }
.donaciones-box .datos div { display: flex; flex-wrap: wrap; gap: 6px; }
.donaciones-box .datos dt { color: var(--color-text-muted); }
.donaciones-box .datos dd { margin: 0; word-break: break-all; }

/* ---------- Solicitudes (tarjetas de la portada) ---------- */

.card-sol {
  border: 2px solid var(--color-bg-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
}
.card-sol:hover { border-color: var(--color-primary-light); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card-sol h4 { margin-bottom: 12px; font-size: 20px; }
.card-sol p { font-size: 14px; color: var(--color-text-muted); margin-bottom: 24px; }
.card-sol .btn { margin-top: auto; }

/* ---------- Contacto ---------- */

.mapa { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(0,0,0,0.05); margin: 16px 0 24px; background: var(--color-bg-subtle); }
.mapa iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Footer ---------- */

footer { background: var(--color-bg-dark); color: #9ca3af; padding: 60px 0 24px; font-size: 14px; }
.footer-grid h5 { color: #fff; margin-bottom: 20px; font-size: 16px; }
.footer-grid a { display: block; margin-bottom: 12px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; margin-top: 40px; font-size: 13px; }

/* ---------- Texto largo ---------- */

.text-content { max-width: 800px; margin: 0 auto; font-size: 16px; }
.text-content p { margin-bottom: 20px; }
.text-content h2 { font-size: 28px; margin-bottom: 16px; }
.text-content h3 { margin-top: 40px; margin-bottom: 16px; font-size: 24px; }

/* ---------- Celular ---------- */

@media (max-width: 640px) {
  section { padding: 56px 0; }
  .hero { padding: 72px 0 84px; }
  .page-header { padding: 56px 0 44px; }
  .section-header { margin-bottom: 32px; }
  .bloque-red, .donaciones-box, .pastores { padding: 24px; }
  .grid-2, .grid-3, .grid-4 { gap: 16px; }
  .filtro-eventos { flex-direction: column; align-items: stretch; }
  .filtro-fechas { justify-content: space-between; }
  .filtro-fechas label { flex: 1 1 40%; }
  .filtro-fechas .btn { flex: 1 1 100%; }
}
