html { scrollbar-gutter: stable; }

.azg-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #2a3140;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgb(221 227 236 / 80%);
  font: 700 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.azg-header,
.azg-header * { box-sizing: border-box; }

.azg-header a { color: inherit; text-decoration: none; }

.azg-header :focus-visible {
  outline: 3px solid #0f4c81;
  outline-offset: 4px;
}

.azg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: min(1120px, calc(100% - 40px));
  height: 92px;
  margin-inline: auto;
}

.azg-header-brand {
  display: grid;
  flex: 0 0 178px;
  place-items: center;
  height: 68px;
}

.azg-header-brand img {
  display: block;
  width: auto;
  height: 68px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 16px;
}

.azg-header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
}

.azg-header-nav > a { position: relative; }

.azg-header-nav a:hover,
.azg-header-nav a[aria-current] { color: #d71920; }

.azg-header-nav > a[aria-current]::after {
  position: absolute;
  inset: auto 0 -7px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.azg-header-languages {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5f6877;
  font-size: 14px;
  font-weight: 800;
}

.azg-header-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
}

.azg-header a.azg-header-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.azg-header a.azg-header-whatsapp,
a.azg-whatsapp {
  background: #22c55e;
  box-shadow: 0 10px 24px rgb(34 197 94 / 22%);
  color: #062a14;
}

.azg-header a.azg-header-whatsapp:hover,
a.azg-whatsapp:hover {
  background: #20b957;
  transform: none;
}

.azg-header-whatsapp-short,
.azg-header-toggle { display: none; }

.azg-header-toggle {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #f1f4f8;
  color: #151922;
  cursor: pointer;
}

body:has(.azg-header) :is(#services, #contact) { scroll-margin-top: 93px; }

@media (min-width: 961px) and (max-width: 1080px) {
  .azg-header-inner { gap: 14px; }
  .azg-header-nav { gap: 12px; }
}

@media (max-width: 960px) {
  .azg-header-inner { gap: 10px; }

  .azg-header-nav {
    position: absolute;
    top: calc(100% + 1px);
    inset-inline: max(20px, calc((100% - 1120px) / 2));
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: calc(100dvh - 98px);
    overflow-y: auto;
    padding: 12px 16px;
    border: 1px solid #dde3ec;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 45px rgb(17 24 39 / 12%);
  }

  .azg-header-nav.is-open { display: flex; }

  .azg-header-nav > a { padding: 8px 0; }

  .azg-header-nav > a[aria-current]::after {
    inset: auto auto 4px 0;
    width: 36px;
  }

  .azg-header-languages { gap: 16px; padding-top: 8px; }

  .azg-header-languages a { padding-block: 6px; }

  .azg-header-toggle { display: grid; }
}

@media (max-width: 520px) {
  .azg-header-inner { width: calc(100% - 28px); }

  .azg-header-brand { flex-basis: clamp(104px, 34vw, 144px); }

  .azg-header-brand img { width: 100%; height: auto; border-radius: 12px; }

  .azg-header-whatsapp-long { display: none; }

  .azg-header-whatsapp-short { display: inline; }

  .azg-header a.azg-header-whatsapp { min-height: 44px; padding: 8px 13px; font-size: 14px; }

  .azg-header-nav { inset-inline: 14px; }
}
