:root {
  --govco-blue: #3366cc;
  --govco-blue-dark: #004884;
  --govco-white: #ffffff;
  --govco-focus: #ffffff;
}

/* Barra siempre visible arriba del header */
.govco-topbar{
  background: var(--govco-blue);
  height: 48px;
  width: 100%;
  position: relative;        /* crea contexto propio */
  z-index: 99999;            /* por si el header es sticky */
}

.govco-topbar__container{
  height: 48px;
  margin-left: 86px;
  margin-right: 86px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}

/* Área activa ≥44x44 */
.govco-topbar__logo,
.govco-topbar__lang{
  height:44px; min-width:44px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:6px;
}

/* Logo 24x136 */
.govco-topbar__logo img{ width:136px; height:24px; display:block; }
.govco-topbar__logo:hover{ background: rgba(255,255,255,.06); }
.govco-topbar__logo:focus-visible{ outline:2px solid var(--govco-focus); outline-offset:3px; }

/* Botón idioma 24x24 sobre fondo blanco */
.govco-topbar__lang{
  background: var(--govco-white);
  border:2px solid var(--govco-white);
  cursor:pointer;
}
.govco-topbar__lang:focus-visible{ outline:2px solid var(--govco-focus); outline-offset:3px; }
.govco-topbar__lang:active{ transform: translateY(1px); }

/* Ícono 24x24 */
.govco-topbar__lang-icon{ width:24px; height:24px; fill: var(--govco-blue); transition: fill .15s ease; }
.govco-topbar__lang:hover .govco-topbar__lang-icon{ fill: var(--govco-white); }
.govco-topbar__lang:hover{ background: var(--govco-blue-dark); }

/* Texto para lectores de pantalla */
.govco-topbar__sr-only{
  position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* En móvil puedes reducir márgenes (opcional) */
@media (max-width: 991px){
  .govco-topbar__container{ margin-left:16px; margin-right:16px; }
}

/* (Opcional) Oculta el selector de idioma del tema/plugin si te duplíca el botón */
.header .wpml-ls, .site-header .wpml-ls, .header .polylang, .site-header .polylang { display:none; }

.govco-topbar__lang{
  display:inline-flex;align-items:center;justify-content:center;
  height:44px;min-width:44px;padding:0;background:transparent;border:0;border-radius:6px;cursor:pointer;
}
.govco-topbar__lang:focus-visible{ outline:2px solid #fff; outline-offset:3px; }

/* Chapita EN/ES (24×24) */
.govco-topbar__lang-badge{
  display:inline-flex;align-items:center;justify-content:center;
  width:24px;height:24px;border-radius:6px;
  background:#fff;border:2px solid #fff;box-sizing:border-box;
  color:#3366cc;font:600 12px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.govco-topbar__lang:hover .govco-topbar__lang-badge{ background:#004884; color:#fff; border-color:#fff; }

.govco-topbar__logo img {
  height: 24px;
  width: auto;
  aspect-ratio: 136 / 24;
  display: block;
}

.govco-topbar__lang-badge {
  transition: all 0.2s ease-in-out;
  
  /* Fijar tamaño exacto del logo y evitar estiramientos del tema/Bootstrap/Astra */
.govco-topbar__logo,
.govco-topbar__logo img {
  flex: 0 0 auto !important;
}

.govco-topbar__logo img {
  width: 136px !important;
  height: 24px !important;
  max-width: none !important;   /* ignora img {max-width:100%} del tema */
  display: block !important;
  object-fit: contain;          /* seguridad adicional */
  aspect-ratio: 136 / 24;       /* navegadores modernos (no hace daño si no aplica) */
}

/* Si el tema fuerza alturas a logos globales, neutralízalas SOLO dentro de la topbar */
.govco-topbar img.custom-logo,
.govco-topbar .site-logo img {
  max-height: none !important;
  height: 24px !important;
  width: 136px !important;
}

/* --- Corrección de proporción GOV.CO (Chrome, Firefox, Brave) --- */
.govco-topbar__logo img {
  display: block !important;
  width: 136px !important;      /* ancho exacto GOV.CO */
  height: 24px !important;      /* alto exacto GOV.CO */
  object-fit: contain !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  aspect-ratio: 136 / 24;       /* asegura proporción fija */
}

/* Neutraliza reglas globales del tema o plugins */
.govco-topbar img.custom-logo,
.govco-topbar img.site-logo,
.govco-topbar img {
  max-height: none !important;
  height: 24px !important;
  width: 136px !important;
}

/* Corrige proporción del logo GOV.CO en todos los navegadores */
.govco-topbar__logo img {
  display: block !important;
  width: 136px !important;
  height: 24px !important;
  object-fit: contain !important;
  max-width: none !important;     /* ignora max-width:100% de Astra */
  aspect-ratio: 136 / 24;
}




