/* ============================================================
   DOCE UdeC — Extras de WordPress
   Solo lo que WP necesita y el prototipo no tiene. Ningún color
   ni tipografía fuera de las variables del Kit Digital UdeC
   (definidas en styles.css).
   ============================================================ */

/* ---------- Accesibilidad: texto solo para lectores de pantalla ---------- */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Skip link (visible solo con foco de teclado) ---------- */
.skip-link.screen-reader-text:focus {
  position: fixed !important;
  top: 12px;
  left: 12px;
  z-index: 100;
  width: auto;
  height: auto;
  clip-path: none;
  padding: 0.7em 1.4em;
  border-radius: 999px;
  background: var(--gold-500);
  color: var(--blue-900);
  font-family: var(--font-title);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}

/* ---------- Admin bar: el header sticky se apoya bajo la barra ---------- */
.admin-bar .site-header {
  top: var(--wp-admin--admin-bar--height, 32px);
}

/* ---------- Home dinámico ---------- */
/* La card ahora enlaza al post: el <a> debe ocupar el alto del media. */
.news-media > a {
  display: block;
  height: 100%;
}

/* Video embebido cuando hay ID de YouTube configurado. */
.yt-player iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* Fila de iconos centrada (widget de redes fuera del home). */
.social-icons.is-centered {
  justify-content: center;
}

/* ---------- Header construido con Elementor (plugin HFE) ----------
   El wrapper #masthead del plugin envuelve al header del kit: el sticky
   debe vivir en el wrapper (un padre del mismo alto anula el sticky). */
#masthead {
  position: sticky;
  top: 0;
  z-index: 60;
}
#masthead .site-header {
  position: static;
}
.admin-bar #masthead {
  top: var(--wp-admin--admin-bar--height, 32px);
}

/* En las plantillas HFE el header/footer del kit va de borde a borde,
   aunque la sección/contenedor de Elementor quede en modo "boxed". */
#masthead .elementor-section .elementor-container,
#colophon .elementor-section .elementor-container,
#masthead .e-con,
#masthead .e-con-inner,
#colophon .e-con,
#colophon .e-con-inner {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* Dentro de una plantilla de Elementor, .elementor img { height: auto }
   (0,1,1) le gana a las alturas del kit (0,1,0) y estira los logos. */
#masthead .brand-udec,
#masthead .brand-doce-logo {
  height: 44px;
  width: auto;
}
#colophon .f-logo {
  height: 34px;
  width: auto;
}

/* El header mide --header-h (76px) y el menú mobile se posiciona bajo esa
   altura: el contenedor de Elementor no puede sumar padding vertical. */
#masthead .elementor-section .elementor-container,
#masthead .e-con,
#masthead .e-con-inner {
  padding-top: 0;
  padding-bottom: 0;
}

/* ---------- Listados de noticias (index / archive) ---------- */
.archive-desc {
  color: var(--color-text-muted);
  margin: -1.2rem 0 2rem;
  max-width: 70ch;
}

.pagination {
  margin-top: 2.6rem;
}
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.pagination .page-numbers {
  display: inline-block;
  min-width: 2.4em;
  padding: 0.5em 0.9em;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  color: var(--blue-700);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  transition: background 0.18s, color 0.18s;
}
.pagination .page-numbers:hover {
  background: var(--cream);
  color: var(--gold-600);
}
.pagination .page-numbers.current {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--blue-900);
}
.pagination .page-numbers.dots {
  border: 0;
  background: transparent;
}

/* ---------- Noticia individual y páginas ---------- */
.single-noticia {
  padding: 4rem 0 4.5rem;
}
.single-container {
  max-width: 860px;
}
.single-head {
  margin-bottom: 1.8rem;
}
/* El .badge del kit se posiciona absoluto dentro de las cards;
   en la cabecera del single fluye en línea. */
.single-head .badge {
  position: static;
  display: inline-block;
  margin-bottom: 1rem;
}
.single-title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 700;
  color: var(--blue-800);
}
.single-meta {
  margin: 0.9rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  padding-top: 0.6rem;
  border-top: 3px solid var(--gold-400);
  display: inline-block;
}
.single-media {
  margin: 0 0 2rem;
}
.single-media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.entry-content {
  font-size: 1.02rem;
}
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--blue-800);
  margin: 1.6em 0 0.6em;
}
.entry-content a {
  color: var(--gold-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.entry-content a:hover {
  color: var(--gold-700);
}
.entry-content ul {
  list-style: disc;
  padding-left: 1.4em;
}
.entry-content ol {
  list-style: decimal;
  padding-left: 1.4em;
}
.entry-content li {
  margin: 0.35em 0;
}
.entry-content blockquote {
  margin: 1.6em 0;
  padding: 1em 1.4em;
  background: var(--cream);
  border-left: 4px solid var(--gold-500);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.entry-content blockquote > :first-child {
  margin-top: 0;
}
.entry-content blockquote > :last-child {
  margin-bottom: 0;
}
.entry-content img {
  border-radius: var(--radius);
  height: auto;
}
.entry-content figure {
  margin: 1.6em 0;
  max-width: 100%;
}
.entry-content figcaption,
.wp-caption-text {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 0.5em;
}

/* Páginas construidas con bloques (plantilla «Ancho completo»): la columna
   de lectura necesita el aire inferior que en page.php daba .single-noticia. */
.page-template-ancho-completo .entry-content {
  margin-bottom: 3.2rem;
}

/* Alineaciones del editor clásico/bloques */
.alignleft {
  float: left;
  margin: 0.4em 1.4em 1em 0;
}
.alignright {
  float: right;
  margin: 0.4em 0 1em 1.4em;
}
.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.wp-caption {
  max-width: 100%;
}

.page-links {
  margin-top: 1.6em;
  font-family: var(--font-title);
}
.single-back {
  margin-top: 2.6rem;
}

@media (max-width: 560px) {
  .alignleft,
  .alignright {
    float: none;
    margin: 1em 0;
  }
}
