html {
  scroll-behavior: smooth;
}

.legal-page,
.not-found-page {
  width: min(100% - 2rem, 860px);
  margin: 0 auto;
  padding: 3rem 0 5rem;
  color: #25312f;
  font: 1rem/1.75 Georgia, "Times New Roman", serif;
}

.legal-page h1,
.not-found-page h1 {
  margin: 1.5rem 0 0.5rem;
  color: #285b50;
  font: 700 clamp(2rem, 5vw, 3.25rem)/1.15 Georgia, "Times New Roman", serif;
}

.legal-page h2 {
  margin: 2rem 0 0.5rem;
  color: #285b50;
  font: 700 1.3rem/1.3 Georgia, "Times New Roman", serif;
}

.legal-page p,
.legal-page li {
  max-width: 72ch;
}

.legal-page a,
.not-found-page a {
  color: #9b5138;
  text-underline-offset: 0.18em;
}

.legal-home {
  font-weight: 700;
  text-decoration: none;
}

.legal-updated {
  color: #5c6966;
  font-size: 0.92rem;
}

.not-found-page {
  min-height: 75vh;
  display: grid;
  align-content: center;
  justify-items: start;
}

.not-found-code {
  margin: 0;
  color: #9b5138;
  font: 700 1rem/1.2 Georgia, "Times New Roman", serif;
}

.not-found-page p {
  max-width: 48ch;
}

.not-found-home {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 1rem;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  background: #285b50;
  color: #fff !important;
  font-family: Arial, sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.cookie-consent {
  position: fixed;
  z-index: 1000;
  right: 1rem;
  bottom: 1rem;
  width: min(100% - 2rem, 560px);
  padding: 1.25rem;
  border: 1px solid #d2d9d4;
  border-radius: 6px;
  background: #fff;
  color: #25312f;
  box-shadow: 0 12px 40px rgb(21 42 36 / 18%);
  font: 0.95rem/1.5 Arial, sans-serif;
}

.cookie-consent[hidden],
.cookie-settings[hidden] {
  display: none;
}

.cookie-consent h2 {
  margin: 0 0 0.35rem;
  color: #285b50;
  font-size: 1.15rem;
}

.cookie-consent p {
  margin: 0 0 0.85rem;
}

.cookie-consent a {
  color: #85452f;
  text-underline-offset: 0.15em;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cookie-actions button,
.cookie-manage {
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  border: 1px solid #285b50;
  border-radius: 4px;
  background: #fff;
  color: #285b50;
  font: 700 0.9rem/1.2 Arial, sans-serif;
  cursor: pointer;
}

.cookie-actions button[data-cookie-choice="all"] {
  background: #285b50;
  color: #fff;
}

.cookie-manage {
  position: fixed;
  z-index: 999;
  right: 1rem;
  bottom: 1rem;
  box-shadow: 0 4px 18px rgb(21 42 36 / 16%);
}

.cookie-consent button:focus-visible,
.cookie-manage:focus-visible,
.not-found-page a:focus-visible,
.legal-page a:focus-visible {
  outline: 3px solid #b26945;
  outline-offset: 3px;
}

.cookie-map-placeholder {
  display: grid;
  min-height: 280px;
  place-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  background: #eef3ee;
  color: #25312f;
  text-align: center;
}

.cookie-map-placeholder a {
  color: #85452f;
}

[data-edit-id="apps/web/src/pages/HomePage.jsx:94:15"],
[data-edit-id="apps/web/src/pages/HomePage.jsx:157:15"],
[data-edit-id="apps/web/src/pages/EspecialistasPage.jsx:87:17"] {
  max-width: 62ch;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
  text-wrap: pretty;
}

@media (max-width: 767px) {
  header > div {
    position: relative;
  }

  header:not(.mobile-nav-open) nav {
    display: none !important;
  }

  header.mobile-nav-open nav {
    position: absolute;
    z-index: 30;
    top: 100%;
    right: 0;
    left: 0;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem 1rem 1rem;
    border: 1px solid #d2d9d4;
    background: #fff;
    box-shadow: 0 12px 24px rgb(21 42 36 / 12%);
  }

  header.mobile-nav-open nav a {
    padding: 0.75rem;
  }

  header button[aria-haspopup="dialog"] {
    display: inline-flex !important;
  }

  .cookie-consent {
    right: 0.5rem;
    bottom: 0.5rem;
    width: calc(100% - 1rem);
    padding: 1rem;
  }

  .cookie-manage {
    right: 0.5rem;
    bottom: 0.5rem;
  }
}

@media (max-width: 420px) {
  .legal-page,
  .not-found-page {
    width: min(100% - 1.5rem, 860px);
    padding-top: 2rem;
  }

  .cookie-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
