/* Site-wide navigation and small-screen safeguards. */
html { max-width: 100%; overflow-x: hidden; }
body { min-width: 0; max-width: 100%; overflow-x: hidden; }
img, video, iframe { max-width: 100%; }
main, section, article, header, footer, nav, .hero-card, .section-inner { min-width: 0; }
h1, h2, h3, p, a, span, strong, small { overflow-wrap: break-word; }

nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 24px;
  padding: 12px 5%;
  background: rgba(255, 251, 246, .94);
  border-bottom: 1px solid rgba(196, 164, 124, .35);
  backdrop-filter: blur(12px);
}

nav .brand {
  min-width: 0;
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

nav .brand img {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  object-fit: contain;
  border-radius: 50%;
}

nav .brand span {
  min-width: 0;
  overflow: visible;
  font-family: var(--script, 'Allura', cursive);
  font-size: 2.15rem;
  line-height: 1;
  white-space: nowrap;
  text-overflow: clip;
}

nav .nav-links,
nav .nav-actions {
  min-width: 0;
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

nav .btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid rgba(181, 110, 110, .45);
  border-radius: 999px;
  background: #b56e6e;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

nav .btn.alt {
  background: rgba(255, 251, 246, .94);
  color: #8c4f4f;
}

nav .topbar-whatsapp {
  display: inline-flex;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(181, 110, 110, .45);
  border-radius: 50%;
  background: rgba(255, 251, 246, .94);
  color: #8c4f4f;
  box-shadow: 0 8px 24px rgba(181, 110, 110, .2);
  text-decoration: none;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}

nav .topbar-whatsapp:hover,
nav .topbar-whatsapp:focus-visible {
  background: #b56e6e;
  color: #fff;
  transform: translateY(-2px);
  outline: 2px solid rgba(140, 79, 79, .3);
  outline-offset: 3px;
}

nav .topbar-whatsapp svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

@media (max-width: 850px) {
  nav { padding: 10px 16px; }

  nav .brand img {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  nav .brand span { font-size: 1.38rem; }

  nav .nav-links > a:not(.btn),
  nav .nav-actions > .nav-link { display: none; }

  nav .nav-links,
  nav .nav-actions { gap: 8px; }

  nav .btn {
    width: auto;
    min-width: 0;
    padding: 11px 15px;
    font-size: .78rem;
  }

  nav .topbar-whatsapp {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .actions .btn,
  .hero-actions .btn { min-width: 0; }

  table { display: block; max-width: 100%; overflow-x: auto; }
}

@media (max-width: 520px) {
  nav { gap: 10px; }

  nav .brand { gap: 8px; }

  nav .brand img {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  nav .brand span {
    max-width: 145px;
    font-size: 1.2rem;
    line-height: .9;
    white-space: normal;
  }

  nav .btn {
    padding: 10px 12px;
    font-size: .72rem;
    line-height: 1.25;
    white-space: normal;
  }

  .actions,
  .hero-actions { display: grid; grid-template-columns: 1fr; }

  .actions .btn,
  .hero-actions .btn { width: 100%; }

  .card,
  .contact-card,
  .footer-card { overflow-wrap: anywhere; }
}

@media (max-width: 360px) {
  nav .brand span { max-width: 112px; font-size: 1.05rem; }
  nav .brand img { width: 40px; height: 40px; flex-basis: 40px; }
  nav .btn { padding: 9px 10px; font-size: .68rem; }
}
