/* --- COLOR DE FUENTE MÁS OSCURO --- */
:root {
  --bs-body-color: #1a1a1a;
}

body {
  color: #1a1a1a;
}

/* --- TAMAÑO DE FUENTE +1pt (base 16px -> 17px) --- */
html {
  font-size: 17px;
}

/* --- ESTILOS DE LEYENDAS DE FIGURAS Y TABLAS (estilo tomado de investigaciones-grd-2025) --- */
figcaption,
.figure-caption,
caption {
  color: #000000 !important;
  font-weight: normal;
  font-family: Arial, sans-serif !important;
  line-height: 1.3 !important;
}

/* "Figura X:" en negrita dentro de la leyenda */
.figure-caption .caption-number,
figcaption .caption-number,
.quarto-float-fig .quarto-float-caption .caption-number {
  font-weight: bold !important;
}

/* Leyendas de tablas - mismo formato que las de figuras */
.quarto-float-tbl .quarto-float-caption,
table caption,
.tbl-cap {
  text-align: left !important;
  color: #000000 !important;
  font-weight: normal;
  font-family: Arial, sans-serif !important;
  line-height: 1.3 !important;
}

/* "Tabla X:" en negrita dentro de la leyenda */
.quarto-float-tbl .quarto-float-caption .caption-number,
table caption .caption-number,
.tbl-cap .caption-number {
  font-weight: bold !important;
}

/* --- ESTILOS DE LAS CARDS --- */
.bg-amarillo {
  background-color: #FAC718 !important;
  color: #223764 !important;
  /* Azul oscuro para contraste del texto */
  border-bottom: 2px solid #e0b215;
}

.bg-amarillo a {
  color: #223764 !important;
}

.bg-amarillo a:hover {
  color: #ffffff !important;
}

.anexo-card {
  border: 1px solid #FAC718;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  border-radius: 8px;
  overflow: hidden;
}

.anexo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(250, 199, 24, 0.3) !important;
}

/* --- ESTILOS DE LA TABLA DE CONTENIDO (TOC DERECHO) --- */
#TOC {
  background-color: #223764;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Título del TOC */
#TOC>ul::before,
#TOC h2 {
  color: #FAC718 !important;
  /* Toque amarillo para el título del índice */
  font-weight: bold;
}

/* Enlaces del TOC */
#TOC ul li a {
  color: #ffffff !important;
  transition: color 0.2s ease;
}

#TOC ul li a:hover,
#TOC ul li a.active {
  color: #FAC718 !important;
  /* El enlace activo o en hover se pone amarillo */
  text-decoration: none;
}

/* --- GRUPO DE CARDS DE LA UNGRD --- */
.ungrd-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
  margin-bottom: 30px;
}

.ungrd-card {
  background-color: #ffffff;
  border: 1px solid rgba(34, 55, 100, 0.15);
  border-top: 5px solid #223764;
  /* Azul oscuro UNGRD */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease, border-top-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
}

.ungrd-card:hover {
  transform: translateY(-5px);
  border-color: #FAC718;
  /* Amarillo UNGRD */
  border-top-color: #FAC718;
  box-shadow: 0 12px 20px rgba(250, 199, 24, 0.25);
  background-color: #fafbfc;
}

.ungrd-card-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: bold;
  font-size: 1.05rem;
  background-color: rgba(34, 55, 100, 0.02);
}

.ungrd-card-header a {
  color: #223764 !important;
  text-decoration: none !important;
  transition: color 0.3s ease;
}

.ungrd-card:hover .ungrd-card-header a {
  color: #FAC718 !important;
  /* El título cambia a color amarillo UNGRD al hacer hover */
}

.ungrd-card:hover .ungrd-card-header {
  background-color: #223764;
  /* El fondo de la cabecera cambia a azul oscuro de la UNGRD */
  transition: background-color 0.3s ease;
}

.ungrd-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  color: #4a5568;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ungrd-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.ungrd-card:hover .ungrd-card-img {
  transform: scale(1.02);
}

/* --- LÍNEAS DIVISORIAS DE CABECERAS GLOBALES --- */
h1, .title, h2 {
  border-bottom: 1px solid #ecf0f1;
  padding-bottom: 8px;
  margin-top: 1.8rem;
  margin-bottom: 1rem;
}

h3, h4, h5, h6 {
  border-bottom: none !important;
}

/* --- BOTÓN DE COLECCIÓN ESTILO UNGRD --- */
.ungrd-btn {
  display: inline-block;
  background-color: #223764; /* Azul oscuro UNGRD */
  color: #ffffff !important;
  font-weight: bold;
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid #223764;
  text-decoration: none !important;
  transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  margin-top: 15px;
  margin-bottom: 15px;
}

.ungrd-btn:hover {
  background-color: #FAC718; /* Amarillo UNGRD */
  color: #223764 !important; /* Azul oscuro */
  border-color: #FAC718;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(250, 199, 24, 0.35);
}

/* --- PORTADA FLOTANTE --- */
.ungrd-cover-float {
  float: right;
  width: 280px;
  margin-left: 25px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ungrd-cover-float:hover {
  transform: scale(1.01);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}
