/* ==========================================================
   HEADER EXCLUSIVO GEOPLOT CAMPUS
========================================================== */

.campus-header {
  position: relative;
  z-index: 2000;
  width: 100%;
  font-family: "Inter", sans-serif;
}


/* ==========================================================
   CONTENEDOR GENERAL
========================================================== */

.campus-header__container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}


/* ==========================================================
   FRANJA SUPERIOR
========================================================== */

.campus-header__main {
  width: 100%;
  background: #050b12;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.campus-header__main .campus-header__container {
  min-height: 82px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}


/* ==========================================================
   GRUPO DE MARCA
   GEOPLOT CAMPUS + PLATAFORMA DE TRANSFERENCIA TECNOLÓGICA
========================================================== */

.campus-header__brand-group {
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 1;
}

.campus-header__brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.campus-header__brand img {
  display: block;
  width: auto;
  max-width: 310px;
  height: 58px;
  object-fit: contain;
}


/* Texto ubicado al lado del logo */

.campus-header__transfer-label {
  padding-left: 20px;

  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;

  border-left: 1px solid rgba(255, 255, 255, 0.28);
}


/* ==========================================================
   NAVEGACIÓN PRINCIPAL
========================================================== */

.campus-header__main-nav {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-shrink: 0;
}

.campus-header__main-nav a {
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;

  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.campus-header__main-nav a:hover,
.campus-header__main-nav a:focus-visible {
  color: #22c5f6;
}


/* ==========================================================
   BOTÓN INICIAR SESIÓN
========================================================== */

.campus-header__login {
  padding: 11px 18px;

  color: #ffffff !important;
  background: #087fca;
  border-radius: 8px;

  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.campus-header__login:hover,
.campus-header__login:focus-visible {
  color: #ffffff !important;
  background: #056ba9;
  transform: translateY(-1px);
}


/* ==========================================================
   SEGUNDA FRANJA
   PERSONAS · NEGOCIOS · ORGANISMOS · GOBIERNOS
========================================================== */

.campus-header__audiences {
  width: 100%;
  background: #06121f;
  border-bottom: 2px solid #16b9f1;
}

.campus-header__audiences-nav {
  width: min(1180px, calc(100% - 40px));
  min-height: 48px;
  margin-inline: auto;

  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 38px;
}

.campus-header .campus-header__audiences-nav a,
.campus-header .campus-header__audiences-nav a:link,
.campus-header .campus-header__audiences-nav a:visited {
  position: relative;

  min-height: 48px;

  display: inline-flex;
  align-items: center;

  color: #ffffff !important;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;

  opacity: 1;

  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.campus-header__audiences-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;

  width: 0;
  height: 3px;
  margin-inline: auto;

  content: "";
  background: #22c5f6;

  transition: width 0.2s ease;
}

.campus-header__audiences-nav a:hover,
.campus-header__audiences-nav a:focus-visible,
.campus-header__audiences-nav a.is-active {
  color: #ffffff;
}

.campus-header__audiences-nav a:hover::after,
.campus-header__audiences-nav a:focus-visible::after,
.campus-header__audiences-nav a.is-active::after {
  width: 100%;
}


/* ==========================================================
   BOTÓN MÓVIL
========================================================== */

.campus-header__menu-button {
  display: none;

  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;

  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;

  cursor: pointer;
}

.campus-header__menu-button span {
  display: block;

  width: 22px;
  height: 2px;
  margin: 5px auto;

  background: #ffffff;

  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}


/* ==========================================================
   ESTADO DEL BOTÓN MÓVIL ABIERTO
========================================================== */

.campus-header__menu-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.campus-header__menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.campus-header__menu-button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================
   RESPONSIVE TABLET
========================================================== */

@media (max-width: 1050px) {

  .campus-header__main-nav {
    gap: 18px;
  }

  .campus-header__main-nav a {
    font-size: 0.86rem;
  }

  .campus-header__transfer-label {
    font-size: 0.82rem;
  }

  .campus-header__brand img {
    max-width: 270px;
  }

}


/* ==========================================================
   RESPONSIVE MÓVIL
========================================================== */

@media (max-width: 860px) {

  .campus-header__container {
    width: min(100% - 32px, 1180px);
  }

  .campus-header__main .campus-header__container {
    min-height: 72px;
  }

  .campus-header__brand-group {
    gap: 0;
  }

  .campus-header__brand img {
    max-width: 245px;
    height: 50px;
  }

  .campus-header__transfer-label {
    display: none;
  }

  .campus-header__main-nav {
    display: none;
  }

  .campus-header__menu-button {
    display: block;
  }

  .campus-header__audiences-nav {
    display: none;

    width: min(100% - 32px, 1180px);
    min-height: 0;
    padding: 12px 0 18px;

    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .campus-header__audiences-nav.is-open {
    display: flex;
  }

  .campus-header__audiences-nav a {
    width: 100%;
    min-height: 48px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .campus-header__audiences-nav a::after {
    right: 0;
    left: 0;
  }

}


/* ==========================================================
   RESPONSIVE TELÉFONOS PEQUEÑOS
========================================================== */

@media (max-width: 560px) {

  .campus-header__main .campus-header__container {
    min-height: 68px;
  }

  .campus-header__brand img {
    max-width: 210px;
    height: 44px;
  }

  .campus-header__menu-button {
    width: 42px;
    height: 42px;
  }

}
/* ==========================================================
   BOTONES SUPERIORES — CURSOS Y VOLVER A GEOPLOT
========================================================== */

.campus-header .campus-header__main-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Estilo común de los dos enlaces */

.campus-header .campus-header__main-nav > a {
  display: inline-flex;
  min-height: 42px;

  align-items: center;
  justify-content: center;
  gap: 7px;

  padding: 10px 17px;

  color: #ffffff !important;
  background: transparent !important;

  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  border-radius: 999px;

  font-family: "Inter", Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none !important;

  opacity: 1 !important;

  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

/* Flecha */

.campus-header .campus-header__back-arrow {
  color: #36b7e5 !important;

  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

/* Hover de los dos botones */

.campus-header .campus-header__main-nav > a:hover {
  color: #ffffff !important;
  background: rgba(7, 141, 189, 0.18) !important;

  border-color: #36b7e5 !important;

  transform: translateY(-1px);

  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.16);
}

/* Curso activo */

.campus-header
.campus-header__main-nav
a[href="/campus/cursos/"].is-active,
.campus-header
.campus-header__main-nav
a[href="/campus/cursos/"][aria-current="page"] {
  color: #ffffff !important;
  background: rgba(7, 141, 189, 0.22) !important;

  border-color: #36b7e5 !important;
}

/* Volver a GEOPLOT */

.campus-header .campus-header__back-geoplot {
  color: #ffffff !important;
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1080px) {

  .campus-header .campus-header__main-nav {
    gap: 8px;
  }

  .campus-header .campus-header__main-nav > a {
    min-height: 40px;
    padding: 9px 13px;

    font-size: 0.78rem;
  }

}
/* ==========================================================
   GEOPLOT CAMPUS — HEADER MÓVIL DEFINITIVO
   Logo + menú en primera fila
   Cursos + Volver a GEOPLOT en segunda fila
========================================================== */

@media (max-width: 560px) {

  /* Contenedor superior en dos filas */

  .campus-header__main .campus-header__container {
    width: calc(100% - 24px);
    min-height: auto;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    grid-template-areas:
      "brand menu"
      "links links";

    gap: 10px 12px;

    padding-top: 10px;
    padding-bottom: 10px;
  }


  /* Marca GEOPLOT Campus */

  .campus-header__brand-group {
    grid-area: brand;

    width: 100%;
    min-width: 0;
  }

  .campus-header__brand {
    width: 100%;
    min-width: 0;
  }

  .campus-header__brand img {
    width: auto;
    max-width: min(100%, 210px);
    height: 42px;

    object-fit: contain;
    object-position: left center;
  }


  /* El texto descriptivo sigue oculto */

  .campus-header__transfer-label {
    display: none;
  }


  /* Botón hamburguesa */

  .campus-header__menu-button {
    grid-area: menu;

    display: block;

    width: 42px;
    height: 42px;

    align-self: center;
    justify-self: end;
  }


  /* Cursos y Volver a GEOPLOT */

  .campus-header .campus-header__main-nav {
    grid-area: links;

    width: 100%;

    display: grid;
    grid-template-columns:
      minmax(90px, 0.7fr)
      minmax(0, 1.3fr);

    gap: 10px;
  }

  .campus-header .campus-header__main-nav > a {
    width: 100%;
    min-width: 0;
    min-height: 40px;

    padding: 8px 10px;

    font-size: 0.76rem;
    line-height: 1.1;

    white-space: nowrap;
  }


  /* Menú desplegable de públicos */

  .campus-header__audiences-nav {
    width: calc(100% - 24px);
  }

}