/*
Theme Name: HUMA Custom
Theme URI: https://humanidades.uni.edu.py
Author: jodogochaHUMA
Description: Tema institucional personalizado para la Facultad de Humanidades.
Version: 1.1.0
Text Domain: huma-custom
*/

:root {
  --black: #171717;
  --ink: #24231f;
  --yellow: #e8bd45;
  --yellow-light: #f4d77e;
  --cream: #fbf8ef;
  --white: #fff;
  --muted: #625f56;
  --line: #e8e1cf;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
}

.container {
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
}

/* Enlace de accesibilidad para saltar la navegación */
.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  background: var(--white);
  color: var(--black);
}

.skip-link:focus {
  top: 1rem;
}

/* Encabezado y navegación */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 239, 0.97);
  backdrop-filter: blur(12px);
}

.nav {
  position: relative;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  flex: 0 1 345px;
  align-items: center;
  gap: 0.75rem;
  color: var(--black);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--black);
  color: var(--yellow);
  font: 700 1.35rem var(--serif);
}

.brand-name {
  font: 700 0.84rem/1.2 var(--sans);
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #80600c;
}

.nav-links .nav-contact {
  padding: 0.68rem 0.85rem;
  border: 1px solid var(--black);
  background: var(--black);
  color: var(--yellow-light);
}

.nav-links .nav-contact:hover {
  background: #333;
  color: var(--white);
}

.menu-toggle {
  display: none;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--black);
  font: 700 0.9rem var(--sans);
  cursor: pointer;
}

/* Portada */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  min-height: 610px;
  align-items: center;
  padding: 6rem 0;
  background: var(--black);
  color: var(--white);
}

.hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image: var(
    --huma-hero-image,
    linear-gradient(120deg, #4c4c4c, #1f1f1f)
  );
  background-position: center 43%;
  background-size: cover;
  content: "";
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(15, 15, 15, 0.84) 0%,
      rgba(15, 15, 15, 0.63) 48%,
      rgba(15, 15, 15, 0.16) 100%
    ),
    linear-gradient(0deg, rgba(15, 15, 15, 0.36), transparent 50%);
  content: "";
  pointer-events: none;
}

.hero:hover::before {
  transform: scale(1.06);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 880px;
}

.eyebrow {
  margin: 0 0 1.1rem;
  color: #9a7413;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--yellow);
}

.hero h1 {
  max-width: 880px;
  margin: 0 0 1.5rem;
  color: var(--white);
  font-size: clamp(2.7rem, 6vw, 5.2rem);
  letter-spacing: -0.045em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

.hero h1 span {
  color: var(--yellow);
}

.hero-copy {
  max-width: 600px;
  margin: 0 0 2rem;
  color: #f0eee8;
  font-size: 1.1rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--yellow);
  background: var(--yellow);
  color: var(--black);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
  transition:
    background 0.2s,
    transform 0.2s;
}

.button:hover {
  transform: translateY(-2px);
  background: var(--yellow-light);
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(23, 23, 23, 0.32);
  color: var(--white);
}

.button-secondary:hover {
  background: rgba(23, 23, 23, 0.65);
}

/* Secciones de contenido */
.section {
  padding: 5.5rem 0;
}

.section-alt {
  background: #f0e7ce;
}

.intro {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 3rem;
  padding: 5.5rem 0;
  border-bottom: 1px solid var(--line);
}

.intro h2,
.section-heading h2,
.contact h2 {
  margin: 0;
  font-size: clamp(2.15rem, 4vw, 3.45rem);
  letter-spacing: -0.035em;
}

.intro-copy {
  color: var(--muted);
  font-size: 1rem;
}

.intro-copy p {
  margin: 0 0 1.15rem;
}

.intro-copy p:last-child {
  margin-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.3rem;
}

.section-heading > p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  min-height: 245px;
  padding: 1.8rem;
  border: 1px solid var(--line);
  background: var(--white);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(23, 23, 23, 0.09);
}

.card-number {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 1.6rem;
  place-items: center;
  border-radius: 50%;
  background: #f8edc9;
  color: #785b0e;
  font: 1.1rem var(--serif);
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.55rem;
}

.card p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.card a {
  color: #76580d;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Fondos de las secciones académica y filiales */
.academic-section,
.filiales-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--black);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.academic-section::after,
.filiales-section::after {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  content: "";
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

.academic-section::after {
  background-image: var(
    --huma-academic-image,
    linear-gradient(120deg, #383838, #171717)
  );
}

.filiales-section::after {
  background-image: var(
    --huma-filiales-image,
    linear-gradient(120deg, #383838, #171717)
  );
}

.academic-section::before,
.filiales-section::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(18, 18, 18, 0.84),
    rgba(18, 18, 18, 0.63)
  );
  content: "";
}

.academic-section:hover::after,
.filiales-section:hover::after {
  transform: scale(1.06);
}

.academic-section .eyebrow,
.filiales-section .eyebrow {
  color: var(--yellow);
}

.academic-section .section-heading h2,
.filiales-section .section-heading h2 {
  color: var(--white);
}

.academic-section .section-heading > p,
.filiales-section .section-heading > p {
  color: #f0eee8;
}

.filial-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.filial-link {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(232, 189, 69, 0.65);
  background: rgba(23, 23, 23, 0.78);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  transition:
    background 0.2s,
    transform 0.2s;
}

.filial-link:hover {
  transform: translateY(-3px);
  background: rgba(23, 23, 23, 0.94);
}

.filial-link span:last-child {
  color: var(--yellow);
  font-size: 1.25rem;
}

/* Investigación y extensión */
.community {
  padding: 5rem 0;
  background: var(--black);
  color: var(--white);
}

.community-inner {
  display: block;
}

.community .section-heading {
  margin-bottom: 2.3rem;
}

.community h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(2.3rem, 4.5vw, 4rem);
  letter-spacing: -0.04em;
}

.community .eyebrow {
  color: var(--yellow);
}

.community .section-heading > p {
  color: #d7d4ca;
}

.community .cards .card {
  min-height: 230px;
}

.community .card {
  border-color: rgba(232, 189, 69, 0.45);
}

.community .card-number {
  background: rgba(232, 189, 69, 0.18);
  color: #785b0e;
}

/* Noticias y contacto */
.news-card {
  padding: 2rem;
  border-left: 4px solid var(--yellow);
  background: var(--white);
}

.news-card p {
  margin: 0;
  color: var(--muted);
}

.contact {
  padding: 5.5rem 0;
  text-align: center;
}

.contact h2 {
  max-width: 760px;
  margin: 0 auto 1rem;
}

.contact > p:not(.eyebrow) {
  max-width: 620px;
  margin: 0 auto 1.7rem;
  color: var(--muted);
}

/* Pie de página compartido */
.site-footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.footer-inner p {
  margin: 0;
}

/* Páginas internas */
.page-shell {
  min-height: 50vh;
  padding: 3rem 0 5rem;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
}

.page-content {
  min-width: 0;
  padding: 2rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.page-title {
  margin: 0 0 1.5rem;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-content > :last-child {
  margin-bottom: 0;
}

.page-content p,
.page-content li {
  color: var(--muted);
}

.page-content h2,
.page-content h3,
.page-content h4 {
  color: var(--ink);
}

.page-content a {
  color: #76580d;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-sidebar .sidebar-box {
  margin-bottom: 1.1rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.sidebar-box h3 {
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--black);
  color: var(--yellow);
  font: 700 0.8rem var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-box ul {
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
}

.sidebar-box li + li {
  border-top: 1px solid var(--line);
}

.sidebar-box a {
  display: block;
  padding: 0.7rem 1rem;
  color: var(--ink);
  text-decoration: none;
}

.sidebar-box a:hover {
  background: var(--cream);
  color: #76580d;
}

/* Adaptación a pantallas medianas */
@media (max-width: 1080px) {
  .nav {
    min-height: 76px;
  }

  .brand {
    flex-basis: 300px;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-links a {
    font-size: 0.76rem;
  }
}

/* Menú móvil y tablet */
@media (max-width: 900px) {
  .container {
    width: min(100% - 2rem, 700px);
  }

  .nav {
    min-height: 72px;
  }

  .brand {
    max-width: 78%;
    flex-basis: auto;
  }

  .brand-name {
    font-size: 0.8rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--cream);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 0.8rem 0.25rem;
    font-size: 0.9rem;
  }

  .nav-links .nav-contact {
    margin-top: 0.5rem;
    padding-right: 1rem;
    padding-left: 1rem;
    text-align: center;
  }

  .hero {
    min-height: 540px;
    padding: 5rem 0;
  }

  .hero::before {
    background-position: 57% center;
  }

  .hero::after {
    background:
      linear-gradient(
        90deg,
        rgba(15, 15, 15, 0.82),
        rgba(15, 15, 15, 0.46)
      ),
      linear-gradient(0deg, rgba(15, 15, 15, 0.36), transparent 50%);
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .intro,
  .section,
  .contact {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 1rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 0;
  }

  .community {
    padding: 4rem 0;
  }

  .footer-inner {
    flex-direction: column;
  }

  .page-grid {
    grid-template-columns: 1fr;
  }
}

/* Móviles */
@media (max-width: 520px) {
  .hero {
    min-height: 560px;
  }

  .hero::before {
    background-position: 61% center;
  }

  .hero::after {
    background:
      linear-gradient(
        90deg,
        rgba(15, 15, 15, 0.84),
        rgba(15, 15, 15, 0.55)
      ),
      linear-gradient(0deg, rgba(15, 15, 15, 0.36), transparent 50%);
  }

  .filial-links {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(2.45rem, 12vw, 3.6rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    max-width: 290px;
  }

  .page-content {
    padding: 1.25rem;
  }
}

/* Respetar la preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Header oscuro con transparencia progresiva al desplazarse */
.site-header {
  --header-alpha: 1;
  background-color: rgba(23, 23, 23, var(--header-alpha));
  border-bottom-color: rgba(232, 225, 207, calc(var(--header-alpha) * 0.3));
  transition:
    background-color 100ms linear,
    border-color 100ms linear;
}

.brand {
  flex: 0 1 auto;
  color: #fff;
}

.brand-logo {
  display: block;
  width: auto;
  max-width: min(320px, 42vw);
  height: 64px;
  object-fit: contain;
}

.nav-links a {
  color: #fff;
}

.nav-links a:hover {
  color: var(--yellow);
}

.nav-links .nav-contact {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--black);
}

.nav-links .nav-contact:hover {
  background: var(--yellow-light);
  color: var(--black);
}

.menu-toggle {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

@media (max-width: 900px) {
  .brand-logo {
    max-width: min(250px, 58vw);
    height: 54px;
  }

  .nav-links {
    background: rgba(23, 23, 23, var(--header-alpha));
    border-bottom-color: var(--line);
  }
}

/* Títulos bilingües de la portada */
.hero .hero-title-es {
  max-width: 880px;
  margin: 0 0 0.65rem;
  font-size: clamp(2.3rem, 4.8vw, 4.2rem);
  letter-spacing: -0.04em;
}

.hero .hero-title-gn {
  max-width: 880px;
  margin: 0 0 1.5rem;
  color: var(--yellow);
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.4vw, 3.9rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

@media (max-width: 520px) {
  .hero .hero-title-es {
    font-size: clamp(2.1rem, 9vw, 3.1rem);
  }

  .hero .hero-title-gn {
    font-size: clamp(1.9rem, 8vw, 2.8rem);
  }
}

/* Portada: logo a la izquierda y texto más compacto */
.hero-content.container {
  max-width: 1180px;
}

.hero-lockup {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.8fr);
  align-items: stretch;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.hero-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.hero-logo {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 400px;
  object-fit: contain;
}

.hero-text {
  align-self: center;
  min-width: 0;
}

.hero-text .eyebrow {
  margin-bottom: 0.75rem;
}

.hero .hero-title-es {
  max-width: 760px;
  margin: 0 0 0.65rem;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hero .hero-title-gn {
  max-width: 760px;
  margin: 0;
  color: var(--yellow);
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3.1vw, 2.6rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

@media (max-width: 600px) {
  .hero-lockup {
    grid-template-columns: minmax(76px, 0.35fr) minmax(0, 1fr);
    gap: 1rem;
  }

  .hero-logo-wrap {
    min-height: 150px;
  }

  .hero-logo {
    max-height: 190px;
  }

  .hero .hero-title-es {
    font-size: clamp(1.4rem, 5.5vw, 2rem);
  }

  .hero .hero-title-gn {
    font-size: clamp(1.25rem, 4.8vw, 1.8rem);
  }

  .hero-text .eyebrow {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }
}

.hero::after {
  background:
    linear-gradient(
      90deg,
      rgba(15, 15, 15, 0.94) 0%,
      rgba(15, 15, 15, 0.82) 55%,
      rgba(15, 15, 15, 0.48) 100%
    ),
    linear-gradient(
      0deg,
      rgba(15, 15, 15, 0.5),
      transparent 55%
    );
}

@media (max-width: 900px) {
  .hero::after {
    background:
      linear-gradient(
        90deg,
        rgba(15, 15, 15, 0.92),
        rgba(15, 15, 15, 0.72)
      ),
      linear-gradient(
        0deg,
        rgba(15, 15, 15, 0.48),
        transparent 55%
      );
  }
}

/* Fondo de la sección de Posgrado */
.posgrado-section::after {
  background-image: var(
    --huma-posgrado-image,
    linear-gradient(120deg, #383838, #171717)
  );
}

/* Carrusel de las cinco noticias más recientes */
.news-carousel {
  position: relative;
}

.news-carousel-controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin: 0 0 1rem;
}

.news-carousel-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--black);
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
}

.news-carousel-button:hover:not(:disabled) {
  background: #383838;
}

.news-carousel-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.news-carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0 1rem;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--yellow) var(--line);
  scrollbar-width: thin;
}

.news-carousel-card {
  display: flex;
  flex: 0 0 calc((100% - 2rem) / 3);
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  scroll-snap-align: start;
}

.news-carousel-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #e8e1cf;
}

.news-carousel-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-carousel-card:hover .news-carousel-image img {
  transform: scale(1.04);
}

.news-carousel-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.4rem;
}

.news-carousel-date {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.news-carousel-content h3 {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
}

.news-carousel-content h3 a {
  color: var(--ink);
  text-decoration: none;
}

.news-carousel-content h3 a:hover {
  color: #76580d;
}

.news-carousel-excerpt {
  margin: 0 0 1rem;
  color: var(--muted);
}

.news-carousel-link {
  margin-top: auto;
  color: #76580d;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .news-carousel-card {
    flex-basis: calc((100% - 1rem) / 2);
  }
}

@media (max-width: 600px) {
  .news-carousel-card {
    flex-basis: 88%;
  }
}

.community .card h3 {
  color: var(--ink);
}

.community .card a {
  color: #76580d;
}

.intro-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--yellow);
  background: var(--yellow);
  color: var(--black);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.intro-more:hover {
  transform: translateY(-2px);
  background: var(--yellow-light);
  color: var(--black);
  text-decoration: none;
}

/* Enlaces externos importantes */
.important-links-section {
  background: var(--cream);
}

.important-links-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.important-link-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.important-link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(23, 23, 23, 0.12);
  text-decoration: none;
}

.important-link-card img {
  display: block;
  width: 100%;
  height: 190px;
  padding: 1rem;
  object-fit: contain;
  background: var(--white);
}

.important-link-card span {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

@media (max-width: 900px) {
  .important-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .important-links-grid {
    grid-template-columns: 1fr;
  }

  .important-link-card img {
    height: 180px;
  }
}

.contact-directory {
  padding: 5rem 0;
}

.contact-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.contact-department {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.contact-department h3 {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-size: 1.3rem;
}

.contact-department a {
  overflow-wrap: anywhere;
  color: #76580d;
  text-decoration: none;
}

.contact-department a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-service-notice {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--yellow);
  background: #fff;
  color: var(--ink);
}

.contact-service-notice strong {
  display: block;
  margin-bottom: 0.35rem;
}

.contact-service-notice p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .contact-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .contact-directory-grid {
    grid-template-columns: 1fr;
  }
}

.news-all-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.news-all-wrap .button[disabled] {
  opacity: 0.75;
  cursor: not-allowed;
}

/* Diseño de noticia individual */
.single-news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 2rem;
}

.single-news-main {
  min-width: 0;
}

.single-news-article {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 14px 40px rgba(23, 23, 23, 0.07);
}

.single-news-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 1.25rem 2rem 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.single-news-breadcrumb a {
  color: #76580d;
  text-decoration: none;
}

.single-news-breadcrumb a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-news-header {
  padding: 1.5rem 2rem 1.75rem;
}

.single-news-date {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.single-news-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.single-news-excerpt {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.6;
}

.single-news-featured-image {
  margin: 0;
  background: #eee9dc;
}

.single-news-featured-image img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.single-news-content {
  padding: 2rem;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.85;
}

.single-news-content > :first-child {
  margin-top: 0;
}

.single-news-content > :last-child {
  margin-bottom: 0;
}

.single-news-content h2,
.single-news-content h3,
.single-news-content h4 {
  margin-top: 2rem;
  color: var(--ink);
}

.single-news-content p,
.single-news-content li {
  color: #4d4a45;
}

.single-news-content a {
  color: #76580d;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-news-content blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--yellow);
  background: var(--cream);
  color: var(--muted);
}

.single-news-content img {
  height: auto;
  border-radius: 2px;
}

.single-news-content figure {
  max-width: 100%;
  margin: 1.75rem 0;
}

.single-news-content figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.single-news-pages {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.single-news-pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--line);
  background: #fcfaf5;
}

.single-news-pagination-item a {
  color: #76580d;
  font-weight: 700;
  text-decoration: none;
}

.single-news-pagination-item a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-news-pagination-next {
  margin-left: auto;
  text-align: right;
}

.single-news-sidebar-box {
  border: 1px solid var(--line);
  background: var(--white);
}

.single-news-sidebar-box h2 {
  margin: 0;
  padding: 1rem 1.2rem;
  background: var(--black);
  color: var(--yellow);
  font: 700 0.85rem var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.single-news-sidebar-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.single-news-sidebar-box li {
  padding: 1rem 1.2rem;
}

.single-news-sidebar-box li + li {
  border-top: 1px solid var(--line);
}

.single-news-sidebar-box li a {
  display: block;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
}

.single-news-sidebar-box li a:hover {
  color: #76580d;
}

.single-news-sidebar-box time {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.single-news-empty {
  color: var(--muted);
}

@media (max-width: 900px) {
  .single-news-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .single-news-header,
  .single-news-content {
    padding: 1.25rem;
  }

  .single-news-breadcrumb {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .single-news-pagination {
    flex-direction: column;
    padding: 1.25rem;
  }

  .single-news-pagination-next {
    margin-left: 0;
    text-align: left;
  }
}

.brand {
  display: flex;
  flex: 0 1 390px;
  align-items: center;
  gap: 0.8rem;
  color: #fff;
  text-decoration: none;
}

.brand-logo {
  flex: 0 0 auto;
  width: auto;
  max-width: 110px;
  height: 58px;
  object-fit: contain;
}

.brand-name {
  display: block;
  color: #fff;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

@media (max-width: 900px) {
  .brand {
    max-width: calc(100% - 5rem);
    gap: 0.6rem;
  }

  .brand-logo {
    max-width: 82px;
    height: 48px;
  }

  .brand-name {
    font-size: 0.7rem;
  }
}

/* Footer final */
#footer {
  width: 100%;
  background: #d5d4d4;
  color: #4f4d4d;
}

#footer a {
  color: #393838;
}

#footer a:hover {
  color: #aaa;
}

#footer-widgets {
  padding-top: 20px;
}

#footer-widgets .hu-pad {
  padding-bottom: 30px;
}

.footer-widgets-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

#footer .widget-title {
  margin: 0 0 1rem;
  color: #000000;
  font: 700 1rem/1.3 var(--sans, Arial, sans-serif);
}

#footer .textwidget,
#footer .textwidget p {
  line-height: 1.7;
}

#footer .textwidget p {
  margin: 0 0 0.6rem;
}

.footer-social-widget,
.social-links {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-social-widget a,
.social-links a {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #33363b;
  color: #fff !important;
}

.footer-social-widget a:hover,
.social-links a:hover {
  background: #4a4e55;
  color: #fff !important;
}

.footer-social-widget svg,
.social-links svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

#footer-bottom {
  background: #33363b;
}

#footer-bottom .container-inner {
  position: relative;
}

#footer-bottom .hu-pad {
  padding-top: 30px;
  padding-bottom: 30px;
}

.footer-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 1.5rem;
}

#footer-bottom #copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9375rem;
  line-height: 1.5;
}

#footer-bottom #copyright p {
  margin: 0;
}

#footer-bottom .social-links {
  justify-content: flex-end;
}

#footer-bottom .social-links a {
  background: transparent;
  color: rgba(255, 255, 255, 0.6) !important;
}

#footer-bottom .social-links a:hover {
  color: #fff !important;
}

#back-to-top {
  display: flex;
  width: 60px;
  height: 30px;
  align-items: center;
  justify-content: center;
  margin: 0 auto -30px;
  position: relative;
  z-index: 1;
  border-radius: 0 0 3px 3px;
  background: #eaeaea;
  color: #777 !important;
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
}

#back-to-top:hover {
  color: #444 !important;
}

@media (max-width: 700px) {
  .footer-widgets-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom-grid {
    grid-template-columns: 1fr;
    padding-top: 40px;
    text-align: center;
  }

  #footer-bottom .social-links {
    justify-content: center;
  }
}

.important-links-section .important-link-text-card {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(232, 189, 69, 0.65);
  background: #171717;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.important-links-section .important-link-text-card:hover {
  transform: translateY(-3px);
  background: #292929;
}

.important-links-section .important-link-text-card span:last-child {
  color: #e8bd45;
  font-size: 1.25rem;
}

/* Paginación de noticias */
.navigation.pagination {
  margin: 3rem 0 1rem;
}

.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.navigation.pagination .page-numbers {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.85rem;
  border: 1px solid #dedede;
  border-radius: 6px;
  background: #fff;
  color: #171717;
  font: 700 0.95rem/1 var(--sans, Arial, sans-serif);
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.navigation.pagination a.page-numbers:hover {
  transform: translateY(-2px);
  border-color: #e8bd45;
  background: #fbf8ef;
  color: #171717;
}

.navigation.pagination .page-numbers.current {
  border-color: #e8bd45;
  background: #f4d77e;
  color: #171717;
  cursor: default;
}

.navigation.pagination .page-numbers.dots {
  min-width: 32px;
  padding-right: 0.25rem;
  padding-left: 0.25rem;
  border-color: transparent;
  background: transparent;
}

.navigation.pagination a:focus-visible {
  outline: 3px solid #e8bd45;
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .navigation.pagination .nav-links {
    gap: 0.35rem;
  }

  .navigation.pagination .page-numbers {
    min-width: 40px;
    min-height: 40px;
    padding: 0.45rem 0.65rem;
  }
}

.post-card-thumbnail {
  display: block;
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 8px;
}

.post-card-thumbnail img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.post-card-thumbnail:hover img {
  transform: scale(1.03);
}

.post-card-thumbnail:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

/* Noticias: tarjetas con miniatura, título y extracto */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.post-list .post-card {
  min-width: 0;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.post-card-thumbnail {
  display: block;
  margin: 0 0 1rem;
  overflow: hidden;
  border-radius: 6px;
}

.post-card-thumbnail img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.post-card .post-meta {
  margin: 0 0 0.5rem;
}

.post-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.post-card > p:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .post-list {
    grid-template-columns: 1fr;
  }
}

/* Buscador del encabezado */
.nav-search-toggle {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--yellow, #e8bd45);
  color: var(--black, #171717);
  cursor: pointer;
}

.nav-search-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-search-toggle:focus-visible,
.nav-search-form :focus-visible {
  outline: 3px solid var(--yellow, #e8bd45);
  outline-offset: 3px;
}

.nav-search-form {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.5rem);
  right: 0;
  display: flex;
  width: min(390px, calc(100vw - 2rem));
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--line, #e8e1cf);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.nav-search-form[hidden] {
  display: none;
}

.nav-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-search-form input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  color: #171717;
  font: inherit;
}

.nav-search-form button {
  padding: 0.7rem 0.9rem;
  border: 0;
  border-radius: 5px;
  background: var(--yellow, #e8bd45);
  color: var(--black, #171717);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}