/* ====== Variables ====== */
:root{
  --brand-blue: #004085;
  --brand-text: #203864;
  --nav-h: 96px;
  --radius: 6px;
}

/* ====== Reset & Base ====== */
*{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}
body{
  line-height: 1.5;
  color: #222;
  background: #f7f7f7;
}

/* ====== Contenedores ====== */
.container,
.container-fluid,
.container-grid{
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}
.container{
  max-width: 1200px;
}
.container-grid{
  max-width: 1200px;
  display: grid;
  gap: 2rem;
}

/* ====== Header / Nav (oscuro por defecto) ====== */
.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brand-blue);
  color: #fff;
  padding: 0.5rem 1rem;
  height: var(--nav-h);
  position: relative;
}

.logo{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
}
.logo img{
  height: 150px;
  max-height: 150px;
  width: auto;
  display: block;
  object-fit: contain;
  background: transparent;
  margin: 0;
  padding: 0;
}
.logo-text{
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  display: none;
}
/* Si falla la imagen del logo, muestra el texto */
.logo img[style*="display:none"] + .logo-text{ display: flex; }

.nav-links{
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.nav-links a{
  color: #fff;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
}
.nav-links a:hover,
.nav-links a.active{
  background: rgba(255, 255, 255, 0.12);
}

.menu-toggle{
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

/* ====== Variante clara (común) ====== */
.nav--light{
  background: #fff;
  color: var(--brand-text);
  font-weight: bold;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  padding: 2rem 1.5rem;
  height: auto;
}
.nav--light .nav-links a{ color: var(--brand-text); }
.nav--light .menu-toggle{ color: var(--brand-text); }

/* Desktop: header claro puede usar un logo diferente (solo >700px) */
@media (min-width:701px){
  .nav--light .logo img{
    height: 50px;
    width: auto;
  }
}

/* ====== Mobile (<=700px) ====== */
@media (max-width:700px){
  /* Botón hamburguesa visible */
  .menu-toggle{ display: block; }

  /* Menú móvil: oculto por defecto, visible con .show */
  .nav-links{
    position: absolute;
    right: 1rem;
    top: 100%; /* debajo del header */
    margin-top: 8px;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--brand-blue);
    padding: 0.75rem;
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 200px;
  }
  .nav-links.show{ display: flex; }

  /* Logo móvil único en todas las páginas */
  .logo img{ height: 36px; }

  /* Variante clara: solo cambia colores (no tamaños) */
  .nav--light .nav-links{
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
  }
  .nav--light .nav-links a{ color: var(--brand-text); }

  /* Si quieres igualar el padding/altura del header claro al oscuro en móvil
     descomenta esto:
  .nav--light{
    padding: 0.5rem 1rem;
    height: var(--nav-h);
  }
  */
}

/* 1) Cierra el scroll horizontal globalmente (sin afectar al vertical) */
html, body { overflow-x: hidden; }