/* ============================================================
   Fe Católica — hoja de estilos principal
   ============================================================ */

:root {
  --maroon-900: #4a0f1a;
  --maroon-800: #5c1a24;
  --maroon-700: #7a1f2b;
  --maroon-600: #8f2632;
  --gold-600: #a9821c;
  --gold-500: #c9a227;
  --gold-400: #d9b94f;
  --gold-300: #e8cf85;
  --cream-50: #faf6ee;
  --cream-100: #f3ecdd;
  --ink-900: #2b2018;
  --ink-700: #4a3b2d;
  --radius-lg: 18px;
  --radius-md: 12px;

  /* Tokens semánticos: modo claro (valores por defecto) */
  --page-bg: var(--cream-50);
  --surface: #ffffff;
  --surface-alt: var(--cream-100);
  --text-body: var(--ink-900);
  --text-soft: var(--ink-700);
  --heading-color: var(--maroon-900);
  --accent: var(--maroon-700);
  --accent-strong: var(--maroon-800);
  --border-soft: rgba(122, 31, 43, 0.08);
  --border-gold: rgba(201, 162, 39, 0.35);
  --shadow-soft: 0 10px 30px rgba(74, 15, 26, 0.12);
  --shadow-strong: 0 18px 45px rgba(74, 15, 26, 0.22);
  --objection-bg: #fbeeee;
  --objection-border: #b5555f;
  --dashed-line: rgba(122, 31, 43, 0.15);
  --love-banner-bg: linear-gradient(120deg, var(--cream-100), #fff);
  color-scheme: light;
}

/* Modo oscuro: se activa con <html data-bs-theme="dark"> */
:root[data-bs-theme="dark"] {
  --page-bg: #171010;
  --surface: #241a17;
  --surface-alt: #2c201b;
  --text-body: #f1e6d3;
  --text-soft: #d3bd98;
  --heading-color: #edd9ab;
  --accent: var(--gold-400);
  --accent-strong: var(--gold-300);
  --border-soft: rgba(216, 180, 100, 0.16);
  --border-gold: rgba(201, 162, 39, 0.3);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-strong: 0 18px 45px rgba(0, 0, 0, 0.6);
  --objection-bg: rgba(181, 85, 95, 0.16);
  --objection-border: #d98b93;
  --dashed-line: rgba(216, 180, 100, 0.2);
  --love-banner-bg: linear-gradient(120deg, #2c201b, #241a17);
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lora', Georgia, serif;
  background-color: var(--page-bg);
  color: var(--text-body);
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: 'Playfair Display', 'Times New Roman', serif;
  color: var(--heading-color);
  letter-spacing: 0.01em;
}

a {
  color: var(--accent);
}
a:hover {
  color: var(--gold-600);
}

:root[data-bs-theme="dark"] a:hover { color: var(--gold-300); }

.text-gold { color: var(--gold-500) !important; }
.text-maroon { color: var(--accent-strong) !important; }
.bg-maroon { background-color: var(--maroon-800) !important; }
.bg-cream { background-color: var(--surface-alt) !important; }

/* ---------------------------------------------------------- */
/* Navbar                                                      */
/* ---------------------------------------------------------- */
.navbar-fe {
  background: linear-gradient(180deg, var(--maroon-900), var(--maroon-800));
  transition: box-shadow .3s ease, padding .3s ease;
  padding-top: .85rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
}
.navbar-fe.scrolled {
  box-shadow: var(--shadow-strong);
  padding-top: .4rem;
  padding-bottom: .4rem;
}
.navbar-fe .navbar-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--gold-300) !important;
  font-size: 1.35rem;
}
.navbar-fe .navbar-brand i {
  color: var(--gold-400);
  margin-right: .4rem;
}
.navbar-fe .nav-link {
  color: #f1e4c9 !important;
  font-weight: 500;
  letter-spacing: .02em;
  margin: 0 .15rem;
  position: relative;
}
.navbar-fe .nav-link:hover,
.navbar-fe .nav-link.active {
  color: var(--gold-300) !important;
}
.navbar-fe .nav-link.active::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; bottom: -2px;
  height: 2px;
  background: var(--gold-400);
  border-radius: 2px;
}
.navbar-fe .dropdown-menu {
  background: var(--maroon-800);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: var(--radius-md);
}
.navbar-fe .dropdown-item {
  color: #f1e4c9;
}
.navbar-fe .dropdown-item:hover,
.navbar-fe .dropdown-item:focus {
  background: var(--maroon-700);
  color: var(--gold-300);
}
.navbar-fe .dropdown-item i { width: 1.4em; color: var(--gold-400); }

/* Menú "Temas" agrupado: títulos de grupo y, en escritorio, tres columnas. */
.navbar-fe .menu-temas .dropdown-header {
  color: var(--gold-300);
  font-family: 'Playfair Display', serif;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding-top: .6rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
  margin: 0 .75rem .25rem;
  padding-left: 0;
  padding-right: 0;
}
.navbar-fe .menu-temas .dropdown-item { white-space: normal; }
.navbar-fe .dropdown-item.active,
.navbar-fe .dropdown-item:active {
  background: var(--maroon-700);
  color: var(--gold-300);
  font-weight: 600;
}
@media (min-width: 992px) {
  /* El menú es más ancho que el espacio a la izquierda del botón: se
     alinea con el borde derecho del contenedor de la barra, no del botón. */
  .navbar-fe > .container { position: relative; }
  .navbar-fe .dropdown-temas { position: static; }
  .navbar-fe .dropdown-temas .menu-temas { right: .75rem; left: auto; }
  .navbar-fe .menu-temas.show {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(860px, calc(100vw - 2rem));
    padding: .5rem;
  }
  .navbar-fe .menu-temas .dropdown-item { font-size: .93rem; padding: .3rem .75rem; }
}

/* Enlace "Saltar al contenido": invisible hasta recibir el foco con Tab. */
.saltar-contenido {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 2000;
  padding: .5rem 1rem;
  border-radius: var(--radius-md);
  background: var(--gold-500);
  color: var(--maroon-900);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.saltar-contenido:focus { transform: none; outline: 3px solid #fff; }
#contenido { scroll-margin-top: 95px; }
#contenido:focus { outline: none; }

/* Menús largos (Temas): la barra es fija, así que lo que no cabe en la
   pantalla se perdería; se limita la altura y se desplaza por dentro.
   dvh descuenta las barras del navegador del celular (vh como respaldo). */
.navbar-fe .dropdown-menu,
.navbar-fe .navbar-collapse {
  scrollbar-width: thin;
  scrollbar-color: var(--gold-500) transparent;
  overscroll-behavior: contain;
}
@media (min-width: 992px) {
  .navbar-fe .dropdown-menu {
    max-height: calc(100vh - 90px);
    max-height: calc(100dvh - 90px);
    overflow-y: auto;
  }
}
@media (max-width: 991.98px) {
  .navbar-fe .navbar-collapse {
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
  }
}

/* Botón de cambio de tema claro/oscuro */
.theme-toggle-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  background: rgba(255,255,255,.06);
  color: var(--gold-300);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.theme-toggle-btn:hover {
  background: var(--gold-500);
  color: var(--maroon-900);
  transform: rotate(-12deg);
}
.theme-toggle-btn:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 2px;
}

/* ---------------------------------------------------------- */
/* Breadcrumbs                                                  */
/* ---------------------------------------------------------- */
.breadcrumb-bar {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border-soft);
  padding: .55rem 0;
}
.breadcrumb-bar .breadcrumb {
  font-size: .82rem;
  color: var(--text-soft);
}
.breadcrumb-bar .breadcrumb-item a {
  color: var(--text-soft);
}
.breadcrumb-bar .breadcrumb-item a:hover {
  color: var(--accent);
}
.breadcrumb-bar .breadcrumb-item.active {
  color: var(--heading-color);
  font-weight: 600;
}
.breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before {
  color: var(--gold-500);
  content: "\203A";
}

/* ---------------------------------------------------------- */
/* Hero sections                                                */
/* ---------------------------------------------------------- */
.page-hero {
  position: relative;
  padding: 5.5rem 0 4.5rem;
  color: #fbf3e0;
  background: radial-gradient(1200px 400px at 50% -10%, rgba(201,162,39,.25), transparent),
              linear-gradient(135deg, var(--maroon-900) 0%, var(--maroon-700) 55%, var(--maroon-800) 100%);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(255,255,255,.05) 0, transparent 40%),
    radial-gradient(circle at 88% 80%, rgba(255,255,255,.06) 0, transparent 45%);
  pointer-events: none;
}
.page-hero .hero-icon {
  color: var(--gold-400);
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.35));
  animation: floatY 4.5s ease-in-out infinite;
}
.page-hero h1 {
  color: #fbf3e0;
  font-size: clamp(2rem, 4vw, 3.1rem);
}
.page-hero .lead {
  color: #ecd9ae;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.hero-divider {
  width: 90px;
  height: 3px;
  margin: 1.1rem auto 1.4rem;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
  border-radius: 3px;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Home hero, a bit taller */
.hero-home {
  padding: 7rem 0 5.5rem;
}

/* Full-bleed photo gallery with a parallax "behind the page" feel */
.hero-gallery {
  position: relative;
  height: clamp(320px, 46vw, 560px);
  overflow: hidden;
}
.hero-bg-slider {
  position: absolute;
  top: -18%;
  left: 0;
  right: 0;
  height: 136%;
  will-change: transform;
}
.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1);
  transition: opacity 2.5s ease-in-out, transform 9s ease-out;
  will-change: opacity, transform;
}
.hero-bg-slide.is-active {
  opacity: 1;
  transform: scale(1.08);
}
:root[data-bs-theme="dark"] .hero-bg-slide.is-active {
  opacity: .82;
}
.hero-gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: .5rem;
}
.hero-gallery-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.8);
  background: rgba(255,255,255,.25);
  cursor: pointer;
  transition: background .3s ease, transform .3s ease;
}
.hero-gallery-dot.is-active {
  background: var(--gold-500);
  border-color: var(--gold-500);
  transform: scale(1.2);
}
.hero-gallery-dot:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg-slide { transition: opacity 1.2s ease-in-out; transform: none !important; }
  .hero-bg-slider { transform: none !important; }
}

/* ---------------------------------------------------------- */
/* Reveal on scroll                                             */
/* ---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }
.reveal-delay-5 { transition-delay: .4s; }
.reveal-delay-6 { transition-delay: .48s; }

/* ---------------------------------------------------------- */
/* Doctrine cards                                               */
/* ---------------------------------------------------------- */
.doctrine-card {
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.9rem 1.6rem;
  height: 100%;
  box-shadow: var(--shadow-soft);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease, background-color .25s ease;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 95px;
}
.doctrine-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-500), var(--maroon-700));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.doctrine-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(201, 162, 39, 0.4);
}
.doctrine-card:hover::before {
  transform: scaleX(1);
}
.doctrine-icon {
  width: 62px; height: 62px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--maroon-800), var(--maroon-600));
  color: var(--gold-300);
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 8px 18px rgba(122,31,43,.25);
}
.doctrine-card h3 {
  font-size: 1.15rem;
  margin-bottom: .6rem;
  color: var(--heading-color);
}
.doctrine-card p {
  color: var(--text-soft);
  font-size: .95rem;
  margin-bottom: 1rem;
}
.doctrine-link {
  font-family: 'Playfair Display', serif;
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.doctrine-card:hover .doctrine-link { color: var(--gold-600); }
.doctrine-link i { transition: transform .25s ease; margin-left: .25rem; }
.doctrine-card:hover .doctrine-link i { transform: translateX(4px); }

/* ---------------------------------------------------------- */
/* Línea de tiempo vertical (historia.php)                      */
/* Móvil: una columna, línea a la izquierda. Escritorio (992px+):  */
/* alterna izquierda/derecha a los lados de una línea central.  */
/* ---------------------------------------------------------- */
.timeline {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: .5rem 0;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 27px;
  width: 3px;
  background: linear-gradient(180deg, var(--gold-500), var(--maroon-700));
  border-radius: 3px;
}
.timeline-item {
  position: relative;
  padding-left: 66px;
  margin-bottom: 2rem;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: 27px;
  top: 28px;
  width: 15px;
  height: 15px;
  margin-left: -8px;
  border-radius: 50%;
  background: var(--gold-500);
  border: 3px solid var(--page-bg);
  box-shadow: 0 0 0 3px var(--border-gold);
  z-index: 2;
}
.timeline-date-tag {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: .72rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--maroon-900);
  background: var(--gold-500);
  padding: .2rem .65rem;
  border-radius: 999px;
  margin-bottom: .8rem;
}
@media (min-width: 992px) {
  .timeline::before { left: 50%; margin-left: -1.5px; }
  .timeline-item {
    width: 50%;
    padding-left: 0;
    margin-bottom: 2.75rem;
  }
  .timeline-item:nth-child(odd) { padding-right: 54px; }
  .timeline-item:nth-child(even) { padding-left: 54px; margin-left: 50%; }
  .timeline-item:nth-child(odd) .timeline-dot { left: auto; right: -8px; margin-left: 0; }
  .timeline-item:nth-child(even) .timeline-dot { left: -8px; margin-left: 0; }
}

/* Category cards on home page */
.category-card {
  text-decoration: none;
  display: block;
  height: 100%;
}

/* Rejilla de temas del inicio: se auto-equilibra sin importar cuántas
   tarjetas haya (evita filas descompensadas al ir agregando temas) */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ---------------------------------------------------------- */
/* Tarjetas de noticias (sección "Últimas noticias")            */
/* ---------------------------------------------------------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.news-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(201, 162, 39, 0.4);
}
.news-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--maroon-800);
}
.news-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.3rem 1.5rem 1.5rem;
}
.news-card-date {
  font-family: 'Playfair Display', serif;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: .5rem;
}
.news-card h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: .6rem;
  color: var(--heading-color);
}
.news-card p {
  color: var(--text-soft);
  font-size: .9rem;
  margin-bottom: 1rem;
  flex: 1;
}
.news-card:hover .doctrine-link { color: var(--gold-600); }
.news-card:hover .doctrine-link i { transform: translateX(4px); }

/* ---------------------------------------------------------- */
/* Modales — colores explícitos en ambos temas para que el     */
/* texto nunca se pierda contra el fondo                        */
/* ---------------------------------------------------------- */
.modal-content {
  background-color: var(--surface);
  color: var(--text-body);
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.modal-header {
  background: linear-gradient(120deg, var(--maroon-900), var(--maroon-700));
  color: #fbf3e0;
  border-bottom: 3px solid var(--gold-500);
}
.modal-header .modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: #fbf3e0;
}
.modal-header .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
}
.modal-body {
  padding: 1.6rem 1.7rem 1.8rem;
  background-color: var(--surface);
  color: var(--text-body);
}
.modal-body.modal-body-flush {
  padding: 0;
}

/* ---------------------------------------------------------- */
/* Visor de PDF embebido en modal, con índice de saltos         */
/* ---------------------------------------------------------- */
.pdf-viewer-layout {
  display: flex;
  align-items: stretch;
  height: 75vh;
}
.pdf-toc {
  width: 280px;
  flex: 0 0 280px;
  overflow-y: auto;
  padding: 1rem 1.1rem;
  background: var(--surface-alt);
  border-right: 1px solid rgba(201,162,39,.25);
}
.pdf-toc-title {
  font-family: 'Playfair Display', serif;
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--gold-600);
  font-weight: 700;
  margin-bottom: .7rem;
}
:root[data-bs-theme="dark"] .pdf-toc-title { color: var(--gold-400); }
.pdf-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pdf-toc-list li { margin-bottom: .15rem; }
.pdf-toc-list li.pdf-toc-group {
  margin: .9rem 0 .35rem;
  font-family: 'Playfair Display', serif;
  font-size: .72rem;
  letter-spacing: .07em;
  color: var(--gold-600);
  font-weight: 700;
}
.pdf-toc-list li.pdf-toc-group:first-child { margin-top: 0; }
:root[data-bs-theme="dark"] .pdf-toc-list li.pdf-toc-group { color: var(--gold-400); }
.pdf-toc-list a {
  display: block;
  padding: .4rem .55rem;
  border-radius: .4rem;
  color: var(--text-soft);
  text-decoration: none;
  font-size: .85rem;
  line-height: 1.35;
  cursor: pointer;
}
.pdf-toc-list a:hover {
  background: rgba(201,162,39,.18);
  color: var(--text-body);
}
.pdf-toc-list a.active {
  background: var(--gold-500);
  color: var(--maroon-900);
  font-weight: 600;
}
.pdf-toc-list a.pdf-toc-level-2 {
  padding-left: 1.35rem;
  font-size: .78rem;
}
.pdf-viewer-frame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  border: none;
  background: #525659;
}
/* Bootstrap solo ensancha .modal-xl a partir de 992px (y a 1140px desde
   1200px); por debajo de 992px el modal mide ~500px de ancho, así que el
   índice lateral de 280px fijos no cabe junto al visor. Por eso este punto
   de quiebre coincide con el de Bootstrap (992px), no con un valor propio. */
@media (max-width: 991.98px) {
  .pdf-viewer-layout { flex-direction: column; height: auto; }
  .pdf-toc {
    width: 100%;
    flex: 0 0 auto;
    max-height: 160px;
    border-right: none;
    border-bottom: 1px solid rgba(201,162,39,.25);
  }
  .pdf-viewer-frame { height: 60vh; }
}

/* ---------------------------------------------------------- */
/* Campos de formulario (buscador del sitio, contacto, etc.)    */
/* — .site-search-input hereda esto porque también lleva        */
/* la clase .form-control.                                      */
/* ---------------------------------------------------------- */
.form-control,
.form-select {
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  color: var(--text-body);
  border-radius: var(--radius-md);
}
.form-control:focus,
.form-select:focus {
  background: var(--surface-alt);
  color: var(--text-body);
  border-color: var(--gold-500);
  box-shadow: 0 0 0 .2rem rgba(201,162,39,.2);
}
.form-control::placeholder { color: var(--text-soft); opacity: .7; }
.form-label {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: .88rem;
  color: var(--heading-color);
  margin-bottom: .35rem;
}
.site-search-results {
  max-height: 55vh;
  overflow-y: auto;
}
.site-search-group {
  font-family: 'Playfair Display', serif;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .07em;
  color: var(--gold-600);
  font-weight: 700;
  margin: 1rem 0 .4rem;
}
:root[data-bs-theme="dark"] .site-search-group { color: var(--gold-400); }
.site-search-group:first-child { margin-top: 0; }
.site-search-result {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .6rem .65rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-body);
  cursor: pointer;
}
.site-search-result:hover,
.site-search-result.active {
  background: var(--surface-alt);
}
.site-search-result .site-search-icon {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-alt);
  color: var(--gold-600);
}
.site-search-result:hover .site-search-icon,
.site-search-result.active .site-search-icon {
  background: var(--gold-500);
  color: var(--maroon-900);
}
.site-search-result .site-search-title {
  font-weight: 600;
  color: var(--heading-color);
  font-size: .95rem;
}
.site-search-result .site-search-desc {
  font-size: .8rem;
  color: var(--text-soft);
  margin: 0;
}
.section-label {
  font-family: 'Playfair Display', serif;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-strong);
  border-bottom: 2px solid var(--surface-alt);
  padding-bottom: .35rem;
  margin-top: 1.5rem;
  margin-bottom: .7rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section-label:first-child { margin-top: 0; }
.section-label i { color: var(--gold-600); }
:root[data-bs-theme="dark"] .section-label i { color: var(--gold-400); }

.modal-body p, .modal-body li {
  color: var(--text-soft);
  font-size: .97rem;
}
.modal-body strong { color: var(--text-body); }

.callout {
  background: var(--surface-alt);
  color: var(--text-body);
  border-left: 4px solid var(--gold-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: .85rem 1.1rem;
  font-size: .93rem;
}
.callout-objection {
  background: var(--objection-bg);
  border-left: 4px solid var(--objection-border);
  color: var(--text-body);
}

.verse-list, .history-list, .resource-links {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}
.verse-list li, .history-list li {
  padding: .55rem .2rem .55rem .1rem;
  border-bottom: 1px dashed var(--dashed-line);
  color: var(--text-soft);
}
.verse-list li:last-child, .history-list li:last-child { border-bottom: none; }
.verse-list li strong, .history-list li strong { color: var(--accent-strong); }

.verse-copy-btn {
  border: none;
  background: transparent;
  color: var(--gold-600);
  font-size: .8rem;
  margin-left: .35rem;
  cursor: pointer;
  vertical-align: middle;
}
.verse-copy-btn:hover { color: var(--accent-strong); }
:root[data-bs-theme="dark"] .verse-copy-btn { color: var(--gold-400); }

.resource-links li { margin-bottom: .5rem; }
.resource-links a {
  text-decoration: none;
  font-weight: 600;
  color: var(--accent);
}
.resource-links a i { margin-right: .4rem; color: var(--gold-600); }
:root[data-bs-theme="dark"] .resource-links a i { color: var(--gold-400); }
.resource-links a:hover { text-decoration: underline; }

.badge-catecismo {
  background: var(--gold-500);
  color: var(--maroon-900);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: .03em;
}

/* ---------------------------------------------------------- */
/* Glosario                                                      */
/* ---------------------------------------------------------- */
.glossary-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 2.5rem;
}
.glossary-jump a {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  background: var(--surface);
  color: var(--accent);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
}
.glossary-jump a:hover {
  background: var(--gold-500);
  color: var(--maroon-900);
  border-color: var(--gold-500);
}
.glossary-letter {
  font-size: 1.7rem;
  color: var(--gold-600);
  border-bottom: 2px solid var(--border-gold);
  padding-bottom: .3rem;
  margin: 2.5rem 0 .5rem;
  scroll-margin-top: 95px;
}
:root[data-bs-theme="dark"] .glossary-letter { color: var(--gold-400); }
.glossary-letter:first-of-type { margin-top: 0; }
.glossary-list { margin: 0; }
.glossary-term {
  padding: 1rem 0;
  border-bottom: 1px dashed var(--dashed-line);
}
.glossary-term:last-child { border-bottom: none; }
.glossary-term dt {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--heading-color);
  margin-bottom: .3rem;
}
.glossary-term dd {
  margin: 0;
  color: var(--text-soft);
}
.glossary-term dd a {
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------------------------------------------------------- */
/* Intro / love banner                                          */
/* ---------------------------------------------------------- */
.love-banner {
  background: var(--love-banner-bg);
  color: var(--text-body);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}
.love-banner i.fa-dove { color: var(--gold-600); }
:root[data-bs-theme="dark"] .love-banner i.fa-dove { color: var(--gold-400); }

/* ---------------------------------------------------------- */
/* Formulario de contacto (home)                                */
/* ---------------------------------------------------------- */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}
@media (max-width: 575.98px) {
  .contact-form { padding: 1.4rem; }
}
.contact-form textarea.form-control { resize: vertical; }
/* Campo trampa anti-spam: invisible para personas, pero presente en el DOM
   (no display:none) para que los bots que sí lo rellenan queden atrapados. */
.contact-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------- */
/* Índice flotante (artículos largos)                           */
/* ---------------------------------------------------------- */
.floating-toc { display: none; }
@media (min-width: 1200px) {
  .floating-toc {
    display: block;
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 1030;
  }
  .floating-toc-toggle {
    writing-mode: vertical-rl;
    display: flex;
    align-items: center;
    gap: .6rem;
    background: var(--maroon-800);
    color: var(--gold-300);
    border: 1px solid var(--border-gold);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    padding: 1rem .55rem;
    font-family: 'Playfair Display', serif;
    font-size: .74rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
  }
  .floating-toc-toggle i { transform: rotate(90deg); }
  .floating-toc-list {
    list-style: none;
    margin: 0;
    padding: 1rem 1.1rem;
    width: 0;
    /* Se limita a la mitad superior de la ventana (con margen) para que,
       aun en pantallas bajas o con listas largas, nunca invada la esquina
       inferior derecha donde vive #backToTop. */
    max-height: calc(50vh - 50px);
    overflow: hidden auto;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    white-space: nowrap;
    transition: width .25s ease, opacity .2s ease, padding .25s ease;
    /* Posición absoluta: así su alto/ancho no afecta la caja de
       .floating-toc, que se centra con top:50%+translateY(-50%). Si
       quedara en el flujo flex normal, expandirse en hover cambiaría el
       alto del nav y todo el bloque (botón incluido) saltaría hacia el
       centro de la pantalla. */
    position: absolute;
    top: 0;
    right: 100%;
  }
  .floating-toc:hover .floating-toc-list,
  .floating-toc.is-open .floating-toc-list {
    width: 270px;
    opacity: 1;
  }
  .floating-toc-list li { margin-bottom: .25rem; }
  .floating-toc-list a {
    display: block;
    font-size: .83rem;
    line-height: 1.3;
    color: var(--text-soft);
    text-decoration: none;
    padding: .35rem .5rem;
    border-radius: .4rem;
    white-space: normal;
  }
  .floating-toc-list a:hover {
    background: var(--surface-alt);
    color: var(--text-body);
  }
  .floating-toc-list a.active {
    background: var(--gold-500);
    color: var(--maroon-900);
    font-weight: 600;
  }
}

/* ---------------------------------------------------------- */
/* Section headers                                              */
/* ---------------------------------------------------------- */
.section-heading {
  text-align: center;
  margin-bottom: 2.75rem;
}
.section-heading .kicker {
  font-family: 'Playfair Display', serif;
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: .12em;
  color: var(--gold-600);
  font-weight: 700;
}
:root[data-bs-theme="dark"] .section-heading .kicker { color: var(--gold-400); }
.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}
.section-heading .divider {
  width: 70px; height: 3px;
  background: var(--gold-500);
  margin: .85rem auto 0;
  border-radius: 3px;
}

/* ---------------------------------------------------------- */
/* Footer                                                       */
/* ---------------------------------------------------------- */
footer.site-footer {
  background: var(--maroon-900);
  color: #e9d8b8;
  padding: 3rem 0 1.5rem;
}
footer.site-footer h6 {
  color: var(--gold-400);
  font-family: 'Playfair Display', serif;
  font-size: .85rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
footer.site-footer a {
  color: #e9d8b8;
  text-decoration: none;
}
footer.site-footer a:hover { color: var(--gold-300); }
footer.site-footer .footer-divider {
  border-color: rgba(201,162,39,.25);
  margin: 2rem 0 1.2rem;
}
footer.site-footer .small-print {
  font-size: .82rem;
  color: #c9b48c;
}

/* ---------------------------------------------------------- */
/* Back to top                                                  */
/* ---------------------------------------------------------- */
#backToTop {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--maroon-800);
  color: var(--gold-300);
  border: 2px solid var(--gold-500);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-strong);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all .3s ease;
  /* Por encima del índice flotante (.floating-toc, z-index 1030): así,
     si sus áreas llegan a coincidir en la esquina inferior derecha, el
     botón siempre recibe el hover/click en vez de que ambos se disputen
     el puntero y parpadeen. */
  z-index: 1040;
}
#backToTop.show {
  opacity: 1; visibility: visible; transform: translateY(0);
}
#backToTop:hover { background: var(--gold-500); color: var(--maroon-900); }

/* ---------------------------------------------------------- */
/* Misc                                                          */
/* ---------------------------------------------------------- */
.quote-block {
  font-style: italic;
  border-left: 3px solid var(--gold-500);
  padding-left: 1rem;
  color: var(--text-soft);
}
.prayer-text {
  border-left: 3px solid var(--gold-500);
  background: var(--surface-alt);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.3rem;
  margin: 1rem 0;
  line-height: 1.85;
  color: var(--text-body);
}
.prayer-text strong { color: var(--heading-color); }
.icon-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--accent-strong);
  font-size: 1.1rem;
}
.table-doctrine th { font-family: 'Playfair Display', serif; color: var(--heading-color); font-size: .85rem; }
.table-doctrine td, .table-doctrine th { vertical-align: middle; color: var(--text-soft); }

/* ---------------------------------------------------------- */
/* Acordeón FAQ (home) — con el estilo propio del sitio en vez  */
/* de los valores por defecto de Bootstrap.                     */
/* ---------------------------------------------------------- */
.faq-accordion .accordion-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1rem;
  overflow: hidden;
}
.faq-accordion .accordion-item:last-child { margin-bottom: 0; }
.faq-accordion .accordion-header { margin: 0; }
.faq-accordion .accordion-button {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--heading-color);
  background: transparent;
  padding: 1.1rem 1.4rem;
  box-shadow: none;
}
.faq-accordion .accordion-button::after { display: none; }
.faq-accordion .accordion-button .faq-icon {
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 1rem;
  font-size: .85rem;
  color: var(--gold-600);
  transition: transform .25s ease;
}
:root[data-bs-theme="dark"] .faq-accordion .accordion-button .faq-icon { color: var(--gold-400); }
.faq-accordion .accordion-button:not(.collapsed) {
  color: var(--accent);
  background: var(--surface-alt);
}
.faq-accordion .accordion-button:not(.collapsed) .faq-icon { transform: rotate(45deg); }
.faq-accordion .accordion-button:focus { box-shadow: none; }
.faq-accordion .accordion-body {
  padding: 1rem 1.4rem 1.3rem;
  color: var(--text-soft);
  line-height: 1.7;
  border-top: 1px dashed var(--dashed-line);
}

/* ---------------------------------------------------------- */
/* Ajustes finos en modo oscuro para componentes de Bootstrap   */
/* ---------------------------------------------------------- */
:root[data-bs-theme="dark"] .accordion-button {
  color: var(--text-body);
}
:root[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
  color: var(--gold-300);
}

@media (max-width: 767.98px) {
  .page-hero { padding: 4rem 0 3rem; }
  .modal-body { padding: 1.2rem; }
}

/* ---------------------------------------------------------- */
/* Fichas: barra para compartir e imprimir (ver script.js)      */
/* ---------------------------------------------------------- */
.ficha-acciones {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1rem;
  flex-wrap: wrap;
  padding: .75rem 1.7rem;
  background: var(--surface-alt);
  border-top: 1px solid rgba(201, 162, 39, .25);
}
.ficha-acciones-label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-soft);
}
.ficha-acciones-label i { color: var(--gold-600); }
.ficha-acciones-botones { display: flex; flex-wrap: wrap; gap: .4rem; }
.ficha-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .38rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, .45);
  background: var(--surface);
  color: var(--accent);
  font-family: "Lora", Georgia, serif;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ficha-btn:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--maroon-900); }
.ficha-btn:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.ficha-btn.is-whatsapp:hover { background: #25d366; border-color: #25d366; color: #fff; }
.ficha-btn.is-facebook:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.ficha-btn.is-x:hover { background: #111; border-color: #111; color: #fff; }
.ficha-impresion { display: none; }

@media (max-width: 575.98px) {
  .ficha-acciones { padding: .7rem 1.2rem; }
  .ficha-btn span:not(.visually-hidden) { display: none; }
  .ficha-btn { padding: .45rem .65rem; }
}

/* ---------------------------------------------------------- */
/* Fichas: reproductor "Escuchar esta ficha" (ver script.js)    */
/* Va fijo entre el encabezado y el cuerpo con scroll del modal */
/* ---------------------------------------------------------- */
.ficha-lector {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
  padding: .55rem 1.7rem;
  background: var(--surface-alt);
  border-bottom: 1px solid rgba(201, 162, 39, .25);
  font-family: "Lora", Georgia, serif;
}
.lector-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.lector-estado {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lector-progreso {
  display: none;
  height: 4px;
  border-radius: 999px;
  background: rgba(201, 162, 39, .22);
  overflow: hidden;
}
.lector-progreso span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-500), var(--maroon-700));
  transition: width .3s ease;
}
:root[data-bs-theme="dark"] .lector-progreso span { background: var(--gold-400); }
.lector-controles { display: flex; align-items: center; gap: .35rem; flex-shrink: 0; }
.lector-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, .45);
  background: var(--surface);
  color: var(--accent);
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease;
}
.lector-btn:hover:not(:disabled) { background: var(--gold-500); border-color: var(--gold-500); color: var(--maroon-900); }
.lector-btn:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.lector-btn:disabled { opacity: .4; cursor: default; }
.lector-btn-principal {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--maroon-700), var(--maroon-900));
  border-color: var(--gold-500);
  color: #fbf3e0;
  font-size: .95rem;
}
.lector-btn-principal .fa-play { margin-left: 2px; }   /* centrado óptico */
.lector-btn-principal:hover:not(:disabled) { background: var(--gold-500); color: var(--maroon-900); }
.lector-velocidad {
  width: auto;
  min-width: 2.1rem;
  padding: 0 .55rem;
  font-family: "Lora", Georgia, serif;
  font-size: .78rem;
  font-weight: 700;
}
/* Antes de empezar solo se ven reproducir, el texto y la velocidad. */
.lector-btn-extra { display: none; }
.is-activo .lector-btn-extra { display: inline-flex; }
.is-activo .lector-progreso { display: block; }

/* El bloque que se está leyendo */
.modal-body .lector-leyendo {
  background-color: rgba(201, 162, 39, .16);
  box-shadow: 0 0 0 .35rem rgba(201, 162, 39, .16);
  border-radius: 4px;
  transition: background-color .25s ease, box-shadow .25s ease;
}
.modal-body .callout.lector-leyendo { box-shadow: 0 0 0 2px rgba(201, 162, 39, .55); }

@media (max-width: 575.98px) {
  .ficha-lector { padding: .5rem 1.2rem; gap: .55rem; }
  .lector-controles { gap: .25rem; }
  .lector-btn { width: 2rem; height: 2rem; font-size: .8rem; }
  .lector-btn-principal { width: 2.35rem; height: 2.35rem; }
  .lector-estado { font-size: .78rem; }
}
@media (max-width: 359.98px) {
  /* Teléfonos muy angostos: se omite "anterior" para que quepa todo en una línea. */
  .is-activo .lector-btn-extra[data-lector="anterior"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lector-progreso span, .modal-body .lector-leyendo,
  main .doctrine-card.lector-leyendo, main .section-heading.lector-leyendo { transition: none; }
}

/* ---------------------------------------------------------- */
/* Recorrido de la página: reproductor al inicio de las líneas  */
/* de tiempo que lee las tarjetas en orden (ver script.js)      */
/* ---------------------------------------------------------- */
.recorrido-lector {
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: .8rem 1.1rem .85rem;
  font-family: "Lora", Georgia, serif;
}
.recorrido-lector-titulo {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .55rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--heading-color);
}
.recorrido-lector-titulo i { color: var(--gold-600); }
:root[data-bs-theme="dark"] .recorrido-lector-titulo i { color: var(--gold-400); }
.recorrido-lector-barra { display: flex; align-items: center; gap: .75rem; }

/* Mientras suena y su lugar ya no se ve: mini reproductor abajo al centro. */
.recorrido-lector.is-flotante {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  z-index: 1030;            /* bajo los modales de Bootstrap (1055) */
  padding: .55rem .8rem;
  box-shadow: var(--shadow-strong);
  animation: recorrido-entra .25s ease;
}
.recorrido-lector.is-flotante .recorrido-lector-titulo { display: none; }
@keyframes recorrido-entra {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
/* El botón "volver arriba" sube para no quedar debajo del mini reproductor. */
body.recorrido-flotante #backToTop { bottom: 92px; }

/* La tarjeta (o etapa) que se está leyendo */
main .doctrine-card.lector-leyendo {
  box-shadow: 0 0 0 3px var(--gold-500), var(--shadow-strong);
  transition: box-shadow .25s ease;
}
main .section-heading.lector-leyendo h2 {
  text-decoration: underline;
  text-decoration-color: var(--gold-500);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

@media (max-width: 575.98px) {
  .recorrido-lector { padding: .7rem .85rem .75rem; }
  .recorrido-lector-barra { gap: .55rem; }
  .recorrido-lector.is-flotante { bottom: 10px; width: calc(100% - 16px); }
  body.recorrido-flotante #backToTop { bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .recorrido-lector.is-flotante { animation: none; }
}
@media print {
  .recorrido-lugar { display: none !important; }
}

/* ---------------------------------------------------------- */
/* El Santo Rosario (pages/rosario.php): rezo guiado y misterios */
/* ---------------------------------------------------------- */
.rosario-guia {
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.2rem 1.3rem 1.3rem;
  font-family: "Lora", Georgia, serif;
}
.rosario-guia-opciones { margin-bottom: 1rem; }
.rosario-lector { margin-bottom: 1rem; }
.rosario-paso {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem 1.1rem;
  scroll-margin-top: 95px;
}
.rosario-paso-cabeza { display: flex; flex-direction: column; gap: .15rem; margin-bottom: .6rem; }
.rosario-paso-etapa {
  font-family: 'Playfair Display', serif;
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .1em;
  font-weight: 700;
  color: var(--gold-600);
}
:root[data-bs-theme="dark"] .rosario-paso-etapa { color: var(--gold-400); }
.rosario-paso-oracion {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading-color);
}
.rosario-paso-texto { line-height: 1.85; color: var(--text-body); }
.rosario-paso:not(.is-rezando) .rosario-paso-texto { color: var(--text-soft); font-size: .95rem; }
.rosario-paso-texto.lector-leyendo {
  border-left: 3px solid var(--gold-500);
  padding-left: .9rem;
}

/* Las cuentas de la decena: rezadas, la actual y las que faltan. */
.rosario-cuentas { display: none; gap: .45rem; margin-bottom: .8rem; flex-wrap: wrap; }
.rosario-paso.is-rezando .rosario-cuentas { display: flex; }
.rosario-cuentas span {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid var(--gold-500);
  background: transparent;
  transition: background .2s ease, transform .2s ease;
}
.rosario-cuentas span.is-rezada { background: var(--gold-500); }
.rosario-cuentas span.is-actual { background: var(--maroon-700); border-color: var(--maroon-700); transform: scale(1.3); }
:root[data-bs-theme="dark"] .rosario-cuentas span.is-actual { background: var(--gold-300); border-color: var(--gold-300); }
.rosario-cuentas span.is-oculta { visibility: hidden; }

.rosario-pestanas .nav-link {
  color: var(--accent-strong);
  border: 1px solid var(--border-gold);
  margin: .2rem;
  font-weight: 600;
}
.rosario-pestanas .nav-link.active { background: var(--maroon-800); color: var(--gold-300); border-color: var(--maroon-800); }
:root[data-bs-theme="dark"] .rosario-pestanas .nav-link.active { background: var(--gold-500); color: var(--maroon-900); border-color: var(--gold-500); }
.rosario-badge-hoy { background: var(--gold-500); color: var(--maroon-900); font-size: .65rem; vertical-align: middle; }
.rosario-pestanas .nav-link.active .rosario-badge-hoy { background: var(--gold-300); }
:root[data-bs-theme="dark"] .rosario-pestanas .nav-link.active .rosario-badge-hoy { background: var(--maroon-800); color: var(--gold-300); }

.rosario-misterio {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-top: 3px solid var(--gold-500);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 1.3rem 1.3rem 1.2rem;
}
.rosario-misterio .kicker {
  font-family: 'Playfair Display', serif;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .1em;
  font-weight: 700;
  color: var(--gold-600);
}
:root[data-bs-theme="dark"] .rosario-misterio .kicker { color: var(--gold-400); }
.rosario-misterio h3 { font-size: 1.15rem; margin: .3rem 2.2rem .5rem 0; }
.rosario-misterio-num {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--maroon-800);
  color: var(--gold-300);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}
.rosario-misterio-cita { font-size: .85rem; font-weight: 600; color: var(--accent-strong); margin-bottom: .5rem; }
.rosario-misterio-fruto { margin-top: auto; font-size: .9rem; color: var(--text-soft); }

.rosario-pasos, .pasos-lista { counter-reset: paso; list-style: none; padding: 0; }
.rosario-pasos li, .pasos-lista li {
  counter-increment: paso;
  position: relative;
  padding: .7rem 0 .7rem 3rem;
  border-bottom: 1px solid var(--border-soft);
}
.rosario-pasos li:last-child, .pasos-lista li:last-child { border-bottom: none; }
.rosario-pasos li::before, .pasos-lista li::before {
  content: counter(paso);
  position: absolute;
  left: 0; top: .6rem;
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--gold-500);
  color: var(--accent-strong);
  font-weight: 700;
}
@media (prefers-reduced-motion: reduce) {
  .rosario-cuentas span { transition: none; }
}

/* ---------------------------------------------------------- */
/* El Vía Crucis (pages/viacrucis.php): estaciones sin modal    */
/* ---------------------------------------------------------- */
.viacrucis-estacion { cursor: default; }
.viacrucis-estacion:hover { transform: none; }
.viacrucis-respuesta { font-size: .88rem; font-style: italic; color: var(--text-soft); }
.viacrucis-respuesta .vc-versiculo { font-style: normal; font-weight: 700; color: var(--gold-600); }
.viacrucis-cita {
  border-left: 3px solid var(--gold-500);
  padding-left: .8rem;
  font-style: italic;
}
.viacrucis-ref { font-style: normal; font-size: .85rem; font-weight: 600; color: var(--accent-strong); white-space: nowrap; }
.viacrucis-oracion { font-weight: 600; color: var(--heading-color); margin-bottom: 0; }
.viacrucis-pascua { border-top: 3px solid var(--gold-500); }
.viacrucis-era .section-heading p { max-width: 680px; margin: .8rem auto 0; color: var(--text-soft); }

/* Padres de la Iglesia (pages/padres.php): etapas de la línea de tiempo, sin modal */
.padres-etapa { cursor: default; }
.padres-etapa:hover { transform: none; }
.padres-etapa p:last-child { margin-bottom: 0; }
.padres-era .section-heading p { max-width: 680px; margin: .8rem auto 0; color: var(--text-soft); }

/* ---------------------------------------------------------- */
/* Boletín semanal (template/_boletin_form.php, pages/boletin)  */
/* ---------------------------------------------------------- */
.btn-boletin { background: var(--gold-500); color: var(--maroon-900); font-weight: 600; border: 1px solid var(--gold-500); }
.btn-boletin:hover, .btn-boletin:focus { background: var(--gold-300); color: var(--maroon-900); }
.btn-boletin:disabled { opacity: .7; }
.form-boletin-aviso.is-ok { color: #2e7d4f; font-weight: 600; }
.form-boletin-aviso.is-error { color: #b3261e; font-weight: 600; }
.site-footer .form-boletin .form-control { background: rgba(255, 255, 255, .08); border-color: rgba(201, 162, 39, .45); color: #fbf3e0; }
.site-footer .form-boletin .form-control::placeholder { color: rgba(251, 243, 224, .55); }
.site-footer .form-boletin-aviso { color: rgba(251, 243, 224, .7); }
.site-footer .form-boletin-aviso.is-ok { color: #9be3b4; }
.site-footer .form-boletin-aviso.is-error { color: #ffb4a9; }
.boletin-caja, .boletin-incluye {
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 1.1rem 1.2rem;
}

/* ---------------------------------------------------------- */
/* Novenas (pages/_novena.php)                                  */
/* ---------------------------------------------------------- */
.novena-btn-hoy { background: var(--maroon-800); color: var(--gold-300); font-weight: 600; flex-shrink: 0; }
.novena-btn-hoy:hover { background: var(--gold-500); color: var(--maroon-900); }
main .doctrine-card.novena-hoy { box-shadow: 0 0 0 3px var(--gold-500), var(--shadow-strong); }

/* ---------------------------------------------------------- */
/* Guía para confesarse (pages/confesion.php)                   */
/* ---------------------------------------------------------- */
.confesion-dialogo {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.2rem 1.4rem;
}
.confesion-dialogo p { margin-bottom: .75rem; }
.confesion-dialogo p:last-child { margin-bottom: 0; }
.confesion-dialogo .quien {
  display: inline-block;
  min-width: 6.2rem;
  margin-right: .4rem;
  padding: .1rem .55rem;
  border-radius: 999px;
  background: var(--gold-500);
  color: var(--maroon-900);
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.confesion-dialogo .quien.es-sacerdote, .confesion-dialogo .quien.es-adentro { background: var(--maroon-800); color: var(--gold-300); }

.confesion-privado {
  display: flex;
  align-items: flex-start;
  padding: .8rem 1rem;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  border: 1px dashed var(--gold-500);
  font-size: .92rem;
}
.confesion-privado i { color: var(--gold-600); margin-top: .2rem; }

.examen-grupo {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem .6rem;
  margin-bottom: 1rem;
}
.examen-grupo legend {
  float: none;
  width: auto;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: .6rem;
}
.examen-grupo legend i { color: var(--gold-600); width: 1.6em; }
.examen-pregunta { padding: .35rem 0 .35rem 1.9em; border-top: 1px solid var(--border-soft); }
.examen-pregunta:first-of-type { border-top: none; }
.examen-pregunta .form-check-input { margin-left: -1.9em; margin-top: .3em; }
.examen-pregunta .form-check-input:checked { background-color: var(--maroon-700); border-color: var(--maroon-700); }
.examen-pregunta .form-check-input:checked + label { color: var(--heading-color); font-weight: 600; }
.examen-para { font-size: .8rem; font-style: italic; color: var(--text-soft); }

.examen-resumen {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
  padding: .8rem 1rem;
}
/* Con "Mi lista" abierta deja de flotar, para no tapar el examen. */
.examen-resumen.con-lista { position: static; box-shadow: var(--shadow-soft); }
.examen-resumen-cabeza { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; font-weight: 600; }
.examen-btn { background: var(--maroon-800); color: var(--gold-300); }
.examen-btn:hover:not(:disabled) { background: var(--gold-500); color: var(--maroon-900); }
.examen-lista { margin-top: .8rem; max-height: 50vh; overflow-y: auto; }
.examen-lista h3 { font-size: .95rem; margin: .6rem 0 .3rem; }
.examen-lista ul { margin-bottom: .4rem; padding-left: 1.2rem; }

/* Imprimir una ficha: solo el contenido del modal abierto, completo
   (sin el recorte del scroll interno), en tinta oscura sobre blanco. */
@media print {
  body.imprimiendo-ficha > *:not(.modal.show) { display: none !important; }
  body.imprimiendo-ficha { background: #fff !important; }
  body.imprimiendo-ficha .modal.show {
    position: static !important;
    display: block !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  body.imprimiendo-ficha .modal.show .modal-dialog {
    max-width: none !important;
    margin: 0 !important;
    height: auto !important;
    transform: none !important;
  }
  body.imprimiendo-ficha .modal.show .modal-content {
    max-height: none !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    background: #fff !important;
    color: #1d140f !important;
  }
  body.imprimiendo-ficha .modal.show .modal-body {
    overflow: visible !important;
    background: #fff !important;
    color: #1d140f !important;
  }
  body.imprimiendo-ficha .modal.show .modal-body * { color: #1d140f !important; }
  body.imprimiendo-ficha .modal.show .modal-header {
    background: none !important;
    border-bottom: 2px solid #7a1f2b !important;
  }
  body.imprimiendo-ficha .modal.show .modal-title { color: #4a0f1a !important; }
  body.imprimiendo-ficha .modal.show .ficha-lector,
  body.imprimiendo-ficha .modal.show .btn-close,
  body.imprimiendo-ficha .modal.show .ficha-acciones-label,
  body.imprimiendo-ficha .modal.show .ficha-acciones-botones { display: none !important; }
  body.imprimiendo-ficha .modal.show .ficha-acciones {
    background: none !important;
    border-top: 1px solid #c9a227 !important;
    padding: .6rem 0 0 !important;
  }
  body.imprimiendo-ficha .modal.show .ficha-impresion {
    display: block !important;
    font-size: 9pt;
    color: #6b5a48 !important;
  }
  body.imprimiendo-ficha .modal.show a { text-decoration: underline; }
  body.imprimiendo-ficha .modal.show .lector-leyendo { background: none !important; box-shadow: none !important; }
}
/* ---------------------------------------------------------- */
/* La app (aplicacion.php y el aviso del inicio)                */
/* ---------------------------------------------------------- */
.app-ficha-tecnica {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  margin: 0 0 1rem;
  color: var(--text-soft);
  font-size: .93rem;
}
.app-ficha-tecnica i { color: var(--gold-600); margin-right: .4rem; }
:root[data-bs-theme="dark"] .app-ficha-tecnica i { color: var(--gold-400); }

.app-qr {
  width: 188px;
  padding: 10px;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-gold);
}
.app-qr img, .app-qr canvas { display: block; width: 168px; height: 168px; }

.app-pasos {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: paso;
}
.app-pasos li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.2rem;
  margin-bottom: .8rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  color: var(--text-soft);
}
.app-pasos li:last-child { margin-bottom: 0; }
.app-pasos li strong { color: var(--heading-color); }
.app-pasos .icon-chip { flex: 0 0 auto; }

.promo-app {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.promo-app-icono {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--maroon-900), var(--maroon-700));
  color: var(--gold-400);
  font-size: 1.7rem;
  box-shadow: 0 8px 18px rgba(122,31,43,.25);
}
.promo-app-texto { flex: 1 1 260px; }
.promo-app-texto h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.promo-app-texto p { margin: 0; color: var(--text-soft); }

/* ---------------------------------------------------------- */
/* La Biblia en el Tiempo (cronologia.php)                       */
/* Reutiliza .timeline de historia.php; aquí solo lo propio:     */
/* imagen de cada tarjeta, etiquetas, filtros y botones "Ver en   */
/* la Biblia".                                                    */
/* ---------------------------------------------------------- */
.linea-invitacion h3 { color: var(--heading-color); }

.linea-card { padding-top: 0; }
.linea-card .doctrine-icon { margin-top: 1.9rem; }
.linea-img {
  margin: 0 -1.6rem 1.1rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--maroon-900);
  border-bottom: 1px solid var(--border-soft);
}
.linea-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transition: transform .5s ease;
}
.linea-card:hover .linea-img img { transform: scale(1.04); }

.linea-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: -.35rem 0 .9rem; }
.linea-tag {
  font-size: .72rem;
  padding: .12rem .55rem;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border-gold);
  color: var(--text-soft);
}

.linea-filtros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  max-width: 900px;
  margin: 0 auto .6rem;
}
.linea-filtros-titulo { font-size: .85rem; color: var(--text-soft); margin-right: .2rem; }
.btn-tema {
  border: 1px solid var(--border-gold);
  background: var(--surface);
  color: var(--text-soft);
  border-radius: 999px;
  padding: .3rem .85rem;
  font-size: .85rem;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-tema:hover { border-color: var(--gold-500); color: var(--accent); }
.btn-tema.active {
  background: var(--maroon-700);
  border-color: var(--maroon-700);
  color: #fff;
}
:root[data-bs-theme="dark"] .btn-tema.active {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--maroon-900);
}
.linea-conteo { text-align: center; font-size: .85rem; color: var(--text-soft); margin-bottom: 0; }

/* Con un filtro activo, la línea pasa a una sola columna también en
   escritorio (la alternancia por :nth-child se rompe al ocultar). */
@media (min-width: 992px) {
  .timeline.linea-filtrada::before { left: 27px; margin-left: 0; }
  .timeline.linea-filtrada .timeline-item:nth-child(odd),
  .timeline.linea-filtrada .timeline-item:nth-child(even) {
    width: auto;
    max-width: 720px;
    margin-left: 0;
    padding-left: 66px;
    padding-right: 0;
  }
  .timeline.linea-filtrada .timeline-item:nth-child(odd) .timeline-dot,
  .timeline.linea-filtrada .timeline-item:nth-child(even) .timeline-dot {
    left: 27px;
    right: auto;
    margin-left: -8px;
  }
}

.linea-modal-meta { font-size: .85rem; color: var(--text-soft); margin-bottom: .4rem; }
.linea-modal-meta .timeline-date-tag { margin: 0 .4rem 0 0; }
.linea-citas { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-ver-biblia {
  border: 1px solid var(--gold-500);
  background: var(--surface-alt);
  color: var(--accent-strong);
  font-weight: 600;
  border-radius: 999px;
}
.btn-ver-biblia:hover,
.btn-ver-biblia:focus-visible {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--maroon-900);
}
.linea-credito { font-size: .78rem; color: var(--text-soft); margin: 1rem 0 0; font-style: italic; }

/* ---------------------------------------------------------- */
/* Jesús: de la Promesa a la Gloria (jesus.php)                  */
/* Reutiliza la línea de tiempo de cronologia.php; aquí solo:    */
/* atajos por etapa, sello del primer anuncio, tabla de           */
/* profecías y cumplimiento, grupos de citas y fichas            */
/* relacionadas dentro del modal.                                 */
/* ---------------------------------------------------------- */
.jesus-etapas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  max-width: 980px;
  margin: 0 auto 2rem;
}
.jesus-etapas a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.jesus-etapas a i { color: var(--gold-600); }
.jesus-etapas a:hover { background: var(--maroon-700); border-color: var(--maroon-700); color: #fff; }
.jesus-etapas a:hover i { color: var(--gold-300); }

.linea-sello {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0 0 .55rem;
  padding: .18rem .65rem;
  border-radius: 999px;
  background: var(--gold-400);
  color: var(--maroon-900);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.profecias-tabla {
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
}
.profecias-fila {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  padding: .85rem 1.15rem;
  border-top: 1px solid var(--border-gold);
  align-items: start;
}
.profecias-fila.is-encabezado {
  border-top: 0;
  background: var(--surface-alt);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.profecias-ficha {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: var(--heading-color);
  font-weight: 600;
  text-align: left;
}
.profecias-ficha:hover,
.profecias-ficha:focus-visible { color: var(--accent); text-decoration: underline; }
.profecias-fecha { display: block; font-size: .78rem; color: var(--text-soft); margin-top: .15rem; }
.profecias-citas { display: flex; flex-wrap: wrap; gap: .35rem; }
.btn-cita {
  padding: .15rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--surface-alt);
  color: var(--accent-strong);
  font-size: .78rem;
  font-weight: 600;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-cita i { margin-right: .3rem; color: var(--gold-600); }
.btn-cita.is-cumplimiento { border-color: var(--gold-500); }
.btn-cita:hover,
.btn-cita:focus-visible { background: var(--gold-500); border-color: var(--gold-500); color: var(--maroon-900); }
.btn-cita:hover i,
.btn-cita:focus-visible i { color: var(--maroon-900); }
@media (max-width: 767.98px) {
  .profecias-fila { grid-template-columns: 1fr; gap: .5rem; padding: .85rem 1rem; }
  .profecias-fila.is-encabezado { display: none; }
  .profecias-fila:nth-child(2) { border-top: 0; }
  .profecias-citas::before {
    content: attr(data-etiqueta);
    width: 100%;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-soft);
  }
}

.linea-citas-grupo {
  margin: .4rem 0 .35rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.linea-relacionados { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-relacionado {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--surface);
  color: var(--accent);
  font-size: .86rem;
  font-weight: 600;
  text-align: left;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-relacionado i { color: var(--gold-600); }
.btn-relacionado:hover,
.btn-relacionado:focus-visible { background: var(--maroon-700); border-color: var(--maroon-700); color: #fff; }
.btn-relacionado:hover i,
.btn-relacionado:focus-visible i { color: var(--gold-300); }
:root[data-bs-theme="dark"] .btn-relacionado:hover,
:root[data-bs-theme="dark"] .btn-relacionado:focus-visible { background: var(--gold-500); border-color: var(--gold-500); color: var(--maroon-900); }
:root[data-bs-theme="dark"] .btn-relacionado:hover i,
:root[data-bs-theme="dark"] .btn-relacionado:focus-visible i { color: var(--maroon-900); }

/* ---------------------------------------------------------- */
/* Santos: vidas de santos y los apóstoles (santos.php)         */
/* ---------------------------------------------------------- */
.santos-atajos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  max-width: 900px;
  margin: 0 auto;
}
.santos-atajos a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.santos-atajos a i { color: var(--gold-600); }
.santos-atajos a:hover { background: var(--maroon-700); border-color: var(--maroon-700); color: #fff; }
.santos-atajos a:hover i { color: var(--gold-300); }

/* Retrato redondo de la tarjeta, del tamaño del ícono pero mayor */
.santo-retrato {
  width: 88px; height: 88px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 3px solid var(--gold-500);
  box-shadow: 0 8px 18px rgba(122,31,43,.25);
  background: var(--maroon-900);
}
.santo-retrato img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  transition: transform .5s ease;
}
.santo-card:hover .santo-retrato img { transform: scale(1.08); }
.santo-retrato.is-icono {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--maroon-800), var(--maroon-600));
  color: var(--gold-300);
  font-size: 2rem;
}
.santo-meta {
  font-size: .82rem !important;
  color: var(--accent) !important;
  font-weight: 600;
  margin: -.3rem 0 .55rem !important;
}
.apostol-card.is-traidor { background: var(--surface-alt); }
.apostol-card.is-traidor .santo-retrato.is-icono { background: linear-gradient(135deg, #5a4a40, #3b302a); color: #d8c7a8; border-color: #8a7a68; }

.apostoles-subtitulo { text-align: center; margin: 3rem auto 1.4rem; max-width: 640px; }
.apostoles-subtitulo h3 { color: var(--heading-color); font-size: 1.35rem; margin-bottom: .35rem; }
.apostoles-subtitulo p { color: var(--text-soft); margin: 0; }

/* Imagen dentro de la ficha: a la derecha en pantallas medianas, arriba en el celular */
.santo-figura {
  margin: 0 auto 1rem;
  max-width: 260px;
  text-align: center;
}
.santo-figura img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-soft);
}
.santo-figura figcaption { font-size: .74rem; color: var(--text-soft); font-style: italic; margin-top: .45rem; line-height: 1.35; }
@media (min-width: 768px) {
  .santo-figura { float: right; width: 240px; margin: 0 0 1rem 1.4rem; }
}
.santo-titulo { font-weight: 600; color: var(--accent-strong); margin-bottom: .6rem; }
.santo-datos { list-style: none; padding: 0; margin: 0 0 1rem; font-size: .93rem; }
.santo-datos li { padding: .2rem 0; }
.santo-datos i { color: var(--gold-600); width: 1.4rem; }
.santo-frase {
  clear: both;
  margin: 1.4rem 0;
  padding: 1rem 1.3rem;
  border-left: 4px solid var(--gold-500);
  background: var(--surface-alt);
  border-radius: 0 12px 12px 0;
}
.santo-frase p { font-style: italic; font-size: 1.05rem; margin-bottom: .35rem; }
.santo-frase footer { font-size: .82rem; color: var(--text-soft); }
.santos-pasos { padding-left: 1.3rem; }
.santos-pasos li { margin-bottom: .7rem; }
.santos-pasos li::marker { color: var(--gold-600); font-weight: 700; }

/* ---------------------------------------------------------- */
/* Milagros eucarísticos (eucaristia.php)                       */
/* Las tarjetas reutilizan .linea-card / .linea-img de la línea  */
/* de tiempo (imagen arriba, 16:10).                             */
/* ---------------------------------------------------------- */
.milagro-card .timeline-date-tag { margin-bottom: .6rem; }
.milagro-pais { font-size: .85rem; font-weight: 400; color: var(--text-soft); }
.milagro-figura { margin: 0 0 1rem; }
.milagro-figura img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-soft);
}
.milagro-figura figcaption { font-size: .74rem; color: var(--text-soft); font-style: italic; margin-top: .45rem; line-height: 1.35; }

/* ---------------------------------------------------------- */
/* Calendario Litúrgico (calendario.php + calendario.js)        */
/* FullCalendar 6 con los colores del sitio.                    */
/* ---------------------------------------------------------- */
.calendario-hoy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.calendario-hoy-icono {
  width: 52px; height: 52px; flex: 0 0 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--maroon-800), var(--maroon-600));
  color: var(--gold-300);
  font-size: 1.3rem;
  border: 2px solid var(--gold-500);
}
.calendario-hoy .kicker { display: block; margin-bottom: .1rem; }
.calendario-hoy-texto { flex: 1 1 200px; min-width: 0; }
.calendario-hoy-titulo { font-weight: 600; color: var(--heading-color); font-size: 1.05rem; }

.calendario-marco {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
}
@media (min-width: 768px) { .calendario-marco { padding: 1.5rem; } }
.calendario-error { color: var(--accent); margin: 1rem 0 0; }

/* FullCalendar con los tokens del sitio (funciona en claro y oscuro) */
#calendario {
  --fc-border-color: var(--border-soft);
  --fc-page-bg-color: var(--surface);
  --fc-neutral-bg-color: var(--surface-alt);
  --fc-list-event-hover-bg-color: var(--surface-alt);
  --fc-today-bg-color: rgba(201, 162, 39, .14);
  --fc-button-bg-color: var(--maroon-700);
  --fc-button-border-color: var(--maroon-700);
  --fc-button-hover-bg-color: var(--maroon-800);
  --fc-button-hover-border-color: var(--maroon-800);
  --fc-button-active-bg-color: var(--maroon-900);
  --fc-button-active-border-color: var(--gold-500);
  --fc-event-border-color: transparent;
  font-size: .92rem;
}
#calendario .fc-toolbar-title { font-family: 'Playfair Display', serif; color: var(--heading-color); font-size: 1.45rem; text-transform: capitalize; }
#calendario .fc-col-header-cell-cushion,
#calendario .fc-daygrid-day-number,
#calendario .fc-list-day-text,
#calendario .fc-list-day-side-text { color: var(--heading-color); text-decoration: none; }
#calendario .fc-col-header-cell-cushion,
#calendario .fc-list-day-side-text { text-transform: capitalize; }
#calendario .fc-list-event-time { display: none; }
#calendario .lit-color-white .fc-list-event-dot { border-color: #f4ecd8 !important; box-shadow: 0 0 0 1px #c9a227; }
#calendario .fc-daygrid-day { cursor: pointer; transition: background-color .15s ease; }
#calendario .fc-daygrid-day:hover { background: var(--surface-alt); }
#calendario .fc-daygrid-day.lit-dia-white  { box-shadow: inset 0 -4px 0 #e2d4ae; }
#calendario .fc-daygrid-day.lit-dia-red    { box-shadow: inset 0 -4px 0 #b3262e; }
#calendario .fc-daygrid-day.lit-dia-green  { box-shadow: inset 0 -4px 0 #3f7d3a; }
#calendario .fc-daygrid-day.lit-dia-purple { box-shadow: inset 0 -4px 0 #6a3d8f; }
#calendario .fc-daygrid-day.lit-dia-rose   { box-shadow: inset 0 -4px 0 #d9799f; }
#calendario .lit-evento { cursor: pointer; font-size: .78rem; padding: 1px 3px; border-radius: 4px; white-space: normal; }
#calendario .fc-daygrid-event.lit-evento .fc-event-title { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#calendario .lit-grado-6 .fc-event-title,
#calendario .lit-grado-7 .fc-event-title { font-weight: 700; }
#calendario .lit-grado-2 { opacity: .85; }
#calendario .lit-precepto .fc-event-title::before { content: "\2726 "; }
#calendario .fc-list-event.lit-evento td { background: transparent; }
#calendario .fc-list-event-title a { color: var(--text-body); }
#calendario .fc-popover { background: var(--surface); border-color: var(--border-gold); }
#calendario .fc-popover-header { background: var(--surface-alt); color: var(--heading-color); }
@media (max-width: 575.98px) {
  #calendario .fc-toolbar { flex-wrap: wrap; gap: .4rem; }
  #calendario .fc-toolbar-title { font-size: 1.15rem; }
  /* Vista de mes en el teléfono: casillas angostas, texto compacto. */
  #calendario .fc-col-header-cell-cushion { font-size: .72rem; padding: 4px 0; }
  #calendario .fc-daygrid-day-number { font-size: .75rem; padding: 2px 4px; }
  #calendario .lit-evento { font-size: .62rem; line-height: 1.2; padding: 1px 2px; }
  #calendario .fc-daygrid-more-link { font-size: .62rem; }
  #calendario .fc-daygrid-day-frame { min-height: 4.2rem; }
}

.calendario-leyenda {
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem;
}
.calendario-leyenda h2 { color: var(--heading-color); }
.calendario-leyenda ul { list-style: none; padding: 0; margin: 0; }
.calendario-leyenda li { display: flex; gap: .7rem; align-items: flex-start; padding: .45rem 0; border-bottom: 1px dashed var(--border-soft); font-size: .92rem; }
.calendario-leyenda li:last-child { border-bottom: none; }
.calendario-muestra {
  display: inline-block;
  width: 1.05rem; height: 1.05rem; flex: 0 0 1.05rem;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.25);
  margin-top: .15rem;
  vertical-align: -2px;
}
.calendario-insignias { display: flex; flex-wrap: wrap; gap: .35rem; margin: .2rem 0 .6rem; }
.calendario-insignia {
  display: inline-flex; align-items: center; gap: .35rem;
  flex: 0 0 auto;
  font-size: .76rem;
  padding: .12rem .6rem;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border-gold);
  color: var(--text-soft);
  white-space: nowrap;
}
.calendario-insignia .calendario-muestra { width: .8rem; height: .8rem; flex-basis: .8rem; margin-top: 0; }
.calendario-insignia.is-rango { color: var(--accent-strong); font-weight: 600; }
.calendario-insignia.is-precepto { background: var(--maroon-700); border-color: var(--maroon-700); color: #fff; }
.calendario-insignia.is-mexico { background: #1f6b45; border-color: #1f6b45; color: #fff; }
.calendario-tiempo { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; background: var(--surface-alt); border-radius: 12px; margin-bottom: 1rem; }
.calendario-celebracion { padding: 1rem 0; border-top: 1px solid var(--border-soft); }
.calendario-celebracion:first-of-type { border-top: none; }
.calendario-celebracion-nombre { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--heading-color); margin-bottom: .3rem; }
.calendario-cita { font-style: italic; border-left: 3px solid var(--gold-500); padding-left: .8rem; }
.calendario-cita span { font-style: normal; color: var(--text-soft); font-size: .88rem; }
.calendario-evangelio { font-size: .92rem; }
.calendario-fuente a { color: inherit; text-decoration: underline; }

/* ---------------------------------------------------------- */
/* Canales católicos recomendados (referencias.php)            */
/* ---------------------------------------------------------- */
.canal-avatar { position: relative; width: 88px; height: 88px; margin-bottom: 1rem; }
.canal-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--gold-500);
  box-shadow: 0 8px 18px rgba(122,31,43,.25);
  background: var(--surface-alt);
}
.canal-avatar-yt {
  position: absolute; right: -4px; bottom: -2px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #ff0000;
  color: #fff;
  font-size: .85rem;
  border: 2px solid var(--surface);
}
/* Muerte de cada apóstol en su tarjeta (santos.php) */
.apostol-muerte {
  display: flex; gap: .5rem; align-items: flex-start;
  font-size: .86rem !important;
  padding: .55rem .7rem;
  margin-bottom: .9rem;
  background: var(--surface-alt);
  border-left: 3px solid var(--maroon-700);
  border-radius: 0 10px 10px 0;
}
.apostol-muerte i { color: var(--accent); margin-top: .2rem; font-size: .8rem; }
/* Secciones extra de un santo (p. ej. la Medalla de San Benito) */
.santo-extra { font-size: .82rem !important; color: var(--accent) !important; font-weight: 600; margin: -.2rem 0 .7rem !important; }
.santo-extra i { margin-right: .35rem; color: var(--gold-600); }
.santo-seccion { clear: both; margin-top: 1.4rem; padding-top: .4rem; border-top: 1px dashed var(--border-gold); }
.santo-subtitulo { font-family: 'Playfair Display', serif; color: var(--heading-color); font-size: 1rem; margin: 1.1rem 0 .5rem; }
.medalla-letras { list-style: none; padding: 0; margin: 0 0 .8rem; }
.medalla-letras li { padding: .4rem 0; border-bottom: 1px solid var(--border-soft); font-size: .93rem; }
.medalla-letras li:last-child { border-bottom: none; }
.medalla-letras span {
  display: inline-block; min-width: 5.6rem;
  font-family: 'Playfair Display', serif; font-weight: 700; letter-spacing: .12em;
  color: var(--accent-strong);
}
.medalla-letras em { margin-right: .3rem; }

/* ---------------------------------------------------------- */
/* Alabanzas Católicas (alabanzas.php)                         */
/* Tarjetas de artistas con el reproductor de Spotify y bloque */
/* opcional de la playlist del sitio.                          */
/* ---------------------------------------------------------- */
.artista-card { display: flex; flex-direction: column; height: 100%; }
.artista-card iframe,
.alabanzas-playlist iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  margin-top: auto;
  background: var(--surface-alt);
}
.artista-card p:last-of-type { margin-bottom: 1rem; }
.alabanzas-playlist {
  padding: 1.4rem;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border-soft, rgba(0,0,0,.08));
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
.alabanzas-playlist h3 { font-size: 1.25rem; margin-bottom: 1rem; }
.spotify-embed {
  display: flex; align-items: center; justify-content: center;
  margin-top: auto; border-radius: 12px; background: var(--surface-alt);
}
.spotify-embed a { font-weight: 600; text-decoration: none; }

/* ---------------------------------------------------------- */
/* Los Papas (papas.php)                                       */
/* Línea vertical con una sección por época y una cuadrícula   */
/* de tarjetas-botón; la ficha se abre en un único modal.      */
/* ---------------------------------------------------------- */
.papas-herramientas { margin-bottom: 2.5rem; }
.papas-buscar { position: relative; max-width: 420px; margin: 1rem auto 0; }
.papas-buscar i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--text-soft); }
.papas-buscar input { padding-left: 2.4rem; border-radius: 999px; border-color: var(--border-gold); background: var(--surface); color: var(--text-body); }
.papas-linea { position: relative; padding-left: 1.6rem; }
.papas-linea::before {
  content: ""; position: absolute; left: .45rem; top: .4rem; bottom: 0;
  width: 3px; border-radius: 3px; background: linear-gradient(var(--gold-500), var(--maroon-700));
}
.papas-era { position: relative; margin-bottom: 3rem; }
.papas-era-cabecera { position: relative; margin-bottom: 1.2rem; max-width: 760px; }
.papas-era-cabecera::before {
  content: ""; position: absolute; left: -1.62rem; top: .35rem;
  width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--maroon-700); border: 3px solid var(--gold-500);
}
.papas-era-anios { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-600); }
.papas-era-cabecera h2 { font-size: 1.6rem; margin: .15rem 0 .4rem; }
.papas-era-cabecera p { color: var(--text-soft); margin-bottom: 0; }
.papas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .9rem; }
.papa-card {
  position: relative; display: flex; flex-direction: column; align-items: stretch;
  padding: 0 0 .7rem; text-align: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px;
  overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  color: var(--text-body);
}
.papa-card:hover, .papa-card:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.1); border-color: var(--gold-500); }
.papa-foto { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface-alt); color: var(--text-soft); font-size: 2rem; }
.papa-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.papa-num {
  position: absolute; top: .45rem; left: .45rem; min-width: 2rem; padding: .1rem .4rem;
  border-radius: 999px; background: rgba(74, 15, 25, .85); color: #fff; font-size: .75rem; font-weight: 700;
}
.papa-nombre { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1rem; line-height: 1.2; margin: .6rem .5rem .15rem; color: var(--accent); }
.papa-anios { font-size: .8rem; color: var(--text-soft); }
.papa-modal-cabecera { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1rem; }
.papa-modal-foto { flex: 0 0 140px; margin: 0; }
.papa-modal-foto img { width: 140px; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.papa-modal-num { font-weight: 700; color: var(--gold-600); margin-bottom: .2rem; }
.papa-modal-anios, .papa-modal-civil { margin-bottom: .2rem; color: var(--text-soft); }
.papa-modal-bloque { margin-top: 1rem; padding: .8rem 1rem; border-radius: 0 12px 12px 0; background: var(--surface-alt); }
.papa-modal-bloque h6 { margin-bottom: .35rem; }
.papa-modal-bloque p { margin-bottom: 0; }
.papa-luces { border-left: 4px solid var(--gold-500); }
.papa-sombras { border-left: 4px solid #6c757d; }
@media (max-width: 575.98px) {
  .papas-grid { grid-template-columns: repeat(2, 1fr); gap: .7rem; }
  .papa-modal-cabecera { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------- */
/* Testimonios de conversión (testimonios.php)                 */
/* La miniatura del video se cambia por el reproductor al      */
/* tocarla.                                                     */
/* ---------------------------------------------------------- */
.testimonio-card { display: flex; flex-direction: column; height: 100%; }
.testimonio-video {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 1rem;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}
.testimonio-video img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.testimonio-video:hover img,
.testimonio-video:focus-visible img { transform: scale(1.04); }
.testimonio-video:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }
.testimonio-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.testimonio-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, .65);
  color: #fff; font-size: 1.5rem;
  padding-left: 4px;
}
.testimonio-duracion {
  position: absolute; right: 8px; bottom: 8px;
  padding: .1rem .45rem; border-radius: 6px;
  background: rgba(0, 0, 0, .75); color: #fff;
  font-size: .8rem; font-weight: 600;
}
.testimonio-antes {
  align-self: flex-start;
  margin-bottom: .6rem;
  padding: .2rem .7rem;
  border-radius: 999px;
  background: var(--surface-alt);
  font-size: .85rem; font-weight: 600;
}
.testimonio-card h3 { margin-bottom: .3rem; }
.testimonio-fuente { margin-top: auto; margin-bottom: 0; }
