/* ================================================================
   ESTILOS GLOBALES – ICAC
   Variables, reset, tipografía, header, footer, botones, etc.
   ================================================================ */

/* ---------- Variables (paleta refinada) ---------- */
:root {
  --verde:       #1a3a2a;
  --verde-medio: #2e5c42;
  --verde-claro: #3d7a58;
  --oro:         #b8962e;
  --oro-claro:   #d4af5a;
  --crema:       #f7f3ec;
  --crema-osc:   #e5dccc;
  --blanco:      #ffffff;
  --texto:       #1e1e1e;
  --texto-suave: #4a4a4a;
  --sombra:      0 4px 20px rgba(26,58,42,0.12);
  --fuente-serif: 'IM Fell English', serif;
  --fuente-sans:  'Source Sans 3', sans-serif;
  --radio:        6px;
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--fuente-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--texto);
  background: var(--crema);
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--verde);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--oro); }

/* ---------- Contenedor ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Encabezados ---------- */
h1, h2, h3, h4 {
  font-family: var(--fuente-serif);
  color: var(--verde);
  line-height: 1.2;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: 2rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }

.seccion-titulo {
  font-family: var(--fuente-serif);
  color: var(--verde);
  font-size: 2rem;
}
.divisor-oro {
  width: 48px;
  height: 3px;
  background: var(--oro);
  margin: 0.8rem 0 1.8rem 0;
}

/* ---------- BANNER DE PÁGINA ---------- */
.banner-pagina {
  background: var(--verde);
  padding: 60px 0 48px;
  position: relative;
  overflow: hidden;
}
.banner-pagina::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 85% 50%, rgba(184,150,46,0.08) 0%, transparent 65%);
  pointer-events: none;
}
.banner-pagina .container {
  position: relative;
  z-index: 1;
}
.banner-eyebrow {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--oro);
  margin-bottom: 12px;
  font-weight: 600;
}
.banner-titulo {
  font-family: var(--fuente-serif);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: var(--crema);
  line-height: 1.1;
  margin-bottom: 12px;
}
.banner-descripcion {
  font-size: 1.05rem;
  color: rgba(247,243,236,0.8);
  max-width: 640px;
  line-height: 1.6;
}

/* ---------- HEADER (menú principal) ---------- */
.site-header {
  background: var(--verde);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.header-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--oro-claro);
  font-family: var(--fuente-serif);
  font-size: 1.4rem;
}
.logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.logo-texto { font-size: 1.4rem; }

/* Hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger-line {
  width: 28px;
  height: 3px;
  background: var(--oro-claro);
  border-radius: 2px;
  transition: 0.3s ease;
}
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Navegación */
.header-nav { display: flex; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}
.nav-link {
  color: rgba(247,243,236,0.85);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav-link:hover,
.nav-link:focus {
  color: var(--oro-claro);
  border-bottom-color: var(--oro);
}

/* Botones especiales en el menú */
.nav-donar .btn-donar {
  background: var(--oro);
  color: var(--verde);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.2s, transform 0.15s;
}
.nav-donar .btn-donar:hover {
  background: var(--oro-claro);
  transform: scale(1.04);
}
.nav-clero .btn-clero {
  border: 1.5px solid var(--oro);
  color: var(--oro);
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.2s, color 0.2s;
}
.nav-clero .btn-clero:hover {
  background: var(--oro);
  color: var(--verde);
}

/* ---------- RESPONSIVE MENÚ (móvil) ---------- */
@media (max-width: 860px) {
  .hamburger { display: flex; }
  .header-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    background: var(--verde);
    padding: 20px 0;
    margin-top: 12px;
    border-top: 1px solid rgba(184,150,46,0.2);
  }
  .header-nav.abierto { display: flex; }
  .nav-list {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  .nav-list li { width: 100%; text-align: center; }
  .nav-link { display: block; padding: 8px 0; }
  .nav-donar .btn-donar,
  .nav-clero .btn-clero {
    display: inline-block;
    width: auto;
    margin: 4px auto;
  }
}

/* ---------- SUBMENÚS ---------- */
.menu-item-has-children { position: relative; }
.submenu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: rgba(247,243,236,0.6);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0;
  transition: transform 0.2s;
}
.submenu-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
.submenu-toggle[aria-expanded="true"] {
  transform: rotate(180deg);
  color: var(--oro-claro);
}
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--verde);
  padding: 8px 0;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  list-style: none;
  z-index: 100;
}
.sub-menu li { width: 100%; }
.sub-menu a {
  display: block;
  padding: 8px 20px;
  color: rgba(247,243,236,0.85);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border-left: 3px solid transparent;
}
.sub-menu a:hover,
.sub-menu a:focus {
  background: rgba(184,150,46,0.15);
  color: var(--oro-claro);
  border-left-color: var(--oro);
}

@media (min-width: 861px) {
  .submenu-toggle { display: none !important; }
  .menu-item-has-children:hover > .sub-menu,
  .menu-item-has-children:focus-within > .sub-menu {
    display: block;
  }
  .menu-item-has-children:hover > .nav-link,
  .menu-item-has-children:focus-within > .nav-link {
    color: var(--oro-claro);
  }
}
@media (max-width: 860px) {
  .submenu-toggle { display: block; }
  .menu-item-has-children {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .menu-item-has-children > a { flex: 1; }
  .sub-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    padding-left: 16px;
    background: rgba(255,255,255,0.05);
  }
  .sub-menu a {
    padding: 6px 16px;
    font-size: 0.8rem;
    border-left: 2px solid rgba(184,150,46,0.2);
  }
  .sub-menu a:hover { border-left-color: var(--oro); }
  .sub-menu.abierto { display: block; }
}
@media (max-width: 480px) {
  .sub-menu a { font-size: 0.75rem; padding: 5px 12px; }
}

/* ---------- BOTÓN WHATSAPP FLOTANTE ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: #25d366;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  color: #fff;
}
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
  background: #20b85a;
}
.whatsapp-float svg {
  width: 36px;
  height: 36px;
  fill: #fff;
}
.whatsapp-tooltip {
  position: absolute;
  right: 72px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; }
@media (max-width: 480px) {
  .whatsapp-float {
    width: 56px;
    height: 56px;
    bottom: 16px;
    right: 16px;
  }
  .whatsapp-float svg { width: 30px; height: 30px; }
  .whatsapp-tooltip { display: none; }
}

/* ============================================================
   FOOTER DEFINITIVO
   ============================================================ */

.site-footer {
  background: var(--verde);
  color: rgba(247,243,236,0.8);
  padding: 48px 0 0;
  margin-top: 48px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(184,150,46,0.2);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.footer-logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.footer-logo-texto {
  font-family: var(--fuente-serif);
  font-size: 1.4rem;
  color: var(--oro-claro);
}
.footer-descripcion {
  font-size: 0.9rem;
  color: rgba(247,243,236,0.75);
  line-height: 1.6;
  margin-bottom: 4px;
}
.footer-lema {
  font-style: italic;
  color: var(--oro-claro);
}
.footer-texto {
  font-size: 0.85rem;
  color: rgba(247,243,236,0.65);
  margin-bottom: 14px;
  line-height: 1.5;
}
.btn-footer-donar {
  display: inline-block;
  background: var(--oro);
  color: var(--verde);
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.btn-footer-donar:hover {
  background: var(--oro-claro);
  transform: scale(1.03);
}

.footer-col h4 {
  color: var(--oro-claro);
  font-family: var(--fuente-serif);
  font-size: 1rem;
  margin-bottom: 14px;
  letter-spacing: 0.06em;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 6px;
}
.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(247,243,236,0.75);
  transition: color 0.2s;
  text-decoration: none;
}
.footer-col ul li a:hover {
  color: var(--oro-claro);
}

.footer-contacto-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(247,243,236,0.75);
  margin-bottom: 10px;
  line-height: 1.5;
}
.footer-contacto-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: var(--oro);
  stroke-width: 1.5;
}
.footer-contacto-item a {
  color: rgba(247,243,236,0.75);
  text-decoration: none;
}
.footer-contacto-item a:hover {
  color: var(--oro-claro);
}

.footer-redes {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.red-social {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(184,150,46,0.3);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--oro-claro);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.red-social:hover {
  background: var(--oro);
  color: var(--verde);
  border-color: var(--oro);
}


.footer-bottom {
  background: rgba(0,0,0,0.2);
  padding: 16px 0;
  margin-top: 12px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(247,243,236,0.5);
}
.footer-bottom p {
  margin: 0;
}

.footer-bottom .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-legal-links {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-legal-links a {
  font-size: 0.7rem;
  color: rgba(247,243,236,0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-legal-links a:hover {
  color: var(--oro-claro);
}
.footer-legal-links span {
  font-size: 0.6rem;
  color: rgba(247,243,236,0.25);
}

.footer-social {
  display: flex;
  gap: 12px;
  margin: 12px 0 16px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(184,150,46,0.25);
  color: rgba(247,243,236,0.7);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  text-decoration: none;
}
.footer-social a:hover {
  background: var(--oro);
  color: var(--verde);
  border-color: var(--oro);
  transform: scale(1.05);
}
.footer-social a svg {
  width: 18px;
  height: 18px;
  display: block;
}

@media (max-width: 860px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-col-marca {
    grid-column: 1 / -1;
    text-align: center;
  }
  .footer-logo {
    justify-content: center;
  }
  .footer-col-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
  }
  .footer-col-nav ul li {
    margin-bottom: 0;
  }
}
@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-logo {
    justify-content: center;
  }
  .footer-col-nav ul {
    flex-direction: column;
    align-items: center;
  }
  .footer-contacto-item {
    justify-content: center;
  }
  .footer-redes {
    justify-content: center;
  }
  .footer-legal-links {
    gap: 8px;
  }
  .footer-legal-links a {
    font-size: 0.6rem;
  }
}

/* ---------- UTILIDADES ---------- */
.seccion { padding: 64px 0; }
.seccion-alt { background: var(--blanco); }
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}
.btn-oro {
  background: var(--oro);
  color: var(--verde);
}
.btn-oro:hover {
  background: var(--oro-claro);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(184,150,46,0.3);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--oro);
  color: var(--oro);
}
.btn-outline:hover {
  background: var(--oro);
  color: var(--verde);
}
.text-center { text-align: center; }

/* ---------- REFLEXIÓN (Palabra de fe) ---------- */
.reflexion-card {
  background: rgba(26, 58, 42, 0.85);
  border-left: 4px solid var(--oro);
  padding: 32px 36px;
  border-radius: 8px;
  max-width: 720px;
  margin: 0 auto;
}
.reflexion-card h3 {
  font-family: var(--fuente-serif);
  color: var(--oro-claro);
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.reflexion-card p {
  color: #ffffff !important;
  font-size: 1.05rem;
  line-height: 1.7;
  font-style: italic;
}
.reflexion-card footer {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  text-align: right;
}

/* ---------- CITA ---------- */
.cita-seccion {
  background: var(--verde);
  padding: 64px 0;
  text-align: center;
}
.cita-ornamento {
  font-family: var(--fuente-serif);
  font-size: 4rem;
  color: rgba(184,150,46,0.2);
  line-height: 0.5;
  margin-bottom: 8px;
}
.cita {
  font-family: var(--fuente-serif);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-style: italic;
  color: var(--crema);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
}
.cita cite {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: rgba(247,243,236,0.5);
  margin-top: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ================================================================
   ESTILOS DE PORTADA (index.php)
   ================================================================ */

/* ── CARRUSEL / HERO ── */
.carrusel {
  position: relative;
  min-height: 56vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--verde);
}
.carrusel-fondo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  transition: background-image 0.8s ease-in-out;
  filter: brightness(0.45);
  z-index: 0;
}
.carrusel-pista {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 40px 0;
}
.diapositiva {
  display: none;
  animation: fadeIn 0.8s ease;
}
.diapositiva.activa {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.diap-categoria {
  display: inline-block;
  background: rgba(184,150,46,0.2);
  border: 1px solid rgba(184,150,46,0.4);
  color: var(--oro-claro);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}
.diap-fecha {
  font-size: 0.8rem;
  color: rgba(247,243,236,0.6);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}
.diap-titulo {
  font-family: var(--fuente-serif);
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  color: var(--crema);
  line-height: 1.1;
  max-width: 700px;
  margin-bottom: 16px;
}
.diap-texto {
  font-size: 1.1rem;
  color: rgba(247,243,236,0.85);
  max-width: 560px;
  margin-bottom: 28px;
  line-height: 1.6;
}
.diap-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.carrusel-indicador {
  position: absolute;
  bottom: 100px;
  right: 40px;
  color: rgba(247,243,236,0.5);
  font-family: var(--fuente-serif);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  z-index: 2;
}
.carrusel-progreso {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--oro);
  width: 25%;
  z-index: 2;
  transition: width 0.8s ease;
}
.carrusel-bajar {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(247,243,236,0.4);
  z-index: 2;
  animation: bounce 2s infinite;
  transition: color 0.2s;
}
.carrusel-bajar:hover { color: var(--crema); }
.carrusel-bajar svg { width: 28px; height: 28px; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}
.carrusel-controles {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 2;
}
.carrusel-flecha {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--crema);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0;
}
.carrusel-flecha:hover { background: rgba(184,150,46,0.3); }
.carrusel-flecha svg { width: 18px; height: 18px; }
.carrusel-puntos {
  display: flex;
  gap: 8px;
}
.carrusel-punto {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.carrusel-punto.activo {
  background: var(--oro);
  transform: scale(1.2);
}
@media (max-width: 768px) {
  .carrusel { min-height: 60vh; }
  .carrusel-indicador { bottom: 80px; right: 20px; font-size: 0.75rem; }
  .carrusel-controles { bottom: 20px; gap: 12px; }
  .carrusel-flecha { width: 34px; height: 34px; }
}

/* ── ACERCA (escudo + texto) ── */
.acerca-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: center;
}
.acerca-img img {
  max-width: 100%;
  height: auto;
  background: var(--crema);
  padding: 20px;
  border-radius: 8px;
}
@media (max-width: 768px) {
  .acerca-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .acerca-img {
    order: -1;
    max-width: 180px;
    margin: 0 auto;
  }
  .acerca-texto p {
    text-align: left;
  }
  .divisor-oro {
    margin-left: 0;
    margin-right: auto;
  }
}

/* ── OBISPO + VOCACIÓN ── */
.obispo-seccion {
  background: var(--verde);
  padding: 64px 0;
}
.obispo-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 48px;
}
.obispo-foto-wrap {
  text-align: center;
}
.obispo-foto {
  width: 100%;
  max-width: 200px;
  border-radius: 50%;
  border: 3px solid rgba(184,150,46,0.3);
  aspect-ratio: 1/1;
  object-fit: cover;
}
.obispo-nombre {
  color: var(--oro-claro);
  font-family: var(--fuente-serif);
  font-size: 1.1rem;
  margin-top: 8px;
}
.obispo-titulo {
  color: rgba(247,243,236,0.6);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}
.obispo-mensaje {
  font-family: var(--fuente-serif);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--crema);
  line-height: 1.5;
  font-style: italic;
  margin-bottom: 16px;
}
.obispo-firma {
  color: rgba(247,243,236,0.5);
  font-size: 0.85rem;
}
@media (max-width: 768px) {
  .obispo-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .obispo-foto-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .obispo-foto {
    max-width: 160px;
  }
  .obispo-mensaje {
    text-align: center;
  }
  .obispo-firma {
    text-align: center;
  }
}

.vocacion-bloque {
  background: var(--verde-claro);
  border-radius: 8px;
  padding: 32px;
  margin-top: 16px;
}
.vocacion-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: center;
}
.vocacion-imagen img {
  width: 100%;
  border-radius: 8px;
  display: block;
}
.vocacion-texto h3 {
  font-family: var(--fuente-serif);
  color: var(--oro-claro);
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.vocacion-texto p {
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
}
.btn-vocacion {
  background: var(--oro);
  color: var(--verde);
  padding: 14px 40px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  display: inline-block;
  transition: background 0.2s, transform 0.2s;
}
.btn-vocacion:hover {
  background: var(--oro-claro);
  transform: scale(1.02);
}
@media (max-width: 768px) {
  .vocacion-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .vocacion-imagen {
    max-width: 160px;
    margin: 0 auto;
  }
}

/* ── ESTADÍSTICAS ── */
.stats-band {
  background: var(--verde-medio);
  padding: 32px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-num {
  font-family: var(--fuente-serif);
  font-size: 2.4rem;
  color: var(--oro-claro);
  line-height: 1.2;
}
.stat-label {
  font-size: 0.8rem;
  color: rgba(247,243,236,0.7);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* ── EVENTO DESTACADO ── */
.evento-banda {
  background: var(--crema);
  padding: 24px 0;
  border-top: 1px solid var(--crema-osc);
  border-bottom: 1px solid var(--crema-osc);
}
.evento-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.evento-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oro);
  font-weight: 600;
}
.evento-separador {
  width: 2px;
  height: 32px;
  background: var(--crema-osc);
}
.evento-fecha {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.evento-dia-num {
  font-family: var(--fuente-serif);
  font-size: 1.6rem;
  color: var(--verde);
  line-height: 1;
}
.evento-dia-mes {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--texto-suave);
}
.evento-nombre {
  font-family: var(--fuente-serif);
  color: var(--verde);
  font-size: 1rem;
  margin-bottom: 2px;
}
.evento-detalle {
  font-size: 0.85rem;
  color: var(--texto-suave);
}
@media (max-width: 600px) {
  .evento-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
  .evento-separador { display: none; }
  .evento-fecha {
    flex-direction: column;
    align-items: flex-start;
  }
  .evento-inner .btn-oro {
    margin-left: 0;
    align-self: flex-start;
  }
}

/* ── TARJETAS (Vida de la Iglesia) ── */
.tarjetas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.tarjeta-simple {
  background: var(--blanco);
  border: 1px solid var(--crema-osc);
  border-radius: 8px;
  padding: 28px 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tarjeta-simple:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra);
}
.tarjeta-titulo {
  font-family: var(--fuente-serif);
  color: var(--verde);
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.tarjeta-texto {
  font-size: 0.92rem;
  color: var(--texto-suave);
  margin-bottom: 16px;
}
.enlace-texto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--verde-claro);
  font-size: 0.85rem;
}
.enlace-texto svg {
  width: 14px;
  height: 14px;
}
.enlace-texto:hover {
  color: var(--oro);
}

/* ── TESTIMONIOS ── */
.testimonios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.testimonio {
  background: var(--blanco);
  border: 1px solid var(--crema-osc);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}
.testimonio blockquote {
  font-family: var(--fuente-serif);
  font-style: italic;
  color: var(--texto);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 12px;
}
.testimonio footer {
  font-size: 0.85rem;
  color: var(--texto-suave);
  font-weight: 600;
}

/* ── GALERÍA MINI ── */
.galeria-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.galeria-mini img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.galeria-mini img:hover {
  transform: scale(1.02);
  box-shadow: var(--sombra);
}
@media (max-width: 600px) {
  .galeria-mini { grid-template-columns: 1fr 1fr; }
}

/* ── PODCAST ── */
.podcast-placeholder {
  text-align: center;
  background: var(--blanco);
  border: 2px dashed var(--crema-osc);
  border-radius: 12px;
  padding: 48px 24px;
  max-width: 560px;
  margin: 0 auto;
}
.podcast-placeholder p {
  color: var(--texto-suave);
}

/* ── FORMULARIO DE ORACIÓN ── */
.form-oracion {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-oracion label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--verde);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.form-oracion input,
.form-oracion textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--crema-osc);
  border-radius: 6px;
  font-family: var(--fuente-sans);
  font-size: 1rem;
  background: var(--blanco);
  transition: border-color 0.2s;
}
.form-oracion input:focus,
.form-oracion textarea:focus {
  border-color: var(--verde);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26,58,42,0.1);
}
.form-oracion textarea {
  min-height: 120px;
  resize: vertical;
}

/* ── ENLACES IMPORTANTES ── */
.enlaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.enlace-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 12px;
  background: var(--blanco);
  border: 1px solid var(--crema-osc);
  border-radius: 8px;
  font-weight: 600;
  color: var(--verde);
  text-align: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  font-size: 0.9rem;
}
.enlace-card:hover {
  transform: translateY(-3px);
  border-color: var(--oro);
  box-shadow: var(--sombra);
  color: var(--oro);
}
.enlace-card svg {
  width: 28px;
  height: 28px;
  color: var(--verde-claro);
}
.enlace-card:hover svg {
  color: var(--oro);
}

/* ============================================================
   BUSCADOR - LUPA EN EL HEADER (Google CSE)
   ============================================================ */

.nav-buscador {
  display: flex;
  align-items: center;
  margin-left: 8px;
}

.buscador-toggle {
  background: none;
  border: none;
  color: var(--blanco);
  cursor: pointer;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s, opacity 0.2s;
}

.buscador-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  opacity: 0.8;
}

.buscador-toggle svg {
  stroke: var(--blanco);
}

.buscador-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.buscador-modal.activo {
  display: flex;
}

.buscador-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.buscador-inner {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 20px;
  z-index: 10;
  background: transparent;
}

.buscador-cerrar {
  position: absolute;
  top: -60px;
  right: 0;
  background: none;
  border: none;
  color: var(--blanco);
  cursor: pointer;
  padding: 8px;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
}

.buscador-cerrar:hover {
  opacity: 1;
  transform: scale(1.05);
}

.buscador-cerrar svg {
  stroke: var(--blanco);
}

.gsc-control-cse {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-family: inherit !important;
}

.gsc-input-box {
  background: rgba(255, 255, 255, 0.10) !important;
  border: 2px solid rgba(255, 255, 255, 0.20) !important;
  border-radius: 14px !important;
  backdrop-filter: blur(4px);
  transition: border-color 0.3s;
}

.gsc-input-box:focus-within {
  border-color: var(--oro) !important;
}

.gsc-input {
  color: var(--blanco) !important;
  font-size: 1.1rem !important;
  padding: 16px 18px !important;
  font-family: inherit !important;
  background: transparent !important;
}

.gsc-input::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
  font-weight: 300;
}

.gsc-search-button {
  background: var(--oro) !important;
  border-radius: 0 14px 14px 0 !important;
  border: none !important;
  padding: 16px 28px !important;
  cursor: pointer !important;
  min-width: 60px !important;
}

.gsc-search-button svg {
  fill: var(--verde) !important;
  width: 20px !important;
  height: 20px !important;
}

.gsc-search-button:hover {
  opacity: 0.85 !important;
}

.gsc-results-wrapper-nooverlay {
  background: rgba(26, 58, 42, 0.95) !important;
  border-radius: 14px !important;
  margin-top: 16px !important;
  padding: 20px 24px !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 500px !important;
  overflow-y: auto !important;
}

.gsc-results {
  background: transparent !important;
  padding: 0 !important;
}

.gsc-result {
  background: transparent !important;
  padding: 12px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  margin-bottom: 0 !important;
  display: block !important;
  clear: both !important;
  min-height: 50px !important;
}

.gsc-result:last-child {
  border-bottom: none !important;
}

.gs-title {
  display: block !important;
  margin-bottom: 2px !important;
}

.gs-title a {
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  text-decoration: none !important;
  display: inline-block !important;
  line-height: 1.4 !important;
}

.gs-title a:hover {
  color: var(--oro) !important;
  text-decoration: underline !important;
}

.gs-visibleUrl {
  color: var(--oro) !important;
  font-size: 0.75rem !important;
  display: block !important;
  margin: 2px 0 4px 0 !important;
}

.gs-snippet {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  display: block !important;
  margin-top: 2px !important;
}

.gsc-webResult .gsc-result {
  padding: 10px 0 !important;
}

.gsc-webResult .gs-snippet {
  margin-top: 2px !important;
}

.gsc-imageResult {
  padding: 8px 0 !important;
}

.gsc-result-info {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 0.8rem !important;
  padding: 0 0 12px 0 !important;
}

.gsc-orderby {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 0.8rem !important;
}

.gsc-orderby-label {
  color: rgba(255, 255, 255, 0.5) !important;
}

.gsc-results-wrapper-nooverlay::-webkit-scrollbar {
  width: 6px;
}

.gsc-results-wrapper-nooverlay::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.gsc-results-wrapper-nooverlay::-webkit-scrollbar-thumb {
  background: var(--oro);
  border-radius: 8px;
}

.gsc-results-wrapper-nooverlay::-webkit-scrollbar-thumb:hover {
  background: var(--oro-claro);
}

.gsc-result .gs-title a,
.gsc-result .gs-title,
.gs-title a,
#___gcse_0 .gs-title a,
.gsc-control-cse .gs-title a {
  color: #ffffff !important;
}

.gsc-result .gs-visibleUrl,
.gs-visibleUrl,
#___gcse_0 .gs-visibleUrl {
  color: var(--oro) !important;
}

.gsc-result .gs-snippet,
.gs-snippet,
#___gcse_0 .gs-snippet {
  color: rgba(255, 255, 255, 0.7) !important;
}

.gsc-result * {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

.gsc-results-wrapper-overlay,
.gsc-results-wrapper-visible {
  background: rgba(26, 58, 42, 0.97) !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  z-index: 10001 !important;
  position: relative !important;
}

.gsc-modal-background-image,
.gsc-modal-background-image-visible {
  background: transparent !important;
  background-image: none !important;
  background-color: transparent !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.gsc-results-close-btn {
  color: var(--blanco) !important;
  fill: var(--blanco) !important;
}

.gsc-tabsArea {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.gsc-tabHeader {
  background: transparent !important;
  color: rgba(255, 255, 255, 0.6) !important;
  border: none !important;
}

.gsc-tabHeader.gsc-tabhActive {
  background: transparent !important;
  color: var(--blanco) !important;
  border-bottom: 2px solid var(--oro) !important;
}

.gsc-results-close-btn ~ *,
.gsc-result-info-container,
.gsc-result-info {
  color: rgba(255, 255, 255, 0.55) !important;
}

.gsc-option-menu-container,
.gsc-selected-option-container,
.gsc-option-menu {
  background: rgba(26, 58, 42, 0.97) !important;
  color: var(--blanco) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

@media (max-width: 768px) {
  .buscador-inner {
    max-width: 100%;
    margin: 0 16px;
  }
  .buscador-cerrar {
    top: -50px;
    right: 4px;
  }
  .gsc-input {
    font-size: 0.95rem !important;
    padding: 14px 14px !important;
  }
  .gsc-search-button {
    padding: 14px 18px !important;
    min-width: 50px !important;
  }
  .buscador-modal {
    padding: 0;
  }
}

@media (max-width: 480px) {
  .buscador-cerrar {
    top: -44px;
  }
  .gsc-input {
    font-size: 0.85rem !important;
    padding: 12px 12px !important;
  }
  .gsc-search-button {
    padding: 12px 14px !important;
    min-width: 44px !important;
  }
  .gsc-search-button svg {
    width: 16px !important;
    height: 16px !important;
  }
}

@media (max-width: 992px) {
  .nav-buscador {
    margin-left: 0;
    padding: 8px 0;
    order: -1;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 4px;
  }
  .nav-buscador .buscador-toggle {
    color: var(--blanco);
    padding: 8px 0;
    justify-content: flex-start;
    width: 100%;
  }
  .nav-buscador .buscador-toggle svg {
    stroke: var(--blanco);
  }
  .nav-buscador .buscador-toggle span {
    margin-left: 10px;
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
  }
}

/* ================================================================
   LÍNEA DE TIEMPO (Timeline)
   ================================================================ */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 30px;
  border-left: 4px solid #b8962e;
  position: relative;
}

.timeline-item {
  position: relative;
  padding: 20px 24px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e5dccc;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.timeline-item:hover {
  border-color: #b8962e;
  box-shadow: 0 4px 20px rgba(26,58,42,0.12);
}

.timeline-item:nth-child(odd) {
  background: #f7f3ec;
}

.timeline-item:nth-child(even) {
  background: #ffffff;
}

.timeline-dot {
  position: absolute;
  left: -37px;
  top: 22px;
  width: 14px;
  height: 14px;
  background: #b8962e;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 3px #b8962e;
  z-index: 2;
}

.timeline-fecha {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  background: #1a3a2a;
  padding: 3px 16px;
  border-radius: 50px;
  margin-bottom: 8px;
  font-family: 'Source Sans 3', sans-serif;
}

.timeline-titulo {
  font-family: 'IM Fell English', serif;
  font-size: 1.05rem;
  color: #1a3a2a;
  margin-bottom: 4px;
}

.timeline-texto {
  font-size: 0.88rem;
  color: #4a4a4a;
  line-height: 1.6;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .timeline {
    padding-left: 24px;
    gap: 12px;
  }
  .timeline-item {
    padding: 16px 18px;
  }
  .timeline-dot {
    left: -31px;
    top: 18px;
    width: 12px;
    height: 12px;
  }
  .timeline-fecha {
    font-size: 0.65rem;
    padding: 2px 12px;
  }
  .timeline-titulo {
    font-size: 0.95rem;
  }
  .timeline-texto {
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .timeline {
    padding-left: 18px;
    gap: 10px;
  }
  .timeline-item {
    padding: 14px 14px;
  }
  .timeline-dot {
    left: -25px;
    top: 16px;
    width: 10px;
    height: 10px;
  }
  .timeline-fecha {
    font-size: 0.6rem;
    padding: 2px 10px;
  }
  .timeline-titulo {
    font-size: 0.85rem;
  }
  .timeline-texto {
    font-size: 0.78rem;
  }
}

/* ================================================================
   FOOTER - ACCESO INTRANET (NUEVO)
   ================================================================ */

.footer-intranet {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-footer-intranet {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #b8962e;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid rgba(184, 150, 46, 0.2);
    border-radius: 6px;
    transition: all 0.3s ease;
    background: rgba(184, 150, 46, 0.05);
    width: 100%;
    justify-content: center;
}

.btn-footer-intranet:hover {
    background: rgba(184, 150, 46, 0.15);
    border-color: rgba(184, 150, 46, 0.5);
    color: #d4b05e;
    transform: translateY(-1px);
}

.btn-footer-intranet svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.btn-footer-intranet span {
    letter-spacing: 0.02em;
}

/* Responsive: ajustes en móvil */
@media (max-width: 480px) {
    .btn-footer-intranet {
        font-size: 0.75rem;
        padding: 10px 14px;
        gap: 8px;
    }
    .btn-footer-intranet svg {
        width: 16px;
        height: 16px;
    }
}

/* ══════════════════════════════════════════════════════════
   UTILIDADES — Plan CATHEDRAL
   Agregar al final de css/style.css.
   Reemplazan estilos inline repetidos en iglesia.php / index.php.
   ══════════════════════════════════════════════════════════ */

/* ---- Espaciado ---- */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-18 { margin-bottom: 18px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.ancho-lectura { max-width: 820px; }

/* ---- Texto secundario ---- */
.texto-suave    { color: var(--texto-suave); }
.texto-suave-sm { color: var(--texto-suave); font-size: 0.9rem; }
.color-verde    { color: var(--verde); }

/* ---- Enlace en verde dentro de párrafo ---- */
.enlace-verde-fuerte { font-weight: 600; color: var(--verde); }

/* ---- Listas tipo "fila con viñeta" (fundamentos, sucesión, etc.) ----
   El borde inferior se quita solo del último ítem, así que ya no hace
   falta acordarse de omitirlo manualmente en el último <li>. */
.lista-filas { list-style: none; }
.lista-filas.gap-12 { display: flex; flex-direction: column; gap: 12px; }

.fila-vineta {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--texto-suave);
}
.fila-vineta:not(:last-child) {
  border-bottom: 1px solid var(--crema-osc);
}
.fila-vineta--sm { font-size: 0.9rem; }
.fila-vineta__icono {
  color: var(--oro);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ---- Caja con nota y borde superior dorado (citas, atribuciones) ---- */
.caja-nota-oro {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px solid var(--oro);
  font-size: 0.85rem;
  color: var(--texto-suave);
}
.caja-nota-oro--xs { font-size: 0.8rem; }

/* ============================================================
   BIBLIOTECA DIGITAL — ESTILOS
   ============================================================ */

.biblioteca-encabezado {
    text-align: center;
    margin-bottom: 32px;
}

.biblioteca-encabezado .seccion-titulo {
    font-size: 2rem;
}

.biblioteca-filtros {
    background: var(--blanco);
    border: 1px solid var(--crema-osc);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 32px;
    box-shadow: var(--sombra);
}

.filtros-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filtros-busqueda {
    display: flex;
    gap: 12px;
}

.filtros-busqueda input {
    flex: 1;
    padding: 11px 16px;
    border: 1px solid var(--crema-osc);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--fuente-sans);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.filtros-busqueda input:focus {
    border-color: var(--verde);
    box-shadow: 0 0 0 3px rgba(26,58,42,.08);
}

.filtros-busqueda .btn {
    padding: 11px 28px;
    border-radius: 8px;
}

.filtros-opciones {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filtro-grupo label {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--texto-suave);
    font-weight: 600;
}

.filtro-grupo select {
    padding: 8px 14px;
    border: 1px solid var(--crema-osc);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: var(--fuente-sans);
    background: var(--blanco);
    cursor: pointer;
    outline: none;
    min-width: 130px;
}

.filtro-grupo select:focus {
    border-color: var(--verde);
}

.filtros-opciones .btn-pequeno {
    padding: 8px 16px;
    font-size: 0.78rem;
    border-radius: 6px;
}

.biblioteca-resultados {
    margin-bottom: 20px;
}

.resultados-contador {
    font-size: 0.88rem;
    color: var(--texto-suave);
}

.biblioteca-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.documento-card {
    background: var(--blanco);
    border: 1px solid var(--crema-osc);
    border-radius: 12px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.documento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(26,58,42,.12);
    border-color: var(--oro);
}

.documento-card.destacado {
    border-color: var(--oro);
    border-width: 2px;
}

.documento-destacado-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--oro);
    color: var(--blanco);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 4px 12px;
    border-radius: 50px;
    z-index: 2;
}

.documento-portada {
    height: 200px;
    background: var(--crema);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.documento-portada img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.documento-portada-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--texto-suave);
}

.portada-icono {
    font-size: 3rem;
}

.portada-tipo {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--texto-suave);
}

.documento-info {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.documento-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.doc-tipo {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--oro);
    font-weight: 600;
}

.doc-anio {
    font-size: 0.72rem;
    color: var(--texto-suave);
    background: var(--crema);
    padding: 1px 10px;
    border-radius: 50px;
}

.documento-titulo {
    font-family: var(--fuente-serif);
    font-size: 1.05rem;
    color: var(--verde);
    margin-bottom: 4px;
    line-height: 1.3;
}

.documento-titulo a {
    color: inherit;
    text-decoration: none;
}

.documento-titulo a:hover {
    color: var(--oro);
}

.documento-autor {
    font-size: 0.82rem;
    color: var(--texto-suave);
    margin-bottom: 10px;
}

.documento-descripcion {
    font-size: 0.85rem;
    color: var(--texto-suave);
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
}

.documento-pie {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--crema-osc);
}

.doc-tema {
    font-size: 0.72rem;
    color: var(--texto-suave);
    background: var(--crema);
    padding: 3px 12px;
    border-radius: 50px;
}

.documento-acciones {
    display: flex;
    gap: 8px;
}

.documento-acciones .btn-pequeno {
    padding: 6px 14px;
    font-size: 0.72rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.doc-no-disponible {
    font-size: 0.72rem;
    color: var(--texto-suave);
    font-style: italic;
}

.biblioteca-vacio {
    text-align: center;
    padding: 60px 20px;
    background: var(--blanco);
    border-radius: 12px;
    border: 1px dashed var(--crema-osc);
}

.biblioteca-vacio p {
    font-size: 1rem;
    color: var(--texto-suave);
    margin-bottom: 20px;
}

.migas-pan {
    font-size: 0.82rem;
    color: var(--texto-suave);
    margin-bottom: 28px;
}

.migas-pan a {
    color: var(--verde);
    text-decoration: none;
}

.migas-pan a:hover {
    color: var(--oro);
}

.detalle-documento {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    background: var(--blanco);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid var(--crema-osc);
    box-shadow: var(--sombra);
}

.detalle-portada {
    border-radius: 8px;
    overflow: hidden;
    background: var(--crema);
    height: fit-content;
}

.detalle-portada img {
    width: 100%;
    height: auto;
    display: block;
}

.detalle-portada-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    gap: 12px;
    color: var(--texto-suave);
}

.portada-icono-grande {
    font-size: 4rem;
}

.portada-tipo-grande {
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.detalle-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.detalle-tipo {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--oro);
    font-weight: 600;
}

.detalle-anio {
    font-size: 0.74rem;
    color: var(--texto-suave);
    background: var(--crema);
    padding: 2px 12px;
    border-radius: 50px;
}

.detalle-destacado {
    font-size: 0.7rem;
    background: var(--oro);
    color: var(--blanco);
    padding: 2px 12px;
    border-radius: 50px;
    font-weight: 600;
}

.detalle-titulo {
    font-family: var(--fuente-serif);
    font-size: 1.8rem;
    color: var(--verde);
    margin-bottom: 6px;
}

.detalle-autor {
    font-size: 1rem;
    color: var(--texto-suave);
    margin-bottom: 4px;
}

.detalle-fuente {
    font-size: 0.82rem;
    color: var(--texto-suave);
    margin-bottom: 18px;
}

.detalle-descripcion {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--texto);
    margin-bottom: 24px;
}

.detalle-metadatos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 24px;
    margin-bottom: 28px;
    padding: 16px 20px;
    background: var(--crema);
    border-radius: 8px;
}

.metadato {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.metadato:last-child,
.metadato:nth-last-child(2) {
    border-bottom: none;
}

.metadato-etiqueta {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--texto-suave);
    font-weight: 600;
}

.metadato-valor {
    font-size: 0.85rem;
    color: var(--texto);
}

.detalle-acciones {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.detalle-acciones .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
}

@media (max-width: 820px) {
    .detalle-documento {
        grid-template-columns: 1fr;
        padding: 24px;
    }
    .detalle-portada-placeholder {
        height: 250px;
    }
    .detalle-portada img {
        max-height: 300px;
        object-fit: cover;
    }
    .detalle-metadatos {
        grid-template-columns: 1fr;
    }
    .metadato {
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }
    .metadato:last-child {
        border-bottom: none;
    }
}

@media (max-width: 640px) {
    .biblioteca-grid {
        grid-template-columns: 1fr;
    }
    .filtros-busqueda {
        flex-direction: column;
    }
    .filtros-opciones {
        flex-direction: column;
        width: 100%;
    }
    .filtro-grupo {
        width: 100%;
    }
    .filtro-grupo select {
        width: 100%;
    }
    .biblioteca-filtros {
        padding: 16px;
    }
    .detalle-documento {
        padding: 16px;
    }
    .detalle-titulo {
        font-size: 1.4rem;
    }
    .detalle-acciones {
        flex-direction: column;
    }
    .detalle-acciones .btn {
        justify-content: center;
    }
}
/* ============================================================
   BOTONES DE CATEGORÍA - BIBLIOTECA
   ============================================================ */

.categorias-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px 0;
}

.cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--texto-suave);
    background: var(--blanco);
    border: 2px solid var(--crema-osc);
    transition: all 0.25s ease;
    text-decoration: none;
    font-family: var(--fuente-sans);
}

.cat-btn:hover {
    border-color: var(--oro);
    color: var(--verde);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.cat-btn.activo {
    background: var(--verde);
    border-color: var(--verde);
    color: var(--oro-claro);
}

.cat-btn.activo:hover {
    background: var(--verde-medio);
    border-color: var(--verde-medio);
}

.cat-contador {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.06);
    border-radius: 50px;
    padding: 0 8px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    color: var(--texto-suave);
}

.cat-btn.activo .cat-contador {
    background: rgba(255,255,255,0.15);
    color: var(--oro-claro);
}

.cat-btn:hover .cat-contador {
    background: rgba(184,150,46,0.12);
    color: var(--oro);
}

.cat-btn.activo:hover .cat-contador {
    background: rgba(255,255,255,0.15);
    color: var(--oro-claro);
}

/* ── ORDEN BARRA (admin) ── */
.orden-barra {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--blanco);
    border: 1px solid var(--crema-osc);
    border-radius: 8px;
    flex-wrap: wrap;
}
.orden-barra label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--texto-suave);
    letter-spacing: 0.04em;
}
.orden-barra select {
    padding: 6px 12px;
    border: 1px solid var(--crema-osc);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: var(--fuente-sans);
    background: var(--blanco);
    cursor: pointer;
}
.orden-barra select:focus {
    border-color: var(--verde);
    outline: none;
}
.orden-barra .total-docs {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--texto-suave);
}

@media (max-width: 600px) {
    .categorias-botones {
        gap: 6px;
        justify-content: center;
    }
    .cat-btn {
        font-size: 0.75rem;
        padding: 8px 12px;
    }
    .cat-contador {
        font-size: 0.6rem;
        min-width: 16px;
        height: 16px;
        line-height: 16px;
        padding: 0 6px;
    }
    .orden-barra .total-docs {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 400px) {
    .categorias-botones {
        gap: 4px;
    }
    .cat-btn {
        font-size: 0.68rem;
        padding: 6px 10px;
    }
}