/* =========================================================
   VARIABLES (solo necesarias para topbar)
   ========================================================= */

:root {
  --azul-topbar: #0251A2;
  --texto-claro: #ffffff;
  --borde: rgba(255, 255, 255, 0.28);
  --font: Arial, Helvetica, sans-serif;
}


/* =========================================================
   TOPBAR BASE
   ========================================================= */

.topbar {
  display: flex;
  align-items: center;
  height: 46px;

  background: var(--azul-topbar);
  color: var(--texto-claro);
}


/* CONTENEDOR */
.topbar .contenedor {
  width: 100%;
  margin: 0;
  padding: 0 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}


/* =========================================================
   BLOQUES IZQUIERDA Y DERECHA
   ========================================================= */

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.topbar-left {
  gap: 14px;
}


/* =========================================================
   LINKS (correo, aula virtual, intranet)
   ========================================================= */

.topbar-link {
  display: flex;
  align-items: center;

  padding: 0 18px;
  line-height: 46px;

  color: var(--texto-claro);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;

  white-space: nowrap;
  border-right: 1px solid var(--borde);

  transition: background 0.25s ease;
}

/* Quita bordes innecesarios */
.topbar-right .topbar-link:last-child,
.topbar-left .topbar-link:last-child {
  border-right: none;
}

.topbar-left .topbar-link:first-child {
  padding-left: 0;
}

/* Hover */
.topbar-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Iconos dentro de links */
.topbar-right i {
  margin-right: 8px;
  font-size: 14px;
  color: #ffc400;
}


/* =========================================================
   REDES SOCIALES
   ========================================================= */

.social-link {
  width: 32px;
  height: 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);

  color: var(--texto-claro);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;

  transition: background 0.25s ease, transform 0.25s ease;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}


/* =========================================================
   RESPONSIVE (TABLET Y MÓVIL)
   ========================================================= */

@media (max-width: 640px) {

  /* Topbar más flexible */
  .topbar {
    height: auto;
    padding: 8px 0;
  }

  /* Contenedor en columna */
  .topbar .contenedor {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Ocultar redes */
  .topbar-left {
    display: none;
  }

  /* Ajustar links */
  .topbar-right {
    width: 100%;
    justify-content: center;
    gap: 10px;
  }

  /* Ocultar correo */
  .topbar-right a[href^="mailto"] {
    display: none;
  }

  /* Botones tipo pill */
  .topbar-link {
    padding: 8px 12px;
    line-height: 1.4;
    border-right: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
  }
}