/* Suppress Netlify's public acquisition badge only.
   Keep forms, analytics, the chat endpoint and owner tools intact. */
iframe#nl-badge-frame,
#nl-badge-frame {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Never let a stray wide element widen the page on phones (iOS zooms out to fit it). */
html, body { overflow-x: clip; }

/* Language choice stays visible above the navigation, including on mobile. */
.topbar-inner { min-height: 40px; height: auto; padding-top: 5px; padding-bottom: 5px; flex-wrap: wrap; gap: 6px 16px; }
.language-switch { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; white-space: nowrap; }
.language-switch button { border: 0; background: none; padding: 4px 2px; cursor: pointer; font-size: 12px; color: var(--muted); text-underline-offset: 4px; }
.language-switch button[aria-pressed="true"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); }
.language-switch button:hover { color: var(--gold); }
.language-switch span { color: var(--line); }
.topbar-contact { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-left: auto; max-width: 100%; line-height: 1.4; }
.topbar-email { color: var(--gold); font-size: 12px; text-decoration: none; overflow-wrap: anywhere; }
.topbar-contact a:hover { text-decoration: underline; text-underline-offset: 3px; }
html[lang="es"] .links { gap: 18px; }
html[lang="es"] .links a.btn { padding-left: 14px; padding-right: 14px; }
@media (min-width: 981px) and (max-width: 1200px) {
  html[lang="es"] .nav-inner { flex-wrap: wrap; height: auto; min-height: 88px; padding-top: 12px; padding-bottom: 12px; gap: 12px 20px; }
  html[lang="es"] .links { flex-wrap: wrap; margin-left: auto; gap: 12px; }
}
@media (max-width: 640px) {
  .topbar-left { display: none; }
  .language-switch { margin-left: 0; }
  .topbar-phone { margin-left: auto; }
  html[lang="es"] .links { gap: 0; }
}

/* ---------- Logo and header ---------- */
.brand {
  display: block;
  flex-shrink: 0;
}
.brand .brand-logo {
  display: block;
  width: 100%;
  height: auto;
}
.nav .brand { width: 200px; }
.nav .brand-logo { mix-blend-mode: multiply; }

/* Desktop header: Logo | Home | Services | About | Contact | CTA */
.nav .nav-inner,
.nav.scrolled .nav-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  height: 80px;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.nav.scrolled .nav-inner { height: 68px; }
.nav .links { display: flex; flex-wrap: nowrap; align-items: center; gap: 30px; margin-left: auto; }
.nav .links a { white-space: nowrap; }
.nav .links a.nav-cta { margin-left: 10px; padding: 12px 20px; font-size: 14px; color: #fff; }
html[lang="es"] .nav .links { gap: 22px; }
.social-links { display: flex; align-items: center; gap: 4px; }
.nav .links .social-links a, .footer .social-links a {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: inherit;
  margin: 0;
}
.nav .links .social-links a::after { content: none; }
.nav .links .social-links a:hover, .footer .social-links a:hover { border-color: currentColor; }
.social-links a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.footer .social-links { margin-top: 14px; color: #cfcbc5; }
.footer .social-links a { width: 44px; height: 44px; }

@media (min-width: 981px) and (max-width: 1100px) {
  .nav .brand { width: 165px; }
  .nav .nav-inner, .nav.scrolled .nav-inner { gap: 32px; }
  .nav .links { gap: 22px; }
  html[lang="es"] .nav .links { gap: 16px; }
  .nav .links a.nav-cta { margin-left: 4px; padding: 11px 16px; }
}

/* Mobile and tablet: logo left, menu control right. */
@media (max-width: 980px) {
  .nav .nav-inner, .nav.scrolled .nav-inner { height: 68px; gap: 16px; }
  .nav .brand { flex-shrink: 1; min-width: 0; }
  .nav .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    margin: 0 -6px 0 auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .nav .menu-toggle:hover { border-color: var(--ink); }
  .nav .menu-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
  .nav .menu-icon { display: block; width: 26px; height: 26px; pointer-events: none; }
  .nav .menu-icon-close,
  .nav .menu-toggle[aria-expanded="true"] .menu-icon-open { display: none; }
  .nav .menu-toggle[aria-expanded="true"] .menu-icon-close { display: block; }
  .nav.menu-open { z-index: 90; }
  .nav .links { display: none; margin-left: 0; gap: 0; }
  .nav .links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav .links a { min-height: 48px; display: flex; align-items: center; white-space: normal; }
  .nav .links a.nav-cta { justify-content: center; text-align: center; margin: 16px 0 0; padding: 14px 20px; font-size: 15px; color: #fff; }
  .nav .links .social-links { margin-top: 12px; }
  .nav .links .social-links a { width: 44px; height: 44px; }

  /* If JavaScript fails to load, never leave mobile visitors without links. */
  html:not(.js) .nav .menu-toggle { display: none; }
  html:not(.js) .nav .nav-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; }
  html:not(.js) .nav .links { display: flex; position: static; flex-direction: column; align-items: stretch; width: 100%; padding: 0; box-shadow: none; border: 0; }
}
@media (max-width: 640px) {
  .nav .nav-inner, .nav.scrolled .nav-inner { height: 64px; }
  .nav .brand { width: 166px; }
}

.footer .brand {
  width: 232px;
  max-width: 100%;
  margin-bottom: 0;
  border-radius: 6px;
  overflow: hidden;
}

/* Contact page */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact-item { border-top: 1px solid var(--line); padding-top: 18px; }
.contact-item .eyebrow { margin-bottom: 8px; }
.contact-item a { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.contact-note { margin-top: 28px; color: var(--muted); }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
