:root {
  --azul-topbar: #0251A2;
  --azul-menu: #ffffff;
  --texto-claro: #ffffff;
  --texto-menu: #000000;
  --verde-acento: #0A7C0A;
  --hover: #e8f0fb;
  --borde: rgba(255, 255, 255, 0.28);
  --sombra: 0 2px 10px rgba(0, 0, 0, 0.08);
  --font: Arial, Helvetica, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background: #f5f7fa;
}


/* =========================================================
   CONTENEDOR GLOBAL DEL HEADER
   ========================================================= */

.header-global {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--sombra);
}


/* =========================================================
   NAVBAR PRINCIPAL
   ========================================================= */

.navbar {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  height: 84px;
  background: var(--azul-menu);
}

.navbar .contenedor {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 20px;
}


/* =========================================================
   LOGO
   ========================================================= */

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-box {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-texto {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-texto strong {
  color: var(--texto-menu);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
}

.logo-texto span {
  color: var(--verde-acento);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}


/* =========================================================
   MENÚ DESKTOP
   ========================================================= */

.menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  flex-wrap: wrap;
}

.menu li {
  list-style: none;
}

.menu a {
  position: relative;
  color: var(--texto-menu);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.menu a:hover,
.menu li.activo a {
  color: var(--azul-topbar);
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  background: var(--verde-acento);
  transition: width 0.25s ease;
}

.menu a:hover::after,
.menu li.activo a::after {
  width: 100%;
}


/* =========================================================
   BOTÓN HAMBURGUESA
   Se muestra solo en tablet y móvil
   ========================================================= */

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 1100;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--azul-topbar);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Animación del botón al abrir */
.menu-toggle.activo span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.activo span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.activo span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


/* =========================================================
   RESPONSIVE - TABLET Y MÓVIL
   En estas medidas:
   - se oculta el texto del logo
   - aparece hamburguesa
   - el menú se despliega debajo
   ========================================================= */

@media (max-width: 980px) {
  .navbar {
    height: 72px;
  }

  .navbar .contenedor {
    padding: 0 16px;
  }

  .logo {
    gap: 10px;
  }

  .logo-box {
    width: 46px;
    height: 46px;
  }

  .logo-texto {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .menu {
    position: absolute;
    top: 100%;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-left: 0;
    padding: 10px 0;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
    overflow: hidden;
  }

  .menu.abierto {
    display: flex;
  }

  .menu li {
    width: 100%;
  }

  .menu a {
    display: block;
    width: 100%;
    padding: 14px 18px;
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .menu li:last-child a {
    border-bottom: none;
  }

  .menu a::after {
    display: none;
  }

  .menu a:hover,
  .menu li.activo a {
    background: #f4f8fd;
    color: var(--azul-topbar);
  }
}


/* =========================================================
   MÓVILES PEQUEÑOS
   ========================================================= */

@media (max-width: 480px) {
  .navbar {
    height: 68px;
  }

  .navbar .contenedor {
    padding: 0 12px;
  }

  .logo-box {
    width: 42px;
    height: 42px;
  }

  .menu {
    right: 12px;
    left: 12px;
  }

  .menu a {
    padding: 13px 16px;
    font-size: 13px;
  }
}