/* ============================================================
   Parroquia de La Zarza — estampa devocional
   Azul mariano + oro de retablo sobre pergamino.
   Motivos (copos de nieve por "las Nieves" + cruces) en SVG,
   muy sutiles, para no restar legibilidad a las personas mayores.
   ============================================================ */

:root {
  --azul: #1b3b6f;
  --azul-osc: #142c54;
  --oro: #b88a2a;
  --oro-claro: #d9b65a;
  --crema: #f5efe1;
  --crema-card: #fffdf6;
  --tinta: #261f15;
  --linea: #e6dcc2;
  --verde-wa: #1faa52;
}

* { box-sizing: border-box; }
/* Raíz a 18px: todas las medidas en rem crecen ~12% (letra más grande para mayores) */
html { -webkit-text-size-adjust: 100%; font-size: 18px; }

body {
  margin: 0;
  font-family: "Spectral", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.4; /* antes 1.6: menos huecos vacíos entre líneas */
  color: var(--tinta);
  background: var(--crema);
}

/* Filigrana de fondo: copos de nieve y cruces, casi transparente */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--crema);
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'><g stroke='%231b3b6f' stroke-width='1.3' stroke-linecap='round' stroke-opacity='0.42'><line x1='60' y1='35' x2='60' y2='75'/><line x1='42.7' y1='45' x2='77.3' y2='65'/><line x1='42.7' y1='65' x2='77.3' y2='45'/><line x1='180' y1='165' x2='180' y2='205'/><line x1='162.7' y1='175' x2='197.3' y2='195'/><line x1='162.7' y1='195' x2='197.3' y2='175'/><line x1='175' y1='54' x2='175' y2='86'/><line x1='164' y1='66' x2='186' y2='66'/><line x1='55' y1='159' x2='55' y2='191'/><line x1='44' y1='171' x2='66' y2='171'/><line x1='120' y1='119' x2='120' y2='131'/><line x1='114' y1='125' x2='126' y2='125'/></g></svg>");
  background-size: 220px 220px;
  opacity: 0.5;
}

.contenedor { max-width: 640px; margin: 0 auto; padding: 22px 18px 40px; }

/* ---------------- CABECERA (estampa) ---------------- */
.masthead {
  position: relative;
  overflow: hidden;
  text-align: center;
  color: #f3ead2;
  padding: 40px 22px 48px;
  background: radial-gradient(130% 120% at 50% -20%, #34609b 0%, var(--azul) 55%, var(--azul-osc) 100%);
  border-bottom: 3px solid var(--oro);
  box-shadow: 0 6px 24px rgba(20, 44, 84, .25);
}
/* Copos dorados muy tenues dentro de la cabecera */
.masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'><g stroke='%23e6c878' stroke-width='1.1' stroke-linecap='round' stroke-opacity='0.5'><line x1='40' y1='28' x2='40' y2='62'/><line x1='25.3' y1='37' x2='54.7' y2='53'/><line x1='25.3' y1='53' x2='54.7' y2='37'/><line x1='110' y1='100' x2='110' y2='128'/><line x1='98' y1='108' x2='122' y2='120'/><line x1='98' y1='120' x2='122' y2='108'/><line x1='110' y1='42' x2='110' y2='54'/><line x1='104' y1='48' x2='116' y2='48'/></g></svg>");
  background-size: 150px 150px;
  opacity: .35;
}
.masthead > * { position: relative; z-index: 1; }

.kicker {
  margin: 0 0 6px;
  font-size: .82rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--oro-claro);
  font-weight: 600;
  animation: surgir .7s ease both;
}
.lugar {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(3.2rem, 16vw, 4.6rem);
  line-height: .95;
  letter-spacing: .02em;
  color: #fbf4dd;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
  animation: surgir .7s ease .08s both;
}
.provincia {
  margin: 4px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--oro-claro);
  animation: surgir .7s ease .16s both;
}
.ornamento {
  margin: 14px 0 12px;
  color: var(--oro-claro);
  font-size: 1.15rem;
  letter-spacing: .8em;
  padding-left: .8em;
  animation: surgir .7s ease .24s both;
}
.ornamento .estrella { color: #fbf4dd; }
.patrona {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.25rem;
  color: #e9ddbf;
  animation: surgir .7s ease .32s both;
}
.patrona strong {
  display: block;
  font-style: normal;
  font-size: 1.7rem;
  font-weight: 600;
  color: #fbf4dd;
  letter-spacing: .01em;
  margin-top: 2px;
}

@keyframes surgir {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .kicker, .lugar, .provincia, .ornamento, .patrona { animation: none; }
}

/* ---------------- BLOQUES DE IGLESIA ---------------- */
.iglesia-bloque {
  background: var(--crema-card);
  border: 1px solid var(--linea);
  border-radius: 16px;
  padding: 18px 20px 10px;
  margin: 16px 0;
  box-shadow: 0 6px 22px rgba(27, 59, 111, .08);
}
.iglesia-bloque h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 2.15rem;
  color: var(--azul);
  text-align: center;
  margin: 2px 0 0;
  line-height: 1.1;
}
.iglesia-bloque h2::after {
  content: "✦";
  display: block;
  color: var(--oro);
  font-size: .9rem;
  margin: 4px 0 10px;
}

/* San Martín — pergamino cálido, acento dorado */
.iglesia-bloque[data-clave="san-martin"] {
  background: linear-gradient(180deg, #fffdf6, #fbf4e6);
  border-top: 5px solid var(--oro);
}
/* Ermita de la Virgen de las Nieves — tono nevado, más frío */
.iglesia-bloque[data-clave="virgen-de-las-nieves"] {
  background: linear-gradient(180deg, #f7fbff, #eaf2fb);
  border-top: 5px solid #6f93c4;
}
.iglesia-bloque[data-clave="virgen-de-las-nieves"] h2 { color: #234b86; }
.iglesia-bloque[data-clave="virgen-de-las-nieves"] h2::after {
  content: "❉";
  color: #5b7fb3;
}

h1, h2 { font-family: "Cormorant Garamond", serif; }
.bloque-titulo {
  font-size: 2rem;
  color: var(--azul);
  text-align: center;
  margin: 30px 0 .3em;
}

/* Etiquetas de sección (Avisos / Horarios de misa) */
.sub {
  font-family: "Spectral", serif;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--oro);
  margin: 14px 0 5px;
}

/* Avisos de la semana — el corazón de la web */
.aviso {
  background: #fdf6e3;
  border: 1px solid #e8d9ad;
  border-left: 5px solid var(--oro);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 1.5rem;
  line-height: 1.35;
  white-space: pre-wrap;
  color: var(--tinta);
}
.aviso.info {
  background: #eef3fb;
  border-color: #cfdaee;
  border-left-color: var(--azul);
}

/* Horarios */
.horario {
  font-size: 1.55rem;
  padding: 11px 2px;
  border-bottom: 1px solid var(--linea);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.horario > span:first-child::before {
  content: "✚";
  color: var(--oro);
  font-size: .8em;
  margin-right: .55em;
  vertical-align: 1px;
}
.estado {
  background: linear-gradient(180deg, var(--oro-claro), var(--oro));
  color: #3a2c07;
  font-size: 1.12rem;
  font-weight: 700;
  padding: 5px 15px;
  border-radius: 20px;
  white-space: nowrap;
}
.estado.cancel { background: #b3261e; color: #fff; }

/* ---------------- BOTONES ---------------- */
.boton {
  display: block;
  width: 100%;
  padding: 20px;
  margin: 16px 0;
  font-family: "Spectral", serif;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(180deg, #21477f, var(--azul));
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(27, 59, 111, .18);
}
.boton.secundario { background: #6b6256; box-shadow: none; }
.boton.whatsapp {
  background: linear-gradient(180deg, #2ec469, var(--verde-wa));
  color: #fff;
  margin-top: 26px;
}
.boton.editar {
  background: transparent;
  color: #8a8170;
  font-weight: 400;
  font-size: 1rem;
  padding: 12px;
  margin-top: 30px;
  border: 1px dashed #c8bfa8;
  box-shadow: none;
}
.boton.mini {
  font-size: 1.05rem;
  padding: 10px;
  background: linear-gradient(180deg, #2ec469, var(--verde-wa));
  margin: 4px 0 0;
}

/* ---------------- EDICIÓN ---------------- */
.barra-edicion {
  background: var(--azul-osc);
  color: #fff;
  padding: 7px 10px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  font-family: "Spectral", serif;
  border-bottom: 2px solid var(--oro);
}
.be-texto { display: block; font-size: .9rem; opacity: .85; margin-bottom: 5px; }
.be-acciones { display: flex; gap: 6px; justify-content: center; }
.boton.be-btn {
  width: auto;
  flex: 1;
  max-width: 200px;
  margin: 0;
  padding: 9px 10px;
  font-size: 1.05rem;
  border-radius: 10px;
  box-shadow: none;
}
.oculto { display: none; }

/* ---------------- BANNER DE FUNERAL (fino) ---------------- */
.banner-funeral {
  display: block;
  background: #2c2c2e;
  color: #f3e9d2;
  text-decoration: none;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 11px 14px;
  border-bottom: 2px solid var(--oro);
}

/* ---------------- ESQUELAS / FUNERALES ---------------- */
.esquela {
  background: #fbfaf7;
  border: 1px solid #ddd6c6;
  border-left: 6px solid #5a5a5a;
  border-radius: 10px;
  padding: 18px 18px 14px;
  margin: 14px 0;
  text-align: center;
}
.esquela-nombre {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.85rem;
  font-weight: 600;
  color: #2b2b2b;
  line-height: 1.15;
}
.esquela-nombre::before { content: "✝ "; color: #888; }
.esquela-dato { font-size: 1.4rem; color: var(--tinta); margin-top: 6px; }
.esquela-wa {
  display: inline-block;
  margin-top: 12px;
  font-size: 1.05rem;
  color: var(--verde-wa);
  text-decoration: none;
  font-weight: 700;
}
.funerales-edit { margin-bottom: 8px; }
.funeral-edit {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 14px 0;
  flex-wrap: wrap;
  border-bottom: 1px dashed #d8cfb6;
}
.funeral-edit input,
.funeral-edit select {
  font-size: 1.15rem;
  padding: 12px 10px;
  border: 2px solid var(--azul);
  border-radius: 8px;
  font-family: inherit;
  background: #fff;
}
.funeral-edit .fu-nombre { width: 100%; }
/* Día y hora con etiqueta encima (los selectores nativos del móvil son poco evidentes) */
.funeral-edit .campo {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.funeral-edit .campo-dia { flex: 1; min-width: 150px; }
.funeral-edit .campo-hora { width: 120px; }
.funeral-edit .campo input { width: 100%; }
.campo-lbl {
  font-size: 1rem;
  font-weight: 700;
  color: var(--azul);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.funeral-edit .fu-lugar-sel { width: 100%; }
.funeral-edit .fu-lugar { width: 100%; }
.funeral-edit .quitar {
  background: #b3261e;
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
  cursor: pointer;
}

textarea.aviso-input {
  width: 100%;
  font-size: 1.2rem;
  padding: 12px;
  border: 2px solid var(--azul);
  border-radius: 10px;
  font-family: inherit;
  background: #fff;
}
.horarios-edit { margin-bottom: 8px; }
.horario-edit {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 10px 0;
  flex-wrap: wrap;
  border-bottom: 1px dashed #d8cfb6;
}
.horario-edit input, .horario-edit select {
  font-size: 1.05rem;
  padding: 8px;
  border: 2px solid var(--azul);
  border-radius: 8px;
  font-family: inherit;
  background: #fff;
}
.horario-edit .hor-dia { width: 26%; }
.horario-edit .hor-hora { width: 18%; }
.horario-edit .hor-tipo { width: 100%; margin-top: 2px; }
.horario-edit .hor-detalle { width: 100%; margin-top: 2px; }
.horario-edit .quitar {
  background: #b3261e;
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------------- MENSAJE DEL PÁRROCO ---------------- */
.mensaje-card {
  background: linear-gradient(180deg, #fffdf6, #fbf4e6);
  border: 1px solid #e8d9ad;
  border-top: 5px solid var(--oro);
  border-radius: 16px;
  padding: 20px 22px 16px;
  margin: 20px 0;
  box-shadow: 0 6px 22px rgba(27, 59, 111, .08);
  text-align: center;
}
.mensaje-titulo {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 2rem;
  color: var(--azul);
  line-height: 1.1;
}
.mensaje-titulo::after {
  content: "✦";
  display: block;
  color: var(--oro);
  font-size: .9rem;
  margin: 4px 0 12px;
}
.mensaje-texto {
  font-size: 1.5rem;
  line-height: 1.4;
  white-space: pre-wrap;
  color: var(--tinta);
  text-align: left;
}
.mensaje-fecha {
  font-size: 1rem;
  color: #8a8170;
  font-style: italic;
  margin-top: 12px;
}
.mensaje-card .esquela-wa { margin-top: 10px; }

@media (min-width: 700px) {
  body { font-size: 26px; }
}
