.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 1.75rem;
  margin-top: 1.5rem;
  color: rgba(250, 247, 242, 0.8);
  font-size: 0.76rem;
  line-height: 1.65;
}

.footer-legal a,
.footer-legal button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 0;
  color: inherit;
  font: inherit;
  text-align: center;
  background: none;
  border: 0;
  cursor: pointer;
}

.footer-legal a:hover,
.footer-legal button:hover {
  color: var(--beige);
  text-decoration: underline;
  text-decoration-color: var(--terracotta);
  text-underline-offset: 5px;
}

.footer-legal [hidden],
.cookie-banner[hidden],
.consent-status[hidden] {
  display: none;
}

.policy-page .site-header {
  background: var(--off-white);
}

.policy-main {
  padding: calc(var(--header-height) + 4rem) var(--page-gutter) 5rem;
}

.policy-article {
  max-width: 800px;
  margin-inline: auto;
  font-size: 1rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.policy-heading {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--beige);
}

.policy-heading .eyebrow {
  color: #9b4b31;
}

.policy-article h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
}

.policy-date {
  margin: 1.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.65;
}

.policy-content p {
  margin: 0 0 1.25rem;
}

.policy-content section {
  margin-top: 3rem;
  scroll-margin-top: calc(var(--header-height) + 2rem);
}

.policy-content h2 {
  margin: 0 0 1.5rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
}

.policy-content h3 {
  margin: 2rem 0 1rem;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.65;
}

.policy-content ul {
  margin: 0 0 1.5rem;
  padding-left: 1.4rem;
}

.policy-content li {
  padding-left: 0.2rem;
  margin-bottom: 0.45rem;
}

.policy-content a {
  text-decoration: underline;
  text-decoration-color: var(--terracotta);
  text-underline-offset: 4px;
}

.policy-content a:hover {
  color: #9b4b31;
}

.cookie-banner,
.cookie-panel,
.consent-status {
  position: fixed;
  inset: auto auto calc(var(--consent-bottom, 20px) + env(safe-area-inset-bottom)) 50%;
  z-index: 30;
  width: min(800px, calc(100% - 40px));
  max-height: calc(100dvh - var(--header-height) - 2rem - var(--consent-bottom, 20px) - env(safe-area-inset-bottom));
  margin: 0;
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  color: var(--blue);
  background: var(--off-white);
  border: 1px solid var(--beige);
  border-top: 2px solid var(--terracotta);
  border-radius: 2px;
  box-shadow: 0 4px 16px rgba(8, 43, 76, 0.06);
  transform: translateX(-50%);
}

.cookie-banner h2,
.cookie-panel h2 {
  margin: 0 0 0.75rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

.cookie-banner__copy {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.75;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.cookie-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1rem;
  color: var(--blue);
  background: transparent;
  border: 1px solid var(--blue);
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.cookie-button--primary {
  color: var(--off-white);
  background: var(--blue);
}

.cookie-button:hover {
  color: var(--off-white);
  background: var(--blue);
}

.cookie-button--primary:hover {
  background: #9b4b31;
  border-color: #9b4b31;
}

.cookie-actions [data-consent-accept],
.cookie-actions [data-consent-reject] {
  flex: 0 1 12rem;
  color: var(--off-white);
  background: var(--blue);
}

.cookie-actions [data-consent-accept]:hover,
.cookie-actions [data-consent-reject]:hover {
  background: #9b4b31;
  border-color: #9b4b31;
}

.cookie-policy-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  text-decoration: underline;
  text-decoration-color: var(--terracotta);
  text-underline-offset: 4px;
}

.cookie-policy-link:hover {
  color: #9b4b31;
}

.cookie-panel:not([open]) {
  display: none;
}

.cookie-panel[open],
.cookie-banner:not([hidden]) {
  animation: consent-in 180ms ease both;
}

.cookie-panel__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.cookie-panel__heading h2 {
  margin: 0;
}

.cookie-close {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--blue);
  background: none;
  border: 0;
  cursor: pointer;
}

.cookie-close:hover {
  color: #9b4b31;
}

.cookie-category {
  padding-block: 1.1rem;
  border-top: 1px solid var(--beige);
}

.cookie-category__control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-category label {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.6;
}

.cookie-category__description {
  max-width: 64ch;
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.7;
}

.cookie-required {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.72rem;
  line-height: 1.5;
}

.cookie-switch {
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  width: 48px;
  height: 44px;
}

.cookie-switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.cookie-switch__track {
  position: relative;
  display: block;
  width: 48px;
  height: 26px;
  background: var(--beige);
  border: 1px solid rgba(8, 43, 76, 0.4);
  border-radius: 16px;
  transition: background-color 160ms ease;
}

.cookie-switch__track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  content: "";
  background: var(--off-white);
  border: 1px solid rgba(8, 43, 76, 0.5);
  border-radius: 50%;
  transition: transform 160ms ease;
}

.cookie-switch input:checked + .cookie-switch__track {
  background: var(--blue);
  border-color: var(--blue);
}

.cookie-switch input:checked + .cookie-switch__track::after {
  transform: translateX(22px);
}

.cookie-switch input:focus-visible + .cookie-switch__track {
  outline: 2px solid var(--terracotta);
  outline-offset: 4px;
}

.cookie-switch input:disabled {
  cursor: default;
}

.consent-status {
  z-index: 31;
  font-size: 0.82rem;
  line-height: 1.7;
}

body.menu-open .cookie-banner,
body.menu-open .cookie-panel,
body.menu-open .consent-status {
  visibility: hidden;
}

body:has([data-consent-banner]:not([hidden])) .whatsapp-float,
body:has(#cookie-preferences[open]) .whatsapp-float {
  visibility: hidden;
  pointer-events: none;
}

@keyframes consent-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 960px) {
  .cookie-banner,
  .cookie-panel,
  .consent-status {
    --consent-bottom: 80px;
  }
}

@media (max-width: 767px) {
  .policy-main {
    padding-top: calc(var(--header-height) + 2.5rem);
    padding-bottom: 3.5rem;
  }

  .policy-article {
    font-size: 0.94rem;
    line-height: 1.8;
  }

  .policy-article h1 {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  .policy-content h2 {
    font-size: 1.2rem;
  }

  .policy-heading {
    margin-bottom: 2rem;
  }

  .cookie-banner,
  .cookie-panel {
    padding: 1.1rem 1rem;
  }

  .cookie-banner {
    --consent-bottom: 20px;
    padding-block: 0.875rem;
  }

  .cookie-banner h2,
  .cookie-panel h2 {
    font-size: 1.25rem;
  }

  .cookie-banner__copy {
    font-size: 0.76rem;
    line-height: 1.65;
  }

  .cookie-banner h2 {
    margin-bottom: 0.5rem;
  }

  .cookie-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.375rem;
    margin-top: 0.75rem;
  }

  .cookie-button {
    padding-inline: 0.5rem;
    font-size: 0.74rem;
  }

  .cookie-actions [data-consent-open] {
    grid-column: 1 / -1;
  }

  .cookie-actions .cookie-button {
    padding-block: 0.25rem;
  }

  .cookie-banner .cookie-policy-link {
    margin-top: 0;
  }

  .cookie-category__description {
    font-size: 0.76rem;
  }
}
