/* ============================================================
   SegmentaAds — Cabecera (Widget Elementor) v3.2.2
   ============================================================ */

/* Anular padding por defecto que Elementor mete en el contenedor */
.elementor-widget-sahw_header > .elementor-widget-container {
  padding: 0 !important;
  margin: 0 !important;
}

/* ─────────── VARIABLES POR DEFECTO ─────────── */
.sahw {
  /* Tamaños — se ajustan con el control "Tamaño del logo" */
  --sahw-logo-h:        40px;
  --sahw-pad-y:         14px;
  --sahw-menu-size:     15px;
  --sahw-cta-pad-v:     9px;
  --sahw-cta-pad-h:     18px;

  /* Colores */
  --sahw-bg:            rgba(255,255,255,0.97);
  --sahw-link:          #4a6878;
  --sahw-link-h:        #011525;
  --sahw-cta-bg:        #011525;
  --sahw-cta-text:      #ffffff;

  /* Hover con fondo */
  --sahw-hover-bg:      #4A6878;
  --sahw-hover-text:    #FFFFFF;
  --sahw-hover-radius:  4px;
  --sahw-hover-pad-v:   8px;
  --sahw-hover-pad-h:   14px;

  /* Progreso */
  --sahw-prog-h:        3px;
  --sahw-prog-color:    #0057b8;
  --sahw-prog-track:    rgba(0,0,0,0.06);

  /* Layout */
  --sahw-f:             'Helvetica Neue', Helvetica, Arial, sans-serif;
  --sahw-max:           1240px;
  --sahw-pad:           clamp(1rem, 3vw, 2.5rem);

  font-family: var(--sahw-f);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  display: block;
  width: 100%;
  line-height: 1;
}

.sahw *,
.sahw *::before,
.sahw *::after {
  box-sizing: border-box;
}

/* ─────────── NAV ─────────── */
.sahw-nav {
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--sahw-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: box-shadow .3s;
}
.sahw--fixed  .sahw-nav { position: fixed; }
.sahw--static .sahw-nav { position: relative; }
.sahw-nav.is-scrolled    { box-shadow: 0 2px 16px rgba(1,21,37,.08); }

.sahw-nav-spacer {
  height: calc(var(--sahw-logo-h) + (var(--sahw-pad-y) * 2));
  width: 100%;
}
.sahw--has-progress.sahw--fixed .sahw-nav-spacer {
  height: calc(var(--sahw-logo-h) + (var(--sahw-pad-y) * 2) + var(--sahw-prog-h));
}

.sahw-nav-in {
  max-width: var(--sahw-max);
  margin: 0 auto;
  padding-left:   var(--sahw-pad);
  padding-right:  var(--sahw-pad);
  padding-top:    var(--sahw-pad-y);
  padding-bottom: var(--sahw-pad-y);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

/* ─────────── LOGO ─────────── */
.sahw-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 0;
  margin: 0;
  padding: 0;
}
.sahw-logo img {
  height: var(--sahw-logo-h) !important;
  width: auto !important;
  max-width: none !important;
  display: block;
  object-fit: contain;
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: middle;
}

/* ─────────── MENÚ DESKTOP ─────────── */
.sahw-nav-ul {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.sahw-nav-ul li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sahw-nav-ul a {
  font-family: var(--sahw-f);
  font-size: var(--sahw-menu-size);
  font-weight: 500;
  letter-spacing: .015em;
  color: var(--sahw-link);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s, background .2s, opacity .2s;
  line-height: 1;
  display: inline-block;
}
.sahw-nav-ul a:not(.sahw-nav-cta):hover {
  color: var(--sahw-link-h);
}

/* CTA */
.sahw-nav-cta {
  background: var(--sahw-cta-bg);
  color: var(--sahw-cta-text) !important;
  padding: var(--sahw-cta-pad-v) var(--sahw-cta-pad-h);
  border-radius: 4px;
  font-weight: 600 !important;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
  display: inline-block;
  font-size: var(--sahw-menu-size);
  transition: filter .2s;
}
.sahw-nav-cta:hover {
  filter: brightness(1.15);
  color: var(--sahw-cta-text) !important;
}

/* ─────────── MODO HOVER CON FONDO ─────────── */
.sahw--hover-bg .sahw-nav-ul a:not(.sahw-nav-cta) {
  padding: var(--sahw-hover-pad-v) var(--sahw-hover-pad-h);
  border-radius: var(--sahw-hover-radius);
  display: inline-block;
}
.sahw--hover-bg .sahw-nav-ul a:not(.sahw-nav-cta):hover {
  background: var(--sahw-hover-bg);
  color: var(--sahw-hover-text);
}

/* ─────────── HAMBURGUESA ─────────── */
.sahw-ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none !important;
  border: none !important;
  margin: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: none !important;
  outline: none !important;
  position: relative;
  z-index: 10001;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.sahw-ham:hover,
.sahw-ham:focus,
.sahw-ham:active {
  background: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.sahw-ham span {
  display: block;
  width: 24px;
  height: 2px;
  background: #011525;
  border-radius: 1px;
  transition: all .3s;
  pointer-events: none;
}
/* La hamburguesa en la nav NUNCA muestra X aunque la clase is-open quede pegada:
   solo el botón dentro del menú móvil muestra X (es la sahw-mob-close). */
.sahw-nav .sahw-ham.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sahw-nav .sahw-ham.is-open span:nth-child(2) { opacity: 0; }
.sahw-nav .sahw-ham.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────── MENÚ MÓVIL ─────────── */
.sahw-mob {
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: #fff !important;
  z-index: 99999 !important;
  flex-direction: column;
  font-family: var(--sahw-f);
  margin: 0 !important;
  padding: 0 !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sahw-mob.is-open {
  display: flex !important;
}

/* Cabecera del menú móvil: logo a la izquierda + X a la derecha */
.sahw-mob-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
  min-height: 64px;
}
.sahw-mob-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  flex-shrink: 0;
}
.sahw-mob-logo img {
  height: calc(var(--sahw-logo-h, 40px) * 0.8);
  max-height: 44px;
  min-height: 24px;
  width: auto;
  display: block;
}
.sahw-mob-close {
  width: 44px;
  height: 44px;
  background: none !important;
  border: none !important;
  font-size: 2rem;
  line-height: 1;
  color: #011525;
  cursor: pointer;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  outline: none !important;
  box-shadow: none !important;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: background-color .2s, opacity .2s;
  flex-shrink: 0;
}
.sahw-mob-close:hover {
  opacity: .65;
  background: rgba(0,0,0,0.04) !important;
}

/* Cuerpo del menú móvil: enlaces centrados */
.sahw-mob-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: 2rem 1.5rem;
  min-height: 0;
}
.sahw-mob-body a {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.04em;
  color: #011525;
  text-decoration: none;
  transition: opacity .2s;
}
.sahw-mob-body a:hover { opacity: .65; }
.sahw-mob-body .sahw-mob-cta {
  font-size: 1rem !important;
  color: #fff !important;
  background: #011525 !important;
  padding: .85rem 2.25rem;
  border-radius: 6px;
  margin-top: .75rem;
}

/* ─────────── BARRA DE PROGRESO ─────────── */
.sahw-progress {
  position: relative;
  width: 100%;
  height: var(--sahw-prog-h);
  background: var(--sahw-prog-track);
  overflow: hidden;
}
.sahw-progress-bar {
  height: 100%;
  width: 0;
  background: var(--sahw-prog-color);
  transform-origin: left center;
  transition: width .08s linear;
  will-change: width;
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 1024px) {
  .sahw-nav-ul { gap: 1.5rem; }
  .sahw-logo img      { height: calc(var(--sahw-logo-h) * 0.88) !important; }
  .sahw-nav-in        { padding-top: calc(var(--sahw-pad-y) * 0.88); padding-bottom: calc(var(--sahw-pad-y) * 0.88); }
  .sahw-nav-ul a      { font-size: max(calc(var(--sahw-menu-size) * 0.93), 12px); }
  .sahw-nav-cta       { font-size: max(calc(var(--sahw-menu-size) * 0.93), 12px); padding: calc(var(--sahw-cta-pad-v) * 0.88) calc(var(--sahw-cta-pad-h) * 0.88); }
  .sahw-nav-spacer    { height: calc((var(--sahw-logo-h) * 0.88) + (var(--sahw-pad-y) * 0.88 * 2)); }
}
@media (max-width: 900px) {
  .sahw-nav-ul { gap: 1.25rem; }
}
@media (max-width: 767px) {
  .sahw { --sahw-pad: 1rem; }
  .sahw-nav-in        { gap: 1rem; flex-wrap: nowrap; padding-top: calc(var(--sahw-pad-y) * 0.7); padding-bottom: calc(var(--sahw-pad-y) * 0.7); }
  .sahw-logo img      { height: calc(var(--sahw-logo-h) * 0.7) !important; }
  .sahw-nav-ul        { display: none; }
  .sahw-ham           { display: flex; }
  .sahw-nav-spacer    { height: calc((var(--sahw-logo-h) * 0.7) + (var(--sahw-pad-y) * 0.7 * 2)); }
}
