/* Wide navigation needs enough horizontal room. Compact laptops and smaller
   screens use the same accessible menu trigger as mobile. */
.menu-toggle {
  display: none !important;
}

@media (max-width: 1199px) {
  header > div {
    min-height: 80px;
    padding-inline: clamp(16px, 3vw, 32px) !important;
    gap: 10px;
  }

  header > div > a:first-child {
    margin-right: auto;
  }

  header > div > nav {
    display: none !important;
  }

  header > div > div:last-child {
    order: 2;
    margin-left: auto;
  }

  header .menu-toggle,
  body:has(.insight-shell) header .menu-toggle {
    order: 3;
    display: inline-flex !important;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    align-self: center;
    border: 1px solid rgba(248, 247, 244, .16);
    border-radius: 4px;
    background: #16161a;
    color: #f8f7f4;
    line-height: 1;
  }

  header .menu-toggle .material-symbols-outlined {
    display: block;
    font-size: 25px;
    line-height: 1;
  }
}

/* Global responsive hotfix: compact flow header, one source of truth. */
header.fixed,
header.site-header,
header.nav {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  height: auto !important;
  min-height: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  border-bottom-color: transparent !important;
}

header.fixed > div:first-child,
.site-header .header-inner,
header.nav .index-header {
  min-height: 96px !important;
  height: auto !important;
  padding-block: 8px !important;
  padding-inline: clamp(20px, 4vw, 64px) !important;
  gap: clamp(12px, 2vw, 28px) !important;
}

header.fixed > div:first-child > a:first-child,
header.fixed > div:first-child > a:first-child svg,
header.fixed > div:first-child > a:first-child img,
.site-header .brand,
.site-header .brand img,
header.nav .brand-image,
header.nav .brand-image img {
  width: 104px !important;
  height: 80px !important;
  min-width: 104px !important;
  max-width: 104px !important;
  min-height: 80px !important;
  max-height: 80px !important;
  object-fit: contain !important;
}

header.fixed > div:first-child > a:first-child,
.site-header .brand,
header.nav .brand-image { flex: 0 0 auto !important; margin-right: auto !important; }

header.fixed > div:first-child > div:last-child,
.site-header .header-actions,
header.nav .header-actions { display: flex !important; align-items: center !important; gap: 12px !important; margin-left: auto !important; }

header.fixed > div:first-child > div:last-child > a[href*="contacto"],
.site-header a[href*="contacto"],
header.nav a[href*="contacto"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px !important;
  border-radius: 999px !important;
  background: #ff2a14 !important;
  color: #080808 !important;
  font: 700 11px/1 'Space Mono', monospace !important;
  letter-spacing: .08em !important;
  white-space: nowrap;
}

@media (min-width: 1200px) {
  header.fixed > div:first-child,
  .site-header .header-inner,
  header.nav .index-header { min-height: 96px !important; }
}

@media (max-width: 767px) {
  header.fixed > div:first-child,
  .site-header .header-inner,
  header.nav .index-header {
    min-height: 80px !important;
    padding-inline: 16px !important;
  }

  header.fixed > div:first-child > a:first-child,
  header.fixed > div:first-child > a:first-child svg,
  header.fixed > div:first-child > a:first-child img,
  .site-header .brand,
  .site-header .brand img,
  header.nav .brand-image,
  header.nav .brand-image img {
    width: 76px !important;
    height: 64px !important;
    min-width: 76px !important;
    max-width: 76px !important;
    min-height: 64px !important;
    max-height: 64px !important;
  }

  header.fixed > div:first-child > div:last-child > a[href*="contacto"],
  .site-header a[href*="contacto"],
  header.nav a[href*="contacto"] { display: none !important; }
}

/* Headers remain in document flow. THE INDEX itself is the only fixed overlay. */
header.fixed,
header.site-header,
header.nav {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  z-index: 20 !important;
}
body > header.fixed {
  background: transparent !important;
  backdrop-filter: none !important;
  border-bottom-color: transparent !important;
}
body > header.fixed + main.w-full.pt-20 { padding-top: 0 !important; }
body:has(.insight-shell) .insight-shell,
body:has(.legal-shell) .legal-shell { padding-top: 2rem !important; }
@media (max-width: 767px) {
  body > header.fixed + main.w-full.pt-20 { padding-top: 0 !important; }
  body:has(.insight-shell) .insight-shell,
  body:has(.legal-shell) .legal-shell { padding-top: 1.5rem !important; }
}

@media (max-width: 767px) {
  header > div > div:last-child {
    margin-right: 8px;
  }
}

/* MARKKETIN wordmark scale — shared across flagship, Insights and service landings. */
@media (min-width: 1200px) {
  header.fixed > div:first-child {
    min-height: 180px !important;
    height: 180px !important;
    padding-block: 10px !important;
  }

  header.fixed > div:first-child > a:first-child,
  header.fixed > div:first-child > a:first-child svg,
  header.fixed > div:first-child > a:first-child img {
    width: 160px !important;
    height: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    min-height: 160px !important;
    max-height: 160px !important;
  }

  .site-header .header-inner {
    min-height: 180px !important;
    height: 180px !important;
  }

  .site-header .brand,
  .site-header .brand img,
  header.nav .brand-image,
  header.nav .brand-image img {
    width: 160px !important;
    height: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    min-height: 160px !important;
    max-height: 160px !important;
  }

  .site-header .brand img,
  header.nav .brand-image img {
    position: static !important;
    object-fit: contain !important;
  }

  header.nav {
    min-height: 180px !important;
    height: 180px !important;
  }
}

@media (max-width: 1199px) {
  header.fixed > div:first-child {
    min-height: 96px !important;
  }

  header.fixed > div:first-child > a:first-child,
  header.fixed > div:first-child > a:first-child svg,
  header.fixed > div:first-child > a:first-child img,
  .site-header .brand,
  .site-header .brand img,
  header.nav .brand-image,
  header.nav .brand-image img {
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    min-height: 88px !important;
    max-height: 88px !important;
  }

  .site-header .brand img,
  header.nav .brand-image img {
    position: static !important;
    object-fit: contain !important;
  }

  header.nav {
    min-height: 96px !important;
  }

  header.nav.wrap.index-header-host {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  header.nav.wrap.index-header-host > .index-header {
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 0 !important;
    box-sizing: border-box !important;
  }
}
