/* =========================================================
   HEADER DDB V2
========================================================= */

:root {
  --gob-burdeos: #611232;
  --line-blue: #0076b2;
}

/* =========================================================
   MENÚ PRINCIPAL
========================================================= */

.topbar-ddb {
  width: 100%;
  position: relative;
  background: var(--gob-burdeos);
  z-index: 4000;
}

.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: #fff;
  font-family: "Gelica", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: opacity 0.25s ease;
}

.topbar-ddb__gob:hover {
  opacity: 0.85;
}

/* =========================================================
   NAVEGACIÓN
========================================================= */

.topbar-ddb__nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-ddb__nav a {
  min-height: 72px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: rgba(255, 255, 255, 0.93);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  transition:
    color 0.25s ease,
    background 0.25s ease;
}

.topbar-ddb__nav a::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.topbar-ddb__nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.topbar-ddb__nav a:hover::after,
.topbar-ddb__nav a.is-active::after {
  transform: scaleX(1);
}

.topbar-ddb__nav a.is-active {
  color: #fff;
  font-weight: 700;
}

/* =========================================================
   HAMBURGUESA
========================================================= */

.topbar-ddb__toggle {
  width: 48px;
  height: 48px;
  display: none;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.topbar-ddb__toggle span {
  width: 100%;
  height: 2px;
  display: block;
  margin: 6px 0;
  background: #fff;
  border-radius: 3px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* =========================================================
   ENTRADA ORIGINAL HEADER DDB
   Adaptada del CSS principal
========================================================= */

.header-entrada {
  opacity: 0;
  animation-fill-mode: forwards;
}

/* =========================================================
   LOGO COLEGIO DE POSTGRADUADOS
========================================================= */

.header-entrada--izquierda {
  opacity: 0;
  transform: translateY(-180px) scale(0.85);
  animation: caidaPremium 1.6s forwards;
}

/* =========================================================
   LOGO DDB
========================================================= */

.header-entrada--derecha {
  opacity: 0;
  transform: translateY(-180px) scale(0.85);
  animation: caidaPremium 1.6s forwards;
  animation-delay: 0.35s;
}

/* =========================================================
   CAÍDA PREMIUM DE LOS LOGOS
========================================================= */

@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));
  }
}

/* =========================================================
   TÍTULO DDB
========================================================= */

.header-entrada--titulo {
  opacity: 0;
  transform: translateY(50px) scale(0.8);
  animation: tituloEntrada 1.8s forwards;
  animation-delay: 1s;
}

/* =========================================================
   ENTRADA DEL TÍTULO
========================================================= */

@keyframes tituloEntrada {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================================================
   ACCESIBILIDAD
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .header-entrada,
  .header-entrada--izquierda,
  .header-entrada--derecha,
  .header-entrada--titulo {
    opacity: 1;
    animation: none !important;
    transform: none !important;
    filter: none !important;
  }
}

/* =========================================================
   BRANDING DDB
========================================================= */

.ddb-branding {
  width: 100%;
  padding: 25px 4% 20px;
  background: #fff;
}

/* =========================================================
   LOGOS
========================================================= */

.ddb-branding__logos {
  width: min(1400px, 100%);
  min-height: 115px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.ddb-branding__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.ddb-branding__logo img {
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.ddb-branding__logo--colpos img {
  max-width: 270px;
  max-height: 95px;
}

.ddb-branding__logo--ddb img {
  max-width: 245px;
  max-height: 105px;
}

/* =========================================================
   TÍTULO
========================================================= */

.ddb-branding__titulo {
  width: min(1500px, 100%);
  margin: 15px auto 0;
  text-align: center;
}

.ddb-branding__titulo h1 {
  margin: 0;
  color: var(--line-blue);
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0.015em;
  text-shadow: 0 8px 12px rgba(0, 0, 0, 0.25);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@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%;
    text-align: center;
    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);
  }

  .topbar-ddb__nav a:hover::after,
  .topbar-ddb__nav a.is-active::after {
    transform: translateX(-50%) scaleX(1);
  }

  /* =====================================
       BRANDING
    ===================================== */

  .ddb-branding {
    padding: 20px 5% 18px;
  }

  .ddb-branding__logos {
    min-height: 100px;

    gap: 20px;
  }

  .ddb-branding__logo--colpos img {
    max-width: min(38vw, 220px);
  }

  .ddb-branding__logo--ddb img {
    max-width: min(35vw, 200px);
  }

  .ddb-branding__titulo {
    margin-top: 20px;
  }

  .ddb-branding__titulo h1 {
    font-size: clamp(1.9rem, 6.8vw, 2.65rem);
    line-height: 1.15;
  }
}

/* =========================================================
   TELÉFONOS PEQUEÑOS
========================================================= */

@media (max-width: 480px) {
  .ddb-branding {
    padding-left: 18px;
    padding-right: 18px;
  }

  .ddb-branding__logos {
    min-height: 90px;
  }

  .ddb-branding__logo--colpos img {
    max-width: 42vw;
  }

  .ddb-branding__logo--ddb img {
    max-width: 40vw;
  }

  .ddb-branding__titulo h1 {
    font-size: clamp(1.75rem, 8.3vw, 2.25rem);
  }
}
