/* =========================================================
   Santoral de América Latina
   Sistema visual inspirado en el de desdelafe.mx:
   azul marino de cabecera, azul medio para bandas de sección,
   naranja para antetítulos, tarjetas blancas sobre fondo gris.
   ========================================================= */

:root {
  --azul-noche: #013960;
  --azul: #0066ad;
  --azul-claro: #3c9adb;
  --naranja: #f26e22;
  --naranja-oscuro: #d85c14;
  --gris-fondo: #f6f6f6;
  --gris-borde: #dde0ec;
  --gris-suave: #edeff5;
  --texto: #212529;
  --texto-tenue: #838391;
  --blanco: #ffffff;
  --titulo: "Baloo Thambi 2", "Trebuchet MS", system-ui, sans-serif;
  --texto-ff: "Roboto", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --sombra-sm: 0 1px 4px rgba(19, 33, 66, .10);
  --sombra-md: 0 6px 18px rgba(19, 33, 66, .14);
  --ancho: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--gris-fondo);
  color: var(--texto);
  font-family: var(--texto-ff);
  font-size: 16px;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: var(--azul); text-decoration: none; }
a:hover { color: var(--naranja); }

.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 16px; }

/* ---------- Barra superior ---------- */
.barra-superior {
  background: var(--azul-noche);
  color: rgba(255, 255, 255, .75);
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.barra-superior .contenedor {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 42px; flex-wrap: wrap;
}
.barra-superior .fecha { letter-spacing: .3px; }
.pastilla {
  display: inline-block; background: rgba(255, 255, 255, .12);
  color: #fff; border-radius: 999px; padding: 4px 14px;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
}

/* ---------- Cabecera ---------- */
.cabecera { background: var(--azul-noche); color: #fff; padding: 18px 0 14px; text-align: center; }
.logo { font-family: var(--titulo); font-weight: 800; line-height: .95; letter-spacing: -.5px; }
.logo .linea1 { display: block; font-size: clamp(26px, 4.6vw, 44px); }
.logo .linea2 {
  display: block; font-size: clamp(15px, 2vw, 21px); font-weight: 600;
  letter-spacing: 6px; text-transform: uppercase; color: rgba(255, 255, 255, .8);
  margin-top: 4px;
}
.logo-raya { width: 76px; height: 5px; background: var(--naranja); border-radius: 3px; margin: 12px auto 0; }
.cabecera .lema {
  margin: 14px auto 0; max-width: 620px; font-size: 14px;
  color: rgba(255, 255, 255, .72);
}

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--azul-noche);
  border-top: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 2px 10px rgba(1, 57, 96, .25);
}
.nav .contenedor { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; min-height: 56px; }
.nav a {
  color: rgba(255, 255, 255, .92); font-size: 15px; padding: 10px 14px;
  border-radius: 4px; white-space: nowrap;
}
.nav a:hover, .nav a:focus-visible { background: rgba(255, 255, 255, .10); color: #fff; }
.nav a .mas { color: var(--naranja); font-weight: 700; margin-left: 4px; }

/* ---------- Destacado (santo del día) ---------- */
.destacado { padding: 34px 0 10px; }
.destacado-caja {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: var(--sombra-md); display: grid; grid-template-columns: 1.05fr 1fr;
}
.destacado-foto { position: relative; background: var(--gris-suave); min-height: 340px; max-height: 520px; }
.destacado-foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.cinta {
  position: absolute; top: 18px; left: 0; background: var(--naranja); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  padding: 7px 16px 7px 14px; border-radius: 0 4px 4px 0;
}
.destacado-texto { padding: 34px 38px; display: flex; flex-direction: column; justify-content: center; }
.antetitulo {
  color: var(--naranja); font-size: 12px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px;
}
.destacado-texto h2 {
  font-family: var(--titulo); font-weight: 700; color: var(--azul-noche);
  font-size: clamp(26px, 3.2vw, 38px); line-height: 1.12; margin: 0 0 6px;
}
.destacado-texto .apodo { color: var(--texto-tenue); font-style: italic; margin-bottom: 16px; }
.destacado-texto p.entrada { font-size: 17px; color: #3b4149; margin: 0 0 20px; }
.datos-linea { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 14px; color: var(--texto-tenue); margin-bottom: 22px; }
.datos-linea strong { color: var(--azul-noche); font-weight: 600; }

.boton {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  background: var(--naranja); color: #fff; border: 0; cursor: pointer;
  font-family: var(--texto-ff); font-size: 14px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 12px 22px; border-radius: 4px; transition: background .15s ease;
}
.boton:hover { background: var(--naranja-oscuro); color: #fff; }
.boton.secundario { background: var(--azul); }
.boton.secundario:hover { background: var(--azul-noche); }

/* ---------- Bandas de sección ---------- */
.banda { background: var(--azul); margin-top: 40px; }
.banda .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.banda h2 {
  margin: 0; color: #fff; font-family: var(--texto-ff); font-weight: 800;
  font-size: clamp(20px, 2.4vw, 30px); letter-spacing: 2px; text-transform: uppercase;
}
.banda p { margin: 0; color: rgba(255, 255, 255, .8); font-size: 14px; }
.banda.oscura { background: var(--azul-noche); }

/* ---------- Filtros ---------- */
.filtros { background: #fff; border-bottom: 1px solid var(--gris-borde); padding: 18px 0; }
.filtros .contenedor { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; }
.chip {
  border: 1px solid var(--gris-borde); background: #fff; color: var(--azul-noche);
  border-radius: 999px; padding: 7px 15px; font-size: 13px; font-family: var(--texto-ff);
  cursor: pointer; transition: all .15s ease; white-space: nowrap;
}
.chip:hover { border-color: var(--azul-claro); color: var(--azul); }
.chip[aria-pressed="true"] { background: var(--azul-noche); border-color: var(--azul-noche); color: #fff; }
.buscador { position: relative; flex: 0 1 300px; margin-left: auto; }
.buscador input {
  width: 100%; padding: 10px 14px 10px 38px; border: 1px solid var(--gris-borde);
  border-radius: 4px; font-family: var(--texto-ff); font-size: 14px; color: var(--texto);
}
.buscador input:focus { outline: 2px solid var(--azul-claro); outline-offset: 1px; border-color: transparent; }
.buscador svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: .45; }
.conteo { width: 100%; font-size: 13px; color: var(--texto-tenue); }

.marca {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 3px;
  background: var(--azul-noche); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase; vertical-align: 1px;
}
.marca-beato { background: var(--naranja); }

.chips-tipo { flex: 0 0 auto; }
.chips-tipo .chip { font-weight: 500; }
.chips-tipo .chip[aria-pressed="true"] { background: var(--naranja); border-color: var(--naranja); }
.nav a[data-tipo] { color: rgba(255, 255, 255, .92); }

/* ---------- Rejilla de santos ---------- */
.rejilla {
  display: grid; gap: 26px; padding: 30px 0 10px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.tarjeta {
  background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--sombra-sm);
  display: flex; flex-direction: column; text-align: left; border: 0; padding: 0;
  font-family: var(--texto-ff); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease;
}
.tarjeta:hover, .tarjeta:focus-visible { transform: translateY(-4px); box-shadow: var(--sombra-md); }
.tarjeta-foto { aspect-ratio: 4 / 3; background: var(--gris-suave); overflow: hidden; }
.tarjeta-foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform .4s ease; }
.tarjeta:hover .tarjeta-foto img { transform: scale(1.04); }
.tarjeta-cuerpo { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.tarjeta h3 {
  font-family: var(--titulo); font-weight: 600; color: var(--azul-noche);
  font-size: 19px; line-height: 1.22; margin: 0 0 8px;
}
.tarjeta .resumen { font-size: 14.5px; color: #4a5058; margin: 0 0 16px; flex: 1; }
.fiesta {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--azul-noche);
  border-top: 1px solid var(--gris-borde); padding-top: 12px; font-weight: 500;
}
.fiesta svg { flex: none; }
.enlace-falso { color: var(--azul); font-size: 13px; font-weight: 600; margin-top: 12px; }
.tarjeta:hover .enlace-falso { color: var(--naranja); }

.vacio { text-align: center; padding: 50px 0; color: var(--texto-tenue); }

/* ---------- Calendario ---------- */
.calendario { padding: 30px 0 10px; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mes { background: #fff; border-radius: 10px; box-shadow: var(--sombra-sm); overflow: hidden; }
.mes h3 {
  margin: 0; background: var(--gris-suave); color: var(--azul-noche);
  font-family: var(--texto-ff); font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; padding: 11px 18px; border-bottom: 1px solid var(--gris-borde);
}
.mes ul { list-style: none; margin: 0; padding: 8px 18px 16px; }
.mes li { padding: 7px 0; border-bottom: 1px dashed var(--gris-borde); font-size: 14px; line-height: 1.55; }
.mes li:last-child { border-bottom: 0; }
.mes .dia { display: inline-block; min-width: 26px; color: var(--naranja); font-weight: 700; }
.mes button { background: none; border: 0; padding: 0; font: inherit; color: var(--azul-noche); cursor: pointer; text-align: left; }
.mes button:hover { color: var(--naranja); text-decoration: underline; }
.mes.vacio-mes { opacity: .55; }
.mes.vacio-mes p { margin: 0; padding: 14px 18px; font-size: 13px; color: var(--texto-tenue); }

/* ---------- Ficha (modal) ---------- */
.ficha[hidden] { display: none; }
.ficha {
  position: fixed; inset: 0; z-index: 90; background: rgba(1, 25, 42, .72);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 28px 16px; overflow-y: auto;
}
.ficha-caja {
  background: #fff; border-radius: 10px; width: min(880px, 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35); overflow: hidden; position: relative;
}
.ficha-cerrar {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(1, 57, 96, .85); color: #fff; font-size: 20px; line-height: 1;
}
.ficha-cerrar:hover { background: var(--naranja); }
.ficha-foto { background: var(--azul-noche); padding: 10px 0; }
.ficha-foto img { width: 100%; height: clamp(240px, 38vh, 360px); object-fit: contain; }
.ficha-cuerpo { padding: 28px 34px 34px; }
.ficha-cuerpo h2 {
  font-family: var(--titulo); font-weight: 700; color: var(--azul-noche);
  font-size: clamp(24px, 3vw, 34px); line-height: 1.12; margin: 0 0 4px;
}
.ficha-cuerpo .apodo { color: var(--texto-tenue); font-style: italic; margin: 0 0 18px; }
.ficha-cuerpo p.parrafo { font-size: 16.5px; color: #3b4149; margin: 0 0 16px; }
.ficha-datos { list-style: none; margin: 22px 0 0; padding: 20px 0 0; border-top: 3px solid var(--gris-suave); display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.ficha-datos li { font-size: 14.5px; }
.ficha-datos .etiqueta { display: block; color: var(--naranja); font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 3px; }
.ficha-pie { margin-top: 22px; font-size: 12.5px; color: var(--texto-tenue); border-top: 1px solid var(--gris-borde); padding-top: 14px; }

/* ---------- Texto libre / créditos ---------- */
.prosa { background: #fff; border-radius: 10px; box-shadow: var(--sombra-sm); padding: 30px 34px; margin: 30px 0 10px; }
.prosa h3 { font-family: var(--titulo); color: var(--azul-noche); margin-top: 0; }
.prosa p { color: #4a5058; }
.lista-creditos { columns: 2 280px; column-gap: 34px; list-style: none; padding: 0; margin: 16px 0 0; font-size: 13px; color: var(--texto-tenue); }
.lista-creditos li { break-inside: avoid; padding: 5px 0; }
.lista-creditos strong { color: var(--azul-noche); font-weight: 600; }

/* ---------- Pie ---------- */
.pie { background: var(--azul-noche); color: rgba(255, 255, 255, .72); margin-top: 48px; padding: 38px 0 28px; font-size: 14px; }
.pie .contenedor { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.pie h4 { color: #fff; font-family: var(--titulo); font-size: 18px; margin: 0 0 10px; }
.pie a { color: rgba(255, 255, 255, .85); }
.pie a:hover { color: var(--naranja); }
.pie ul { list-style: none; padding: 0; margin: 0; }
.pie li { padding: 3px 0; }
.pie-legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 26px; padding-top: 16px; font-size: 12.5px; text-align: center; color: rgba(255, 255, 255, .55); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .destacado-caja { grid-template-columns: 1fr; }
  .destacado-foto { min-height: 240px; max-height: 340px; }
  .destacado-foto img { object-position: center 15%; }
  .destacado-texto { padding: 26px 22px 30px; }
  .ficha-cuerpo { padding: 24px 22px 28px; }
  .prosa { padding: 24px 22px; }
}
@media (max-width: 700px) {
  .chips-tipo { flex: 1 1 100%; }
  .buscador { flex: 1 1 100%; margin-left: 0; }
}
@media (max-width: 560px) {
  .nav .contenedor { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .barra-superior .contenedor { justify-content: center; gap: 6px; padding-top: 6px; padding-bottom: 6px; }
  .barra-superior #proximaFiesta { display: none; }
  .rejilla { gap: 20px; }
  .lista-creditos { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto; }
}
