* {
  box-sizing: border-box;
}

:root {
  --card-bg: #ffffff;
  --texto: #222;
  --institucional: #005b96;
  --line-blue: #0067a5;
  --shadow-text: #00121d;
  --gob-burdeos: #611232;
  --gob-burdeos-hover: #4d0e28;
  --gob-blanco: #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
}
/* ======================
 MENU PRINCIPAL
====================== */
/* =========================================================
   CONTENEDOR
========================================================= */

.topbar-ddb {
  width: 100%;
  background: var(--gob-burdeos);
  position: relative;
  z-index: 1000;
}

.topbar-ddb__inner {
  width: min(1400px, 94%);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* =========================================================
   GOB.MX
========================================================= */

.topbar-ddb__gob {
  flex: 0 0 auto;
  color: var(--gob-blanco);
  text-decoration: none;
  font-family: "Gelica", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.topbar-ddb__gob:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* =========================================================
   NAVEGACIÓN
========================================================= */

.topbar-ddb__nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-ddb__nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 0 20px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  transition:
    color 0.25s ease,
    background 0.25s ease;
}

/* Línea inferior elegante */

.topbar-ddb__nav a::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 3px;
  background: #fff;
  border-radius: 3px 3px 0 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

/* Hover */

.topbar-ddb__nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.topbar-ddb__nav a:hover::after {
  transform: scaleX(1);
}

/* Página activa */

.topbar-ddb__nav a.is-active {
  color: #fff;
  font-weight: 600;
}

.topbar-ddb__nav a.is-active::after {
  transform: scaleX(1);
}

/* =========================================================
   BOTÓN HAMBURGUESA
========================================================= */

.topbar-ddb__toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.topbar-ddb__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 6px 0;
  border-radius: 3px;
  background: white;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* ======================
 HEADER
====================== */

.header {
  min-height: 250px;
  padding-top: 10px;
}

.logos-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 50px;
}

.logo-colpos {
  width: 240px;
  opacity: 0;
  transform: translateY(-180px) scale(0.85);
  animation: caidaPremium 1.6s forwards;
}

.logo-ddb {
  width: 180px;
  opacity: 0;
  transform: translateY(-180px) scale(0.85);
  animation: caidaPremium 1.6s forwards;
  animation-delay: 0.35s;
}

@keyframes caidaPremium {
  0% {
    opacity: 0;
    transform: translateY(-180px) scale(0.85);
    filter: drop-shadow(0 0 0 transparent);
  }
  70% {
    opacity: 1;
    transform: translateY(15px) scale(1.03);
    filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.2));
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.12));
  }
}

.layout-principal {
  width: 80%;
  margin: 0 auto;
  position: relative;
}

/* ======================
 TITULO
====================== */

.titulo-container {
  text-align: center;
  margin-top: 25px;
}

.titulo-ddb {
  color: var(--line-blue);
  text-shadow: 0 5px 15px var(--shadow-text);
  font-size: 38px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(50px) scale(0.8);
  animation: tituloEntrada 1.8s forwards;
  animation-delay: 1s;
}

@keyframes tituloEntrada {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ======================
 SLIDER
====================== */

/* .slider-container {
  width: 85%;
  height: 380px;
  margin: 30px auto;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
} */

.slider-container {
  width: 100%;
  height: 45vh;
  margin: 0 auto;
  position: relative;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
  transform-style: preserve-3d;
  transition:
    transform 0.5s ease,
    box-shadow 0.5s ease;
}

.slider-container:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 35px 60px rgba(0, 0, 0, 0.35);
}

.slider {
  position: relative;
  height: 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
} */

/* ==========================
   TRANSICIÓN DESINTEGRACIÓN
========================== */

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  filter: blur(15px);
  transform: scale(1.08);
  transition:
    opacity 1s ease,
    filter 1s ease,
    transform 1s ease;
  pointer-events: none;
}

.slide.activo {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
  z-index: 2;
}

.slide.saliendo {
  opacity: 0;
  filter: blur(20px);
  transform: scale(0.92);
  z-index: 1;
}

.slide.activo {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateX(0);
  /* animation: entradaImagen 5s ease; */
  z-index: 2;
  /* animation: entradaTexto 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both; */
  animation: entradaSlide 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

@keyframes textoEntrada {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translate(-50%, 50px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, 0);
  }
}

@keyframes entrarSlide {
  from {
    opacity: 0;
    transform: scale(1.035) translateX(22px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide.activo img {
  animation: zoomSuave 7s ease forwards;
}

@keyframes zoomSuave {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

.slide.activo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  transform: translateX(-100%);
  animation: brilloSlide 1.2s ease;
  pointer-events: none;
  z-index: 2;
}

@keyframes brilloSlide {
  to {
    transform: translateX(100%);
  }
}

.slider-container:hover .slide img {
  transform: scale(1.08);
}

/* .slider-texto {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  padding: 25ox 35px;
  border-radius: 20px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55)); */
/* background: rgba(0, 0, 0, 0.45); */
/* backdrop-filter: blur(10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  color: white;
  text-align: center; */
/* animation: entradaTexto 1s ease 0.3s both; */
/* } */

/* =========================================================
   TEXTO / CAPTION DEL SLIDER
========================================================= */

.slide-caption {
  position: absolute;
  left: 50%;
  bottom: 45px;
  transform: translateX(-50%);
  width: min(720px, 72%);
  padding: 20px 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(10, 25, 38, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  color: #ffffff;
  text-align: center;
  z-index: 10;
}

/* TÍTULO */

.slide-caption h2 {
  margin: 0 0 7px;
  color: #ffffff;
  font-size: clamp(1.25rem, 2vw, 2rem);
  line-height: 1.15;
}

/* DESCRIPCIÓN */

.slide-caption p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.88rem, 1.15vw, 1rem);
  line-height: 1.45;
}

/* ACCESO */

.slide-caption .slide-acceso {
  display: inline-block;
  margin-top: 10px;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

/* ANIMACIÓN DE ENTRADA */

.slide.activo .slide-caption {
  animation: entradaTexto 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes entradaTexto {
  from {
    opacity: 0;
    transform: translate(-50%, 35px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
  color: white;
  border: none;
  padding: 10px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: white;
  color: #005b96;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  appearance: none;
  outline: none;
  z-index: 20;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: 0.4s;
  animation: aparecerBoton 0.8s ease;
}

.prev:hover,
.next:hover {
  background: #005b96;
  color: white;
  transform: translateY(-50%) scale(1.2) rotate(360deg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.prev {
  left: 35px;
}

.next {
  right: 35px;
}

@keyframes entradaTexto {
  from {
    opacity: 0;
    transform: translate(-50%, 35px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes zoomImagen {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

@keyframes aparecerBoton {
  from {
    opacity: 0;
    scale: 0.5;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

/* ==========================
   INDICADORES SLIDER
========================== */

.indicadores {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 30;
}

.punto {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  opacity: 0.5;
  cursor: pointer;
  transition: 0.4s;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.punto.activo {
  width: 35px;
  border-radius: 10px;
  opacity: 1;
  background: #00a6d6;
}

/* =====================
LINK SLIDE
====================== */
.slide-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.slide-link img {
  position: relative;
  z-index: 1;
}

.slide-caption {
  z-index: 3;
}

.slide-link:focus-visible {
  outline: 3px solid var(--line-blue);
  outline-offset: 4px;
}

.slide-acceso {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0.9;
  transition: transform 0.25s ease;
}

.slide-link:hover .slide-acceso {
  transform: translateX(5px);
}

/* ======================
 MENU TAG
====================== */

/* .menu-tag {
  position: fixed;
  left: 20px;
  top: 280px;
  width: 70px;
  background: #536b7d;
  border-radius: 25px;
  padding: 15px 8px;
  z-index: 1000;
  transition: 0.4s;
}

.menu-tag:hover {
  width: 260px;
} */

/* ==========================
   MENU TAG
========================== */

.menu-tag {
  position: fixed;
  left: 20px;
  top: 55%;
  transform: translateY(-50%);
  width: 70px;
  padding: 15px 10px;
  background: linear-gradient(180deg, #536b80, #8193a1);
  border-radius: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  transition: 0.4s;
  z-index: 1000;
}

/* Expansión al pasar cursor */

.menu-tag:hover {
  width: 270px;
  opacity: 0.92;
}

/* Elementos */

.menu-tag a {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 8px 12px;
  margin: 5px 0;
  color: white;
  text-decoration: none;
  border-radius: 12px;
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Iconos */

.menu-tag a::first-letter {
  font-size: 22px;
}

/* Hover */

.menu-tag a:hover {
  background: #8cccf045;
  transform: translateX(8px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

/* Estado activo */

.menu-tag a.active {
  background: #005b96;
  border: 2px solid white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  transform: translateX(5px);
}

/* Texto oculto cuando está cerrado */

.menu-tag span {
  opacity: 0;
  white-space: nowrap;
  transition: 0.3s;
}

/* Texto visible al abrir */

.menu-tag:hover span {
  opacity: 1;
}

.tag {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  margin: 6px 0;
  border-radius: 12px;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: 0.3s;
}

.tag span {
  font-size: 22px;
  min-width: 30px;
}

.tag:hover {
  background: #7fc4ef;
  transform: translateX(8px);
}

.tag.activo {
  background: #0066a6;
  border: 2px solid white;
}

.categoria {
  font-size: 16px;
  cursor: default;
}
/* ----------------------- */
.menu-tag {
  position: fixed;
  left: 20px;
  top: 55%;
  transform: translateY(-50%);
  width: 70px;
  background: linear-gradient(180deg, #536b80, #8193a1);
  padding: 15px;
  border-radius: 30px;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  transition: 0.4s;
}

.menu-tag:hover {
  width: 280px;
  opacity: 0.9;
}

.tag-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
}

.menu-tag a {
  height: 45px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 8px;
  color: white;
  text-decoration: none;
  border-radius: 10px;
}

.menu-tag a:hover {
  background: #8cccf0;
}

.menu-tag a.active {
  background: #005b96;
  border: 2px solid white;
}

.menu-tag span {
  opacity: 0;
  transition: 0.3s;
}

.menu-tag:hover span {
  opacity: 1;
}

/* ======================
 CONTENIDO
====================== */

.contenido {
  width: 80%;
  margin: 0 auto;
  padding: 40px;
}

.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal-card {
  opacity: 0;
  transform: translateY(50px) scale(0.95);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.cards {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 25px;
}

.card {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  transition: 0.4s;
}

.card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.seccion {
  display: none;
  opacity: 0;
  transform: translateY(30px);
  scroll-margin-top: 120px;
}

.seccion.activa {
  display: block;
  animation: aparecerSeccion 0.6s ease forwards;
}

@keyframes aparecerSeccion {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================
   ANIMACIÓN SECCIONES
========================== */

.seccion {
  width: 100%;
  max-width: 100vh;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.seccion.activa {
  opacity: 1;
  transform: translateY(0);
}

.seccion h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================
   CARDS INSTITUCIONALES
========================== */

.cards-container {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 2rem;
  margin: 30px auto;
}

.card-recurso {
  width: 260px;
  min-width: 260px;
  min-width: 230px;
  height: 390px;
  min-height: 390px;
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 22px;
  background: var(--card-bg);
  color: var(--texto);
  border-radius: 25px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
  overflow: visible;
  opacity: 0;
  transform: translateY(40px);
  z-index: 1;
}

.card-recurso:hover {
  transform: translateY(-15px) scale(1.04);
  box-shadow: 0 35px 60px rgba(0, 0, 0, 0.25);
  z-index: 50;
}

.card-recurso:hover .card-imagen img {
  transform: scale(1.08);
}

.seccion.activa .card-recurso {
  animation: entradaCard 0.7s ease forwards;
}

@keyframes entradaCard {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-recurso h3 {
  min-height: 45px;
  margin: 10px 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}

.card-recurso > p {
  margin: 5px 0 10px;
  line-height: 1.2;
  min-height: 40px;
}

.card-acciones {
  width: 100%;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.card-imagen {
  width: 100%;
  height: 90px;
  flex: 0 0 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  margin-bottom: 10px;
  margin-top: auto;
}

.card-imagen img {
  width: auto;
  height: auto;
  max-width: 85%;
  max-height: 90px;
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease;
}

.card-imagen.logo-horizontal img {
  max-height: 80px;
}

.card-imagen.portada img {
  max-height: 140px;
}

.card-recurso:hover .card-imagen img {
  transform: scale(1.08);
}

.imagen-recurso {
  width: 160px;
  height: 100px;
  object-fit: contain;
  display: block;
}

.logo-horizontal {
  width: 170px;
  height: 90px;
  object-fit: contain;
}

.portada {
  width: 150px;
  height: 180px;
  object-fit: cover;
}

.icono {
  width: 80px;
  height: 80px;
}

.btn-info,
.btn-ingresar {
  display: inline-block;
  margin-top: 1vh;
  padding: 12px 25px;
  border-radius: 30px;
  background: var(--line-blue);
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.btn-ingresar:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-ingresar:visited,
.btn-ingresar:hover,
.btn-ingresar:focus {
  color: #ffffff;
}

.btn-ingresar:visited,
.btn-ingresar:hover,
.btn-ingresar:focus {
  color: #ffffff;
}

.card-recurso:nth-child(1) {
  animation-delay: 0.1s;
}

.card-recurso:nth-child(2) {
  animation-delay: 0.2s;
}

.card-recurso:nth-child(3) {
  animation-delay: 0.3s;
}

.card-recurso:nth-child(4) {
  animation-delay: 0.4s;
}

.card-recurso:hover {
  transform: translateY(-12px) scale(1.04);
  box-shadow: 0 30px 55px rgba(0, 0, 0, 0.25);
}

.card-icono {
  font-size: 45px;
  margin-bottom: 15px;
  transition: 0.4s;
}

.img-size {
  width: 100%;
}

.card-recurso:hover .card-icono {
  transform: scale(1.25) rotate(5deg);
}

.card-recurso button {
  background: #005b96;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
}

.card-recurso button:hover {
  background: #003f66;
  transform: scale(1.08);
}

.cards-container .reveal-card:nth-child(1) {
  transition-delay: 0.1s;
}

.cards-container .reveal-card:nth-child(2) {
  transition-delay: 0.2s;
}

.cards-container .reveal-card:nth-child(3) {
  transition-delay: 0.3s;
}

.cards-container .reveal-card:nth-child(4) {
  transition-delay: 0.4s;
}

/* =========================================================
   SCOPUS + WEB OF SCIENCE
========================================================= */

.cards-destacadas {
  max-width: calc((260px * 2) + 2rem);
  margin: 40px auto 35px;
}

/* =========================================================
   MÁXIMO 4 CARDS POR FILA
========================================================= */

.cards-cuatro {
  max-width: calc((260px * 4) + (2rem * 3));
  margin: 0 auto 50px;
}

.card-burbuja {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 15px);
  width: 260px;
  padding: 18px 20px;
  background: rgba(20, 35, 50, 0.94);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* Estado oculto */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 15px) scale(0.92);
  transition:
    opacity 0.3s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.3s ease;
  z-index: 100;
}

.card-recurso:hover .card-burbuja {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}

.card-burbuja::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid rgba(20, 35, 50, 0.94);
}

.card-burbuja strong {
  display: block;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.card-burbuja ul {
  margin: 0;
  padding-left: 18px;
  text-align: left;
}

.card-burbuja li {
  margin: 6px 0;
  line-height: 1.3;
  font-size: 0.85rem;
}

.card-burbuja strong,
.card-burbuja ul,
.card-burbuja li {
  color: #ffffff;
}

.card-burbuja.burbuja-larga {
  width: min(560px, 75vw);
  padding: 22px 25px;
}

.card-burbuja.burbuja-larga ul {
  columns: 2;
  column-gap: 35px;
  padding-left: 20px;
}

.card-burbuja.burbuja-larga li {
  break-inside: avoid;
  margin-bottom: 8px;
  font-size: 0.82rem;
  line-height: 1.3;
}

.card-burbuja.burbuja-xl {
  width: min(800px, 82vw);

  padding: 22px 28px;
}

.card-burbuja.burbuja-xl ul {
  columns: 3;
  column-gap: 32px;
}

.card-burbuja.burbuja-xl li {
  font-size: 0.78rem;
  line-height: 1.25;
  margin-bottom: 7px;
  break-inside: avoid;
}

.cards-2 {
  max-width: calc((260px * 2) + (2rem * 1));
}

.cards-4 {
  max-width: calc((260px * 4) + (2rem * 3));
}

.card-imagen img.documento {
  max-width: 135px;
  max-height: 115px;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18);
}

.card-recurso:has(.documento) .card-imagen {
  position: relative;
}

.card-recurso:has(.documento) .card-imagen::after {
  content: "PDF";
  position: absolute;
  right: 8px;
  bottom: 5px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #b3261e;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
}

.card-burbuja::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid rgba(20, 35, 50, 0.96);
}

html[data-theme="dark"] .card-burbuja::after {
  border-top-color: rgba(29, 45, 58, 0.97);
}

/* ======================================
MODO OSCURO
======================================= */
body.dark {
  --card-bg: #1c1c1c;
  --texto: #eee;
}

/* =========================================================
   VISTA INTERNA DE RECURSOS
========================================================= */

.vista-recursos-interna {
  width: 100%;
  max-width: 1200px;
  margin: 30px auto 60px;
}

.vista-recursos-header {
  text-align: center;
  margin-bottom: 35px;
}

.vista-recursos-header h3 {
  font-size: 1.6rem;
  margin: 25px 0 10px;
}

.vista-recursos-header p {
  max-width: 650px;
  margin: auto;
  line-height: 1.5;
}

.btn-regresar-recursos {
  border: none;
  background: var(--line-blue);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.btn-regresar-recursos:hover {
  transform: translateX(-5px);

  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.subrecursos-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 2rem;
  width: 100%;
}

.subrecurso-card {
  width: 260px;
  min-height: 260px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--card-bg);
  border-radius: 25px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.subrecurso-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
}

.subrecurso-card .btn-ingresar {
  margin-top: auto;
}

/* =========================================================
   RESET BOTÓN SUBMENU
========================================================= */

button.btn-ingresar.btn-submenu {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: none;
  font: inherit;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  margin: 0;
  width: auto;
  height: auto;
  min-width: 108px;
  padding: 12px 25px;
  background: var(--line-blue);
  color: #fff;
  border-radius: 30px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

button.btn-ingresar.btn-submenu:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   NUEVOS MATERIALES
========================================================= */

.nuevos-materiales {
  width: min(1180px, 90%);
  margin: 80px auto;
  padding: 10px 0;
}

.seccion-encabezado {
  max-width: 720px;
  margin: 0 auto 38px;
  text-align: center;
}

.seccion-eyebrow {
  color: var(--line-blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.seccion-encabezado h2 {
  margin: 7px 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.seccion-encabezado p {
  margin: 0;
  color: #5d6770;
  line-height: 1.6;
}

/* =========================================================
   GRID
========================================================= */

.nuevos-materiales-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

/* =========================================================
   CARD
========================================================= */

.nuevo-material-card {
  width: min(100%, 520px);
  background: #fff;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.11);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.nuevo-material-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 28px 55px rgba(0, 0, 0, 0.2);
}

.nuevo-material-link {
  min-height: 300px;
  display: grid;
  grid-template-columns: 190px 1fr;
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   PORTADA
========================================================= */

.nuevo-material-imagen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  background: linear-gradient(145deg, #edf6fb, #dcecf5);
}

.nuevo-material-imagen img {
  max-width: 150px;
  max-height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.16));
  transition: transform 0.35s ease;
}

.nuevo-material-card:hover .nuevo-material-imagen img {
  transform: scale(1.05) rotate(-1deg);
}

/* =========================================================
   INFORMACIÓN
========================================================= */

.nuevo-material-contenido {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nuevo-material-tipo {
  margin-bottom: 8px;
  color: var(--line-blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nuevo-material-contenido h3 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.nuevo-material-contenido p {
  margin: 0 0 20px;
  color: #555;
  line-height: 1.5;
}

.nuevo-material-acceso {
  color: var(--line-blue);
  font-weight: 700;
  transition: transform 0.25s ease;
}

.nuevo-material-card:hover .nuevo-material-acceso {
  transform: translateX(5px);
}

/* =========================================================
   OTROS ACCESOS
========================================================= */

.otros-accesos {
  width: min(1180px, 90%);
  margin: 80px auto;
}

.otros-accesos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 2rem;
}

.otro-acceso-card {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.11);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.otro-acceso-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 28px 55px rgba(0, 0, 0, 0.2);
}

.otro-acceso-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.otro-acceso-imagen {
  height: 150px;
  padding: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f3f8fb, #e7f1f7);
}

.otro-acceso-imagen img {
  max-width: 85%;
  max-height: 110px;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.otro-acceso-card:hover .otro-acceso-imagen img {
  transform: scale(1.07);
}

.otro-acceso-contenido {
  flex: 1;
  padding: 25px;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.otro-acceso-contenido h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.otro-acceso-contenido p {
  margin: 0 0 22px;
  color: #59636c;
  line-height: 1.5;
}

.otro-acceso-contenido span {
  margin-top: auto;
  color: var(--line-blue);
  font-weight: 700;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 650px) {
  .nuevos-materiales {
    margin: 60px auto;
  }

  .nuevo-material-link {
    grid-template-columns: 1fr;
  }

  .nuevo-material-imagen {
    min-height: 230px;
  }

  .nuevo-material-contenido {
    padding: 25px;

    text-align: center;
  }
}

/* =======================================
RESPONSIVE DEL SITIO
======================================== */
/* =========================================================
   RESPONSIVE MENÚ PRINCIPAL
========================================================= */

@media (max-width: 850px) {
  .topbar-ddb__inner {
    min-height: 64px;
  }

  .topbar-ddb__gob {
    font-size: 1.55rem;
  }

  .topbar-ddb__toggle {
    display: block;
  }

  .topbar-ddb__nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--gob-burdeos);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      visibility 0.25s ease;
  }

  .topbar-ddb__nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .topbar-ddb__nav a {
    min-height: 55px;
    justify-content: center;
    padding: 0 6%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .topbar-ddb__nav a::after {
    left: 50%;
    right: auto;
    width: 45px;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
  }

  .topbar-ddb__nav a:hover::after {
    transform: translateX(-50%) scaleX(1);
  }

  .topbar-ddb__nav a.is-active::after {
    transform: translateX(-50%) scaleX(1);
  }

  /* =================================
    NENÚ TAGS
 =================================== */

  body {
    padding-bottom: 95px;
  }

  /* ======================================
       CONTENEDOR
       MISMO TAMAÑO INCLUSO CON HOVER
    ====================================== */

  .menu-tag,
  .menu-tag:hover,
  .menu-tag:focus-within {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: 12px !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 24px) !important;
    max-width: 560px !important;
    height: 64px !important;
    padding: 7px 9px !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    align-items: center;
    gap: 4px;
    border-radius: 22px !important;
    background: rgba(76, 105, 125, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    overflow: visible;
    z-index: 3000;
    transition: none !important;
    touch-action: manipulation;
  }

  /* ======================================
       BOTONES
    ====================================== */

  .menu-tag a,
  .menu-tag a:hover,
  .menu-tag a:focus,
  .menu-tag a:active {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    transform: none !important;
    transition:
      background 0.25s ease,
      box-shadow 0.25s ease;
    -webkit-tap-highlight-color: transparent;
  }

  /* =========================================================
   BOTONES DDB - COLOR CONSISTENTE
========================================================= */

  .btn-ingresar,
  .btn-ingresar:link,
  .btn-ingresar:visited,
  .btn-ingresar:hover,
  .btn-ingresar:focus,
  .btn-ingresar:active,
  .btn-info,
  .btn-info:link,
  .btn-info:visited,
  .btn-info:hover,
  .btn-info:focus,
  .btn-info:active {
    color: #fff !important;
  }

  /* Texto oculto */

  .menu-tag a span {
    display: none !important;
  }

  /* ======================================
       ACTIVO
    ====================================== */

  .menu-tag a.active,
  .menu-tag a.active:hover,
  .menu-tag a.active:focus,
  .menu-tag a.active:active {
    width: 100% !important;
    background: var(--line-blue);
    border: 2px solid #fff;
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  }

  .otros-accesos-grid {
    grid-template-columns: 1fr;
  }

  .slide-caption {
    bottom: 28px;
    width: calc(100% - 40px);
    padding: 15px 18px;
    border-radius: 16px;
  }

  .slide-caption h2 {
    font-size: 1.15rem;
  }

  .slide-caption p {
    font-size: 0.84rem;
  }
}

@media (max-width: 1200px) {
  .cards-container {
    grid-template-columns: repeat(3, minmax(220px, 260px));
  }
}

@media (max-width: 900px) {
  .cards-container {
    grid-template-columns: repeat(2, minmax(220px, 260px));
  }
}

@media (max-width: 600px) {
  .cards-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .card-burbuja.burbuja-larga,
  .card-burbuja.burbuja-xl {
    width: min(90vw, 420px);
  }

  .card-burbuja.burbuja-larga ul,
  .card-burbuja.burbuja-xl ul {
    columns: 1;
  }
}

@media (hover: hover) and (pointer: fine) {
  .menu-tag:hover {
    /* efectos exclusivos de mouse */
  }

  .menu-tag a:hover {
    /* efectos exclusivos de mouse */
  }
}
