
/* =========================================================
   EDUCA DIGITAL — ENCABEZADO COMPARTIDO
   Color principal: #2e4053
   Color de acento: #e11d48
   ========================================================= */

.topbar {
  --header-blue: #2e4053;
  --header-red: #e11d48;
  --header-white: #ffffff;

  position: sticky;
  top: 0;
  z-index: 2000;
  width: 100%;
  color: var(--header-white);
  background: linear-gradient(110deg, #2e4053 0%, #263849 100%);
  border-bottom: 3px solid var(--header-red);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  width: 100%;
}

.topbar *,
.topbar *::before,
.topbar *::after {
  box-sizing: border-box;
}

/* =========================================================
   BARRA SUPERIOR
   ========================================================= */

.topbar .header-top {
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.topbar .header-top-container {
  width: min(1240px, calc(100% - 48px));
  min-height: 38px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar .header-email {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.topbar .header-email:hover {
  color: #ffffff;
}

/* =========================================================
   ENLACES DE LA DERECHA
   ========================================================= */

.topbar .header-social {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
}

.topbar .header-schedule {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.topbar .header-schedule:hover {
  color: #ffb6c5;
}

/* =========================================================
   ICONOS DE REDES SOCIALES
   ========================================================= */

.topbar .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.topbar .social-icon:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}

.topbar .social-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* =========================================================
   ENCABEZADO PRINCIPAL
   ========================================================= */

.topbar .header-container {
  width: min(1240px, calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

/* LOGOTIPO */

.topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: #ffffff;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: 0.045em;
  white-space: nowrap;
}

.topbar .brand img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 44px;
}

.topbar .brand span {
  color: #ffffff;
  font-size: 1rem;
}

/* BOTÓN PRINCIPAL */

.topbar .header-info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--header-red);
  border-radius: 999px;
  color: #ffffff;
  background: var(--header-red);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.2);
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.topbar .header-info-button:hover {
  color: var(--header-red);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* ACCESIBILIDAD */

.topbar .brand:focus-visible,
.topbar .header-info-button:focus-visible,
.topbar .header-email:focus-visible,
.topbar .header-schedule:focus-visible,
.topbar .social-icon:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

/* =========================================================
   WHATSAPP FLOTANTE — TODAS LAS PÁGINAS
   ========================================================= */

.imessage-float {
  position: fixed !important;
  right: 24px !important;
  bottom: 24px !important;
  z-index: 99999 !important;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 64px;
  height: 64px;

  border-radius: 50%;
  background: #ffffff;

  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.imessage-float img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.imessage-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.28);
}

.imessage-float:focus-visible {
  outline: 3px solid #e11d48;
  outline-offset: 4px;
}

/* =========================================================
   MÓVILES
   ========================================================= */

@media (max-width: 600px) {

  .topbar .header-top {
    display: none !important;
  }

  .topbar .header-container {
    width: calc(100% - 32px);
    min-height: 0;
    padding: 14px 0;
    flex-direction: column;
    gap: 12px;
  }

  .topbar .brand img {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .topbar .brand span {
    font-size: 0.95rem;
  }

  .topbar .header-info-button {
    width: 100%;
    max-width: 280px;
    min-height: 42px;
    font-size: 0.9rem;
  }
}
