/* CIMER — encabezado independiente del menú Uncode */
body .menu-wrapper { display: none !important; }

#cimer-custom-header, #cimer-custom-header * { box-sizing: border-box; }
#cimer-custom-header {
  --cimer-ink: #153b75;
  --cimer-bg: #eaf3fa;
  --cimer-green: #12a34a;
  --cimer-sleep: #0d1738;
  --cimer-mint: #6de5c6;
  /* 1400px útiles de contenido + 20px de padding por lado */
  --cimer-content-width: 1440px;
  position: sticky;
  top: 0;
  z-index: 99999;
  width: 100%;
  background: var(--cimer-bg);
  box-shadow: 0 1px 0 rgba(15, 41, 76, .06);
  font-family: Manrope, inherit, sans-serif;
  color: var(--cimer-ink);
}
body.admin-bar #cimer-custom-header { top: 32px; }
#cimer-custom-header .cimer-header__inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--cimer-content-width);
  min-height: 106px;
  margin: 0 auto;
  padding: 16px 20px;
  gap: clamp(18px, 2.4vw, 42px);
}
#cimer-custom-header a {
  color: inherit;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}
#cimer-custom-header a:focus-visible,
#cimer-custom-header button:focus-visible {
  outline: 3px solid #69e4c7 !important;
  outline-offset: 3px;
}
#cimer-custom-header button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
}
#cimer-custom-header ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
#cimer-custom-header ul li { margin: 0 !important; padding: 0 !important; }
#cimer-custom-header .cimer-header__brand {
  flex: 0 0 auto;
  width: clamp(208px, 19vw, 270px);
  display: flex;
  align-items: center;
}
#cimer-custom-header .cimer-header__brand img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 75px;
  object-fit: contain;
  object-position: left center;
}
#cimer-custom-header .cimer-header__brand-fallback {
  font-family: Georgia, serif;
  font-weight: 900;
  font-size: 38px;
  color: #173d78;
  letter-spacing: -2px;
}
#cimer-custom-header .cimer-header__navigation {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 1.5vw, 26px);
  min-width: 0;
}
#cimer-custom-header .cimer-header__nav { min-width: 0; }
#cimer-custom-header .cimer-header__links {
  display: flex;
  align-items: center;
  gap: clamp(13px, 1.45vw, 25px);
}
#cimer-custom-header .cimer-header__item { position: relative; }
#cimer-custom-header .cimer-header__item > a,
#cimer-custom-header .cimer-header__item-main > a {
  display: block;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .1px;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}
#cimer-custom-header .cimer-header__item > a:hover,
#cimer-custom-header .cimer-header__item-main > a:hover { color: #0e93bd; }
#cimer-custom-header .cimer-header__item-main {
  display: flex;
  align-items: center;
  gap: 4px;
}
#cimer-custom-header .cimer-header__subtoggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 28px;
}
#cimer-custom-header .cimer-header__subtoggle svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#cimer-custom-header .cimer-header__submenu {
  position: absolute;
  top: calc(100% + 18px);
  left: -14px;
  min-width: 170px;
  padding: 8px !important;
  background: #fff;
  border: 1px solid #dce7f0;
  border-radius: 10px;
  box-shadow: 0 14px 38px rgba(14, 32, 63, .13);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  pointer-events: none;
  transition: .18s ease;
}
/* Puente invisible para mantener accesible el hover entre enlace y submenú */
#cimer-custom-header .cimer-header__submenu::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 19px;
}
#cimer-custom-header .cimer-header__submenu a {
  display: block;
  font-weight: 650;
  font-size: 14px;
  padding: 12px 13px !important;
  border-radius: 6px;
  white-space: nowrap;
}
#cimer-custom-header .cimer-header__submenu a:hover { background: #edf5fa; }
@media (min-width: 1281px) {
  #cimer-custom-header .cimer-header__item--sub:hover .cimer-header__submenu,
  #cimer-custom-header .cimer-header__item--sub:focus-within .cimer-header__submenu,
  #cimer-custom-header .cimer-header__item--sub.is-open .cimer-header__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
}
#cimer-custom-header .cimer-header__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 11px;
}
#cimer-custom-header .cimer-header__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  min-height: 46px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .35px;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
}
#cimer-custom-header .cimer-header__button--sleep {
  background: var(--cimer-sleep);
  color: #fff;
}
#cimer-custom-header .cimer-header__button--sleep:hover { background: #1b2951; color: #fff; }
/* Luna construida con CSS: no depende de SVG, fuentes ni imágenes externas. */
#cimer-custom-header .cimer-header__moon {
  display: inline-block !important;
  position: relative;
  overflow: hidden;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  background: var(--cimer-mint);
}
#cimer-custom-header .cimer-header__moon::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cimer-sleep);
  transition: background-color .2s ease;
}
#cimer-custom-header .cimer-header__button--sleep:hover .cimer-header__moon::after {
  background: #1b2951;
}
#cimer-custom-header .cimer-header__button--apply {
  background: var(--cimer-green);
  color: #fff;
  min-width: 112px;
}
#cimer-custom-header .cimer-header__button--apply:hover { background: #09853b; color: #fff; }
#cimer-custom-header .cimer-header__button--apply span:last-child { font-size: 21px; line-height: .6; }
#cimer-custom-header .cimer-header__socials { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
#cimer-custom-header .cimer-header__socials a { display: none; width: 18px; height: 18px; align-items: center; justify-content: center; }
#cimer-custom-header .cimer-header__socials a.is-ready { display: inline-flex; }
#cimer-custom-header .cimer-header__socials a:hover { color: #0c92c1; }
#cimer-custom-header .cimer-header__socials svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#cimer-custom-header .cimer-header__socials .cimer-header__icon-dot,
#cimer-custom-header .cimer-header__socials .cimer-header__facebook-fill { fill: currentColor; stroke: none; }
#cimer-custom-header .cimer-header__mobile-toggle { display: none; }

@media (max-width: 1280px) {
  #cimer-custom-header .cimer-header__inner { min-height: 80px; justify-content: space-between; }
  #cimer-custom-header .cimer-header__brand { width: clamp(188px, 29vw, 255px); }
  #cimer-custom-header .cimer-header__mobile-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border-radius: 7px;
  }
  #cimer-custom-header .cimer-header__mobile-toggle span {
    display: block;
    width: 23px;
    height: 2px;
    background: var(--cimer-ink);
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
  }
  #cimer-custom-header.is-open .cimer-header__mobile-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  #cimer-custom-header.is-open .cimer-header__mobile-toggle span:nth-child(2) { opacity: 0; }
  #cimer-custom-header.is-open .cimer-header__mobile-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  #cimer-custom-header .cimer-header__navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cimer-bg);
    box-shadow: 0 18px 30px rgba(9, 28, 62, .14);
    padding: 12px clamp(20px, 3vw, 48px) 26px;
    max-height: calc(100dvh - 85px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
  }
  #cimer-custom-header.is-open .cimer-header__navigation { display: flex; }
  #cimer-custom-header .cimer-header__links { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  #cimer-custom-header .cimer-header__item { border-bottom: 1px solid #d3e3ed; }
  #cimer-custom-header .cimer-header__item > a,
  #cimer-custom-header .cimer-header__item-main > a {
    display: block;
    font-size: 15px;
    padding: 15px 0;
  }
  #cimer-custom-header .cimer-header__item-main { justify-content: space-between; }
  #cimer-custom-header .cimer-header__subtoggle { width: 42px; height: 46px; }
  #cimer-custom-header .cimer-header__submenu {
    display: none;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    min-width: 0;
    box-shadow: none;
    background: #fff;
    border: none;
    border-radius: 8px;
    margin: 0 0 12px !important;
    padding: 5px !important;
  }
  #cimer-custom-header .cimer-header__item--sub.is-open .cimer-header__submenu { display: block; }
  #cimer-custom-header .cimer-header__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  #cimer-custom-header .cimer-header__button { min-height: 48px; font-size: 13px; padding: 12px; white-space: normal; text-align: center; }
  #cimer-custom-header .cimer-header__socials { gap: 18px; }
  #cimer-custom-header .cimer-header__socials svg { width: 21px; height: 21px; }
}
@media (max-width: 460px) {
  #cimer-custom-header .cimer-header__actions { grid-template-columns: 1fr; }
}
@media (max-width: 782px) { body.admin-bar #cimer-custom-header { top: 46px; } }
@media (prefers-reduced-motion: reduce) {
  #cimer-custom-header *, #cimer-custom-header *::before { transition: none !important; }
}
