:root{
  --bg: #f5f7fa;        /* Fondo claro general */
  --card: #ffffff;      /* Fondo blanco de las cards */
  --card-hover: #ffffff;/* Igual pero la sombra hace el efecto */
  --text: #1a1a1a;      /* Texto principal oscuro */
  --muted: #5f5f5f;     /* Texto secundario gris */
  --primary: #0b1b3f;   /* Azul marino institucional */
  --accent: #132c5e;    /* Azul más fuerte */
  --border: #e0e4eb;    /* Gris claro para bordes */
}

.boletines-section{
  padding: 48px 20px;
  background: var(--bg);
  color: var(--text);
}

.boletines-header{
  max-width: 1100px;
  margin: 0 auto 28px;
}
.boletines-header h1{
  font-size: 2.2rem;
  margin: 0 0 6px;
}
.boletines-header p{
  color: var(--muted);
  margin: 0;
}

.boletines-grid{
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.boletin-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.boletin-card:hover{
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(106, 5, 115, 0.35);
}

.boletin-cover{
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.boletin-cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

.boletin-body{
  padding: 14px 16px 18px;
}
.boletin-date{
  display: block;
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.boletin-title{
  font-size: 1.05rem;
  margin: 0 0 8px;
  line-height: 1.25;
}
.boletin-title a{
  color: var(--text);
  text-decoration: none;
}
.boletin-title a:hover{
  color: var(--accent);
}
.boletin-excerpt{
  font-size: .95rem;
  color: var(--muted);
  margin: 0 0 12px;
}
.boletin-more{
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  border-bottom: 1px solid transparent;
}
.boletin-more:hover{
  border-color: var(--accent);
}

/* Paginación */
.pagination{
  max-width: 1100px;
  margin: 26px auto 0;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.pagination a{
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  font-weight: 600;
}
.pagination a:hover{
  background: var(--card-hover);
}
.pagination a.active{
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #fff;
}
.pagination .page-btn{ font-size: 1.1rem; }
.pagination .dots{ color: var(--muted); padding: 0 6px; }

/* Detalle */
.detalle-section{
  background: var(--bg);
  color: var(--text);
  padding: 36px 20px 60px;
}
.back-link{
  display:inline-block;
  margin: 0 auto 16px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.back-link:hover{ border-color: var(--accent); }

.detalle-header{
  max-width: 900px;
  margin: 0 auto 16px;
  text-align: center;
}
.detalle-header h1{ margin: 0 0 6px; font-size: 2rem; }
.detalle-header time{ color: var(--muted); }

.detalle-cover{
  max-width: 900px;
  margin: 0 auto 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}

.boletin-wrapper {
  max-width: 900px;
  margin: 0 auto 18px;
  text-align: justify;
}

.detalle-cover img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.detalle-content{
  max-width: 900px;
  margin: 0 auto;
  color: var(--text);
}
.detalle-content p{ line-height: 1.7; color: var(--text); }

.detalle-breadcrumb {
  margin: 20px 0;
  padding: 10px 0;
  font-size: 0.95rem;
}

.detalle-breadcrumb .link-back {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #93278f, #9a529a, #00a1de);
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.detalle-breadcrumb .link-back:hover {
  background: linear-gradient(135deg, #00a1de, #9a529a, #93278f);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* ===== Footer de detalle ===== */
.detalle-footer {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid #e0e0e0;
}

.detalle-footer .detalle-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.detalle-footer .detalle-nav a {
  flex: 1;
  min-width: 150px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #93278f, #9a529a, #00a1de);
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.detalle-footer .detalle-nav a:hover {
  background: linear-gradient(135deg, #00a1de, #9a529a, #93278f);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.detalle-footer .detalle-nav span {
  flex: 1;
  min-width: 150px;
  text-align: center;
  padding: 12px 18px;
  border-radius: 8px;
  background: #f1f1f1;
  color: #aaa;
  font-weight: 600;
}