/*
  Header styles
  Developed by: Atenciones Web
  https://atencionesweb.com | contacto@atencionesweb.com
*/

:root{
  --siiehd-blue:#0b4ea2;
  --bg:#ffffff;
  --text:#1a1a1a;
  --muted:#666;
  --line:#e9e9e9;
}

body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); border:0;
}

/* =========================
   HEADER
========================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 9999; /* importante para que dropdown flote sobre slider */
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-wrap{
  width: min(1100px, 92%);
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
}

.brand-logo{
  height: 60px;
  width: auto;
}

/* =========================
   NAV (DESKTOP)
========================= */
.primary-nav{
  display:flex;
  align-items:center;
  gap: 18px;
}

.nav-link{
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 8px;
  border-bottom: 3px solid transparent;
  text-decoration: none;
}

.nav-link:hover{
  border-bottom-color: rgba(11,78,162,.25);
}

.nav-cta{
  color: #fff;
  background: var(--siiehd-blue);
  padding: 10px 14px;
  border-radius: 6px;
  border-bottom: none;
}

.nav-cta:hover{
  opacity: .92;
  border-bottom-color: transparent;
}

.is-disabled{
  opacity: .45;
  pointer-events: none;
}

/* =========================
   HAMBURGER (MOBILE)
========================= */
.nav-toggle{
  display:none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.hamburger{
  display:block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 0 auto;
  position: relative;
}
.hamburger::before,
.hamburger::after{
  content:"";
  position:absolute;
  left:0;
  width: 18px;
  height: 2px;
  background: var(--text);
}
.hamburger::before{ top:-6px; }
.hamburger::after{ top: 6px; }

/* =========================
   DROPDOWNS (Catálogo/Soluciones/Lean)
========================= */
.nav-item{ position: relative; display: inline-flex; }

.nav-parent{
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 8px;
  border-bottom: 3px solid transparent;
}

.nav-parent:hover{
  border-bottom-color: rgba(11,78,162,.25);
}

/* Nivel 1 */
.dropdown-menu{
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0,0,0,.10);
  border-radius: 10px;
  padding: 8px;
  z-index: 9999;
}

.dropdown-link{
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  color: #222;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.dropdown-link:hover{
  background: rgba(11,78,162,.06);
  color: var(--siiehd-blue);
}

.dropdown-item{ position: relative; }

/* Nivel 2 */
.dropdown-submenu{
  display: none;
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0,0,0,.10);
  border-radius: 10px;
  padding: 8px;
  z-index: 9999;
}

/* Desktop hover */
@media (min-width: 861px){
  .has-dropdown:hover > .dropdown-menu{ display: block; }
  .has-submenu:hover > .dropdown-submenu{ display: block; }
}

/* =========================
   MOBILE BEHAVIOR
========================= */
@media (max-width: 860px){
  .nav-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  .primary-nav{
    position: absolute;
    left: 4%;
    right: 4%;
    top: 66px;
    display:none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 18px 40px rgba(0,0,0,.08);
  }

  .primary-nav.is-open{ display:flex; }

  .nav-link,
  .nav-parent{
    border-bottom: none;
    padding: 12px 12px;
    border-radius: 8px;
  }

  .nav-link:hover,
  .nav-parent:hover{
    background: rgba(11,78,162,.06);
  }

  .nav-cta{
    text-align:center;
  }

  /* dropdowns dentro del menú */
  .nav-item{
    display: block;
  }

  .dropdown-menu{
    position: static;
    min-width: unset;
    box-shadow: none;
    border-radius: 10px;
    margin-top: 6px;
  }

  .dropdown-submenu{
    position: static;
    min-width: unset;
    box-shadow: none;
    border-radius: 10px;
    margin-top: 6px;
  }

  /* JS controla apertura con .open */
  .has-dropdown.open > .dropdown-menu{ display: block; }
  .has-submenu.open > .dropdown-submenu{ display: block; }
}
