/*
Theme Name: Vida en Luz
Theme URI: https://vidaenluz.org
Author: Vida en Luz
Description: Tema propio para Vida en Luz. Diseño sereno, luminoso y orientado a lectura espiritual.
Version: 1.0
Text Domain: vidaenluz
*/

:root {
  --bg: #f8f5ee;
  --paper: #ffffff;
  --text: #2e2a24;
  --muted: #6f675d;
  --gold: #b99046;
  --gold-dark: #8a672d;
  --line: #e6dccb;
  --soft: #f1eadf;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a {
  color: var(--gold-dark);
}

.site-header {
  background:
    linear-gradient(rgba(255,255,255,0.82), rgba(255,255,255,0.88)),
    radial-gradient(circle at top, #fff7df, #f4ead9 45%, #e8ddca);
  border-bottom: 1px solid var(--line);
}

.topbar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand a {
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: bold;
  text-decoration: none;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 22px;
  font-size: 0.96rem;
}

.main-nav a:hover {
  color: var(--gold-dark);
}

.hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 78px 24px 88px;
  text-align: center;
}

.hero .small {
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.05;
  margin: 0 0 22px;
  font-weight: normal;
}

.subtitle {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  color: var(--muted);
  max-width: 760px;
  margin: 0 auto 34px;
}

.buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn,
.wp-block-button__link {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  text-decoration: none;
  color: var(--gold-dark);
  background: rgba(255,255,255,0.65);
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
}

.btn.primary {
  background: var(--gold-dark);
  color: white;
  border-color: var(--gold-dark);
}

.site-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 54px 24px 80px;
}

.section {
  margin-bottom: 58px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 34px;
  box-shadow: 0 12px 35px rgba(67, 49, 23, 0.06);
}

h1, h2, h3 {
  font-weight: normal;
}

h2 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 18px;
  color: var(--gold-dark);
}

h3 {
  margin-top: 0;
  color: var(--text);
  font-size: 1.25rem;
}

p {
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

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

.mini {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
}

.muted {
  color: var(--muted);
}

.notice {
  background: var(--soft);
  border-left: 4px solid var(--gold);
  padding: 18px 22px;
  border-radius: 12px;
  color: var(--muted);
}

.quote {
  font-size: 1.35rem;
  color: var(--gold-dark);
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.entry-content {
  font-size: 1.08rem;
}

.entry-content img {
  max-width: 100%;
  height: auto;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #eee4d4;
  padding: 30px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .grid,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    display: block;
    text-align: center;
  }

  .main-nav {
    margin-top: 14px;
  }

  .main-nav a {
    display: inline-block;
    margin: 6px 9px;
  }

  .grid,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 54px 20px 62px;
  }

  .card {
    padding: 26px;
  }
}

/* Corrección menú principal WordPress */
.main-nav ul,
.main-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}

.main-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  margin-left: 0;
  display: inline-block;
}

@media (max-width: 760px) {
  .main-nav ul,
  .main-nav .menu {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 14px;
  }
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  display: inline-block;
}

/* Biblioteca y textos */

.card > h1:first-child,
.texto-cabecera h1 {
  margin-top: 0;
}

.fuente-textos,
.biblioteca-textos {
  margin-top: 28px;
}

.buscador-textos {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 28px;
}

.buscador-textos input[type="search"] {
  flex: 1 1 320px;
  max-width: 560px;
}

.filtros-biblioteca {
  display: grid;
  grid-template-columns:
    minmax(220px, 2fr)
    minmax(180px, 1fr)
    minmax(150px, 1fr)
    auto;
  align-items: end;
  gap: 16px;
  margin-top: 26px;
}

.filtros-biblioteca > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filtros-biblioteca label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: bold;
}

.buscador-textos input[type="search"],
.filtros-biblioteca input[type="search"],
.filtros-biblioteca select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.buscador-textos input[type="search"]:focus,
.filtros-biblioteca input[type="search"]:focus,
.filtros-biblioteca select:focus {
  outline: 2px solid rgba(185, 144, 70, 0.3);
  border-color: var(--gold);
}

.filtros-biblioteca .filtros-botones {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.btn {
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #fff;
}

.lista-textos {
  margin-top: 26px;
}

.lista-textos .mini {
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.lista-textos .mini h3 {
  margin-bottom: 12px;
}

.lista-textos .mini p:last-child,
.texto-datos p:last-child {
  margin-bottom: 0;
}

.post-type-archive-fuente .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-type-archive-fuente .mini {
  height: 100%;
}

.texto-completo {
  max-width: 920px;
  margin: 0 auto;
}

.texto-cabecera,
.texto-lectura,
.texto-navegacion {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.texto-cabecera {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.texto-regreso {
  margin-bottom: 12px;
}

.texto-datos {
  margin-top: 24px;
  padding: 18px 22px;
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  background: var(--soft);
}

.texto-datos p {
  margin-bottom: 6px;
}

.texto-lectura {
  padding-top: 34px;
  font-size: 1.12rem;
  line-height: 1.85;
}

.texto-lectura p {
  margin-bottom: 1.25em;
}

.texto-lectura h2,
.texto-lectura h3 {
  margin-top: 1.7em;
}

.texto-lectura blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--gold);
  color: var(--muted);
}

.texto-navegacion {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.paginacion-textos {
  margin-top: 30px;
  text-align: center;
}

.paginacion-textos .page-numbers {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  margin: 3px;
  padding: 7px 12px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
}

.paginacion-textos .current,
.paginacion-textos a:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #fff;
}

@media (max-width: 900px) {
  .filtros-biblioteca {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .site-main {
    padding: 34px 14px 56px;
  }

  .card {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .card h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .card h2 {
    font-size: 1.65rem;
  }

  .filtros-biblioteca {
    grid-template-columns: 1fr;
  }

  .buscador-textos {
    display: grid;
    grid-template-columns: 1fr;
  }

  .buscador-textos input[type="search"] {
    min-width: 0;
    max-width: none;
  }

  .buscador-textos .btn,
  .filtros-biblioteca .filtros-botones,
  .filtros-biblioteca .btn,
  .texto-navegacion .btn {
    width: 100%;
    text-align: center;
  }

  .filtros-biblioteca .filtros-botones,
  .texto-navegacion {
    flex-direction: column;
    align-items: stretch;
  }

  .post-type-archive-fuente .grid {
    grid-template-columns: 1fr;
  }

  .lista-textos .mini {
    min-height: 0;
  }

  .texto-datos {
    padding: 16px 18px;
  }

  .texto-lectura {
    font-size: 1.05rem;
    line-height: 1.75;
  }
}

/* Título en mayúsculas solamente dentro del texto completo */
.texto-completo .texto-cabecera h1 {
  text-transform: uppercase;
}

/* Archivo de textos de Hans Dienstknecht */

.archivo-hans-cabecera {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.archivo-hans-cabecera h2 {
  margin-bottom: 0;
}

.archivo-hans-etiqueta {
  margin-bottom: 5px;
  color: var(--gold-dark);
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.buscador-hans {
  display: flex;
  align-items: center;
  gap: 10px;
}

.buscador-hans input[type="search"] {
  width: min(320px, 34vw);
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.buscador-hans input[type="search"]:focus {
  outline: 2px solid rgba(185, 144, 70, 0.3);
  border-color: var(--gold);
}

.archivo-hans {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.anios-hans {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.anios-hans h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.anio-hans {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}

.anio-hans:hover,
.anio-hans.actual {
  background: var(--soft);
  color: var(--gold-dark);
}

.anio-hans.actual {
  box-shadow: inset 3px 0 0 var(--gold);
  font-weight: bold;
}

.anio-hans-cantidad {
  display: inline-flex;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 0.75rem;
}

.titulo-anio-hans {
  margin: 0 0 15px;
  color: var(--text);
  font-size: 1.45rem;
}

.lista-hans {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.fila-hans {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 72px;
  gap: 18px;
  align-items: center;
  min-height: 62px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.18s ease;
}

.fila-hans:nth-child(odd) {
  background: rgba(241, 234, 223, 0.52);
}

.fila-hans:last-child {
  border-bottom: 0;
}

.fila-hans:hover,
.fila-hans:focus-visible {
  background: var(--soft);
  outline: none;
}

.fecha-hans {
  color: var(--muted);
  font-size: 0.94rem;
}

.titulo-texto-hans {
  font-size: 1.04rem;
}

.fila-hans:hover .titulo-texto-hans,
.fila-hans:focus-visible .titulo-texto-hans {
  color: var(--gold-dark);
}

.leer-hans {
  color: var(--gold-dark);
  font-family: Arial, sans-serif;
  font-size: 0.88rem;
  text-align: right;
}

@media (max-width: 900px) {
  .archivo-hans-cabecera {
    display: block;
  }

  .buscador-hans {
    margin-top: 20px;
  }

  .archivo-hans {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .anios-hans {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .anios-hans h3 {
    width: 100%;
  }

  .anio-hans {
    min-width: 105px;
    border: 1px solid var(--line);
  }

  .anio-hans.actual {
    box-shadow: none;
    border-color: var(--gold);
  }
}

@media (max-width: 760px) {
  .buscador-hans {
    display: grid;
    grid-template-columns: 1fr;
  }

  .buscador-hans input[type="search"],
  .buscador-hans .btn {
    width: 100%;
  }

  .fila-hans {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 14px;
    padding: 14px 16px;
  }

  .fecha-hans {
    grid-column: 1 / -1;
  }

  .titulo-texto-hans {
    line-height: 1.45;
  }
}

/* === VEL_COMENZAR_AQUI_INICIO === */

.vel-comenzar {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 44px 22px 76px;
    background: #f8f5ee;
    color: #30291f;
}

.vel-comenzar *,
.vel-comenzar *::before,
.vel-comenzar *::after {
    box-sizing: border-box;
}

.vel-comenzar-contenedor {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

.vel-comenzar-hero,
.vel-comenzar-origen,
.vel-comenzar-accion,
.vel-comenzar-cierre {
    background: #ffffff;
    border: 1px solid #e5d6bc;
    border-radius: 18px;
}

.vel-comenzar-hero {
    padding: clamp(30px, 5vw, 58px);
    box-shadow: 0 18px 45px rgba(77, 57, 30, 0.06);
}

.vel-comenzar-etiqueta {
    margin: 0 0 12px;
    color: #95661f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.vel-comenzar h1 {
    margin: 0;
    color: #2e281f;
    font-size: clamp(2.5rem, 6vw, 4.4rem);
    line-height: 1.05;
}

.vel-comenzar-lead {
    margin: 18px 0 30px;
    color: #95661f;
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    line-height: 1.5;
}

.vel-comenzar-preguntas {
    max-width: 850px;
    font-size: 1.04rem;
    line-height: 1.8;
}

.vel-comenzar-preguntas p {
    margin: 0 0 17px;
}

.vel-comenzar-biblia {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 30px;
    padding: 22px 24px;
    background: #f3ecdf;
    border-left: 4px solid #b78331;
    border-radius: 12px;
}

.vel-comenzar-biblia p {
    max-width: 760px;
    margin: 0;
    line-height: 1.7;
}

.vel-comenzar-biblia a {
    flex: 0 0 auto;
    color: #8b5d19;
    font-weight: 700;
    text-decoration: none;
}

.vel-comenzar-biblia a:hover,
.vel-comenzar-biblia a:focus {
    text-decoration: underline;
}

.vel-comenzar-seccion {
    padding: 58px 0 0;
}

.vel-comenzar-seccion > h2,
.vel-comenzar-origen h2 {
    margin: 0 0 26px;
    color: #95661f;
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    line-height: 1.2;
}

.vel-comenzar-pasos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.vel-comenzar-paso {
    position: relative;
    padding: 30px 26px;
    background: #ffffff;
    border: 1px solid #e5d6bc;
    border-radius: 16px;
}

.vel-comenzar-numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 20px;
    color: #ffffff;
    background: #9a6a24;
    border-radius: 50%;
    font-weight: 700;
}

.vel-comenzar-paso h3,
.vel-comenzar-accion h3 {
    margin: 0 0 13px;
    color: #2f291f;
    font-size: 1.25rem;
}

.vel-comenzar-paso p,
.vel-comenzar-accion p {
    margin: 0;
    line-height: 1.7;
}

.vel-comenzar-origen {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.5fr);
    gap: 42px;
    margin-top: 58px;
    padding: clamp(28px, 5vw, 48px);
}

.vel-comenzar-origen h2 {
    margin-bottom: 0;
}

.vel-comenzar-origen-texto {
    line-height: 1.75;
}

.vel-comenzar-origen-texto p {
    margin: 0 0 18px;
}

.vel-comenzar-origen-texto p:last-child {
    margin-bottom: 0;
}

.vel-comenzar-siguiente {
    padding-top: 58px;
}

.vel-comenzar-acciones {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.vel-comenzar-accion {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 32px;
}

.vel-comenzar-accion-destacada {
    background: #f3ecdf;
    border-color: #d7ba87;
}

.vel-comenzar-fuentes {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 24px 0;
}

.vel-comenzar-fuentes a {
    padding: 7px 12px;
    color: #754d15;
    background: #f8f5ee;
    border: 1px solid #ddc9a8;
    border-radius: 999px;
    font-size: 0.9rem;
    text-decoration: none;
}

.vel-comenzar-fuentes a:hover,
.vel-comenzar-fuentes a:focus {
    background: #eee2cf;
}

.vel-comenzar-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding: 12px 20px;
    color: #ffffff !important;
    background: #95661f;
    border: 1px solid #95661f;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none !important;
}

.vel-comenzar-boton:hover,
.vel-comenzar-boton:focus {
    color: #ffffff !important;
    background: #744a13;
    border-color: #744a13;
}

.vel-comenzar-boton-secundario {
    color: #855817 !important;
    background: transparent;
}

.vel-comenzar-boton-secundario:hover,
.vel-comenzar-boton-secundario:focus {
    color: #ffffff !important;
}

.vel-comenzar-cierre {
    max-width: 820px;
    margin: 50px auto 0;
    padding: 25px 30px;
    text-align: center;
}

.vel-comenzar-cierre p {
    margin: 0;
    color: #7c541a;
    font-size: 1.08rem;
    line-height: 1.75;
}

@media (max-width: 820px) {
    .vel-comenzar-pasos,
    .vel-comenzar-acciones,
    .vel-comenzar-origen {
        grid-template-columns: 1fr;
    }

    .vel-comenzar-origen {
        gap: 22px;
    }

    .vel-comenzar-biblia {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 540px) {
    .vel-comenzar {
        padding: 26px 14px 54px;
    }

    .vel-comenzar-hero,
    .vel-comenzar-origen,
    .vel-comenzar-accion {
        padding: 25px 21px;
    }

    .vel-comenzar-paso {
        padding: 25px 21px;
    }
}

/* === VEL_COMENZAR_AQUI_FIN === */

/* Vida en Luz: fuentes 3+2 y accesos Biblioteca/Música */

.fuentes-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.fuentes-grid > .mini {
  grid-column: span 2;
  min-width: 0;
}

.fuentes-grid > .mini:nth-child(4):nth-last-child(2),
.fuentes-grid > .mini:nth-child(5):last-child {
  grid-column: span 3;
}

.home-access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.home-access-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 34px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 35px rgba(67, 49, 23, 0.06);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.home-access-card:hover,
.home-access-card:focus-visible {
  color: var(--text);
  border-color: var(--gold);
  box-shadow: 0 16px 38px rgba(67, 49, 23, 0.11);
  transform: translateY(-3px);
}

.home-access-card:focus-visible {
  outline: 3px solid rgba(185, 144, 70, 0.28);
  outline-offset: 3px;
}

.home-access-kicker {
  margin-bottom: 10px;
  color: var(--gold-dark);
  font-size: 0.78rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-access-card h2 {
  margin-bottom: 14px;
}

.home-access-card p {
  line-height: 1.7;
}

.home-access-link {
  margin-top: auto;
  padding-top: 14px;
  color: var(--gold-dark);
  font-weight: bold;
}

@media (max-width: 900px) {
  .fuentes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fuentes-grid > .mini,
  .fuentes-grid > .mini:nth-child(4):nth-last-child(2),
  .fuentes-grid > .mini:nth-child(5):last-child {
    grid-column: auto;
  }

  .fuentes-grid > .mini:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .fuentes-grid,
  .home-access-grid {
    grid-template-columns: 1fr;
  }

  .fuentes-grid > .mini:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .home-access-card {
    min-height: 0;
    padding: 26px;
  }
}

/* Vida en Luz: enlace del título Comenzar aquí */
.inicio-titulo-enlace {
  color: inherit;
  text-decoration: none;
}

.inicio-titulo-enlace:hover,
.inicio-titulo-enlace:focus-visible {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* VIDA EN LUZ: PROLOGO Y EPILOGO SAMUEL */
.samuel-editorial {
  margin: 0 0 2rem;
  padding: clamp(1.3rem, 2.5vw, 2rem);
  color: #3c2b1e;
  background: #fbf7ef;
  border: 1px solid #e4cfad;
  border-radius: 18px;
}

.samuel-editorial--epilogo {
  margin-top: 2.2rem;
  margin-bottom: 0;
}

.samuel-editorial-etiqueta {
  margin: 0 0 .55rem;
  color: #98600f;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.samuel-editorial .samuel-editorial-titulo {
  margin: 0 0 1.25rem;
  color: #7f4c05;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  line-height: 1.15;
}

.samuel-editorial-texto {
  max-width: 78ch;
  font-size: 1rem;
  line-height: 1.78;
}

.samuel-editorial-texto > p {
  margin: 0 0 1.1rem;
}

.samuel-editorial-texto > p:last-child {
  margin-bottom: 0;
}

.samuel-editorial-cita {
  margin: 1.4rem 0;
  padding: 1.05rem 1.2rem;
  color: #493421;
  background: rgba(255, 255, 255, .72);
  border-left: 3px solid #b67a24;
  border-radius: 0 12px 12px 0;
}

.samuel-editorial-cita p {
  margin: 0 0 1rem;
}

.samuel-editorial-cita p:last-child {
  margin-bottom: 0;
}

.samuel-editorial-cierre {
  padding-top: .35rem;
  color: #7f4c05;
  line-height: 1.8;
  text-align: center;
}

@media (max-width: 640px) {
  .samuel-editorial {
    padding: 1.15rem;
    border-radius: 15px;
  }

  .samuel-editorial-texto {
    font-size: .97rem;
    line-height: 1.7;
  }

  .samuel-editorial-cita {
    padding: .95rem 1rem;
  }
}
/* FIN VIDA EN LUZ: PROLOGO Y EPILOGO SAMUEL */

/* VIDA EN LUZ: SISTEMA DE LIBROS v1.0.0 */
.vel-fuente-presentacion,
.vel-libro-cabecera {
  margin-bottom: 1.5rem;
}

.vel-libro-etiqueta {
  margin: 0 0 .6rem;
  color: #98600f;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.vel-libros-seccion {
  margin-top: 1.5rem;
}

.vel-libros-cabecera {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}

.vel-libros-cabecera h2 {
  margin: 0;
}

.vel-libros-cantidad {
  margin: 0 0 .25rem;
  color: #796b5d;
  white-space: nowrap;
}

.vel-libros-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}

.vel-libro-card {
  overflow: hidden;
  background: #fffdf9;
  border: 1px solid #e3cfad;
  border-radius: 18px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.vel-libro-card:hover,
.vel-libro-card:focus-within {
  border-color: #c7954b;
  box-shadow: 0 12px 28px rgba(92, 62, 25, .10);
  transform: translateY(-2px);
}

.vel-libro-card-enlace {
  display: grid;
  grid-template-columns: minmax(145px, 32%) 1fr;
  min-height: 285px;
  color: inherit;
  text-decoration: none;
}

.vel-libro-portada {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1rem;
  color: #fff9ee;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 235, 189, .28), transparent 36%),
    linear-gradient(155deg, #9a651d, #5f390c);
  text-align: center;
}

.vel-libro-portada::before {
  content: "✦";
  color: #f5d798;
  font-size: 1.1rem;
}

.vel-libro-portada span {
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vel-libro-portada strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 400;
  line-height: 1.15;
}

.vel-libro-portada--imagen {
  display: block;
  padding: 0;
  background: #eee4d4;
}

.vel-libro-portada--imagen::before {
  display: none;
}

.vel-libro-portada--imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vel-libro-card-contenido {
  display: flex;
  flex-direction: column;
  padding: 1.55rem;
}

.vel-libro-card-meta {
  margin: 0 0 .65rem;
  color: #98600f;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.vel-libro-card h3 {
  margin: 0 0 .8rem;
  color: #6f4308;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.18;
}

.vel-libro-card-contenido > p:not(.vel-libro-card-meta):not(.vel-libro-estructura) {
  margin: 0 0 1rem;
  color: #55493e;
  line-height: 1.6;
}

.vel-libro-estructura {
  margin: auto 0 .9rem;
  color: #7f7060;
  font-size: .9rem;
}

.vel-libro-abrir {
  color: #8a5307;
  font-weight: 700;
}

.vel-migas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1rem;
  color: #827464;
  font-size: .9rem;
}

.vel-migas a,
.vel-volver-autor a {
  color: #8a5307;
}

.vel-libro-cabecera h1 {
  margin-top: 0;
}

.vel-libro-archivo {
  margin-top: 1.5rem;
}

.vel-libro-indice .vel-indice-seccion {
  font-weight: 600;
}

.vel-libro-contenido .samuel-editorial {
  margin-top: 0;
}

.vel-volver-autor {
  margin: 1.7rem 0 0;
  padding-top: 1.15rem;
  border-top: 1px solid #eadbc3;
  font-size: .94rem;
}

@media (max-width: 850px) {
  .vel-libros-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .vel-libros-cabecera {
    align-items: flex-start;
    flex-direction: column;
    gap: .4rem;
  }

  .vel-libro-card-enlace {
    grid-template-columns: 105px 1fr;
    min-height: 235px;
  }

  .vel-libro-portada {
    padding: 1rem .65rem;
  }

  .vel-libro-portada strong {
    font-size: 1.2rem;
  }

  .vel-libro-card-contenido {
    padding: 1.15rem;
  }
}
/* FIN VIDA EN LUZ: SISTEMA DE LIBROS */
