:root {
  --anchor-offset: calc(var(--header-height, 68px) + 1.5rem);
}

html {
  scroll-padding-top: var(--anchor-offset);
}

main section[id],
main div[id],
main article[id],
main aside[id],
main h1[id],
main h2[id],
main h3[id],
main h4[id],
main h5[id],
main h6[id] {
  scroll-margin-top: var(--anchor-offset);
}

body.nav-open {
  overflow: hidden;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f7f3f1;
  border-bottom: 1px solid rgba(58, 44, 35, 0.06);
  box-shadow: 0 8px 18px rgba(58, 44, 35, 0.08);
  height: var(--header-height, 68px);
  display: flex;
  align-items: center;
}

header .container {
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
}

header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1.1rem;
  min-width: 0;
  height: 100%;
  padding: 0.35rem 0;
}

header .brand {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #3b3431;
  white-space: nowrap;
}

header .brand .brand-accent {
  color: #c79b5f;
}

header .nav-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1.8rem;
  min-width: 0;
  margin: 0 0 0 auto;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 400;
}

header .nav-links > li {
  flex: 0 0 auto;
  list-style: none;
  position: relative;
  min-width: 0;
}

header .nav-item-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

header .nav-item-row > a {
  min-width: 0;
}

header .nav-links a,
header .nav-links button:not(.btn):not(.submenu-toggle) {
  padding: 0.2rem 0.1rem;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  color: #6c6462;
}

header .nav-links a.is-active,
header .nav-links a[aria-current="page"],
header .nav-links button.is-active:not(.btn):not(.submenu-toggle),
header .nav-links button[aria-current="page"]:not(.btn):not(.submenu-toggle) {
  color: #6c6462;
  border-color: transparent;
  background: transparent;
}

header .nav-links a:hover,
header .nav-links button:hover:not(.btn):not(.submenu-toggle) {
  color: #3b3431;
  border-color: rgba(199, 155, 95, 0.6);
  background: transparent;
}

header .nav-links button:not(.btn):not(.submenu-toggle) {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

header .nav-socials {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.6rem;
  margin-left: auto;
}

header .nav-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(58, 44, 35, 0.16);
  background: rgba(255, 255, 255, 0.65);
  color: #c79b5f;
  transition: transform 0.18s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

header .nav-socials a:hover {
  color: #3b3431;
  border-color: rgba(199, 155, 95, 0.6);
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

header .nav-socials svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

header .social-label,
header .submenu-toggle,
header .nav-backdrop {
  display: none;
}

header .dropdown-toggle::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.3rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #8b7a73;
  transform: translateY(-1px);
}

header .dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  padding: 0.7rem 0;
  border-radius: 12px;
  background: #fbf8f6;
  box-shadow: 0 16px 36px rgba(58, 44, 35, 0.12);
  display: none;
}

header .dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

header .dropdown-menu a {
  display: block;
  padding: 0.55rem 1.1rem;
  border-bottom: none;
  font-size: 0.95rem;
}

header .dropdown-menu a:hover {
  background: rgba(192, 158, 83, 0.06);
  color: #2f2d3a;
}

header .nav-links li:hover > .dropdown-menu,
header .nav-links li:focus-within > .dropdown-menu {
  display: block;
}

header .btn-booking {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-family: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
  color: #ffffff;
  background: linear-gradient(180deg, #d1a36c 0%, #c48e52 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 20px rgba(191, 138, 76, 0.3);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

header .btn-booking:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(192, 158, 83, 0.38);
}

header .btn-booking:active {
  transform: translateY(-1px);
}

header .menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(58, 44, 35, 0.18);
  background: rgba(255, 255, 255, 0.86);
  color: #5c4a41;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

header .menu-toggle:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(199, 155, 95, 0.5);
}

header .menu-toggle:active {
  transform: scale(0.97);
}

header .menu-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  position: relative;
}

header .menu-toggle .bar {
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

header .menu-toggle .menu-toggle-icon .bar:nth-child(1) {
  top: 2px;
}

header .menu-toggle .menu-toggle-icon .bar:nth-child(2) {
  top: 8px;
}

header .menu-toggle .menu-toggle-icon .bar:nth-child(3) {
  top: 14px;
}

header.nav-open .menu-toggle .menu-toggle-icon .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

header.nav-open .menu-toggle .menu-toggle-icon .bar:nth-child(2) {
  opacity: 0;
}

header.nav-open .menu-toggle .menu-toggle-icon .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 1100px) {
  header .container {
    width: min(1180px, calc(100% - 2rem));
  }
}

@media (max-width: 980px) {
  header {
    position: sticky;
    top: 0;
    height: auto;
  }

  header .container {
    width: min(1180px, calc(100% - 1.4rem));
  }

  header .brand {
    max-width: calc(100% - 3.75rem);
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem !important;
    letter-spacing: 0.16em !important;
  }

  header .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0;
    height: auto;
    padding: 0.55rem 0;
  }

  header .menu-toggle {
    display: inline-flex;
    width: 46px;
    min-width: 46px;
    height: 46px;
    padding: 0;
    gap: 4px;
    flex-direction: column;
    position: relative;
    z-index: 42;
  }

  header .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(23rem, calc(100vw - 1rem));
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 4.5rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-radius: 26px 0 0 26px;
    background: linear-gradient(180deg, #fbf7f4 0%, #f3ebe4 100%);
    box-shadow: -24px 0 44px rgba(24, 17, 12, 0.18);
    gap: 0.7rem;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, visibility 0.28s ease;
    z-index: 41;
  }

  header.nav-open .nav-links {
    display: flex;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  header .nav-links > li {
    width: 100%;
    min-width: 0;
    list-style: none;
    touch-action: manipulation;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  header .nav-links > li + li {
    border-top: 0;
  }

  header .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(18, 12, 8, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 40;
  }

  header.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  header .nav-item-row {
    align-items: stretch;
    padding: 0;
  }

  header .nav-item-row > a {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-height: 50px;
    padding: 0.72rem 0.4rem;
    line-height: 1.3;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #3b3431;
  }

  header .nav-links a,
  header .nav-links button:not(.btn):not(.submenu-toggle) {
    display: flex;
    align-items: center;
    white-space: normal;
    touch-action: manipulation;
  }

  header .dropdown-menu {
    display: flex;
    position: static;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    margin: 0;
    padding: 0 0 0.55rem 0.85rem;
    border-radius: 0;
    border-left: 1px solid rgba(199, 155, 95, 0.35);
    background: transparent;
    box-shadow: none;
  }

  header .dropdown-menu::before {
    display: none;
  }

  header .submenu-toggle,
  header .nav-links button.submenu-toggle {
    display: none !important;
  }

  header .nav-socials {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    width: auto;
    margin-left: 0;
    padding-top: 0.2rem;
  }

  header .nav-links > li.nav-socials {
    order: 7;
    padding: 0;
  }

  header .nav-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(58, 44, 35, 0.16);
    background: rgba(255, 255, 255, 0.82);
    color: #5c4a41;
  }

  header .nav-socials a::before {
    content: "";
    flex: 0 0 15px;
    width: 15px;
    min-width: 15px;
    height: 15px;
    min-height: 15px;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
  }

  header .nav-socials a[aria-label="Facebook"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c79b5f'%3E%3Cpath d='M13.5 9H16V6h-2.5C10.46 6 9 7.8 9 10.3V12H7v3h2v6h3v-6h2.6l.4-3H12v-1.4c0-.9.3-1.6 1.5-1.6z'/%3E%3C/svg%3E");
  }

  header .nav-socials a[aria-label="Instagram"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c79b5f'%3E%3Cpath d='M7 3h10a4 4 0 0 1 4 4v10a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V7a4 4 0 0 1 4-4zm0 2a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H7zm5 3.5a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11zm0 2a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7zm6-3.1a1.1 1.1 0 1 1 0 2.2 1.1 1.1 0 0 1 0-2.2z'/%3E%3C/svg%3E");
  }

  header .nav-socials svg,
  header .nav-socials .social-label {
    display: none;
  }

  header .btn-booking {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    margin-top: 0.25rem;
    touch-action: manipulation;
  }

  header .dropdown-toggle {
    white-space: normal;
  }

  header .dropdown-toggle::after {
    display: none;
  }

  header .nav-links button:not(.btn):not(.submenu-toggle),
  header .nav-links a {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0.7rem 0.4rem;
    justify-content: flex-start;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  header .nav-socials a {
    width: 40px;
    min-width: 40px;
    padding: 0;
    justify-content: center;
  }

  header .nav-links .dropdown-menu a {
    display: block;
    min-height: 42px;
    padding: 0.55rem 0.45rem;
    font-size: 0.84rem !important;
    line-height: 1.45;
    color: #6f625d;
  }

  header .nav-links > li.nav-direct > a {
    font-size: 0.96rem !important;
    font-weight: 600 !important;
    color: #4b413c;
  }

  header .nav-links > li.nav-contact {
    margin-top: 0;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(58, 44, 35, 0.12);
  }

  header .nav-links > li.nav-booking {
    order: 6;
    padding-top: 0.2rem;
  }
}

@media (max-width: 768px) {
  header .container {
    width: min(1180px, calc(100% - 1.4rem));
  }

  header .brand {
    font-size: 0.92rem !important;
    letter-spacing: 0.12em !important;
  }

  .brand > img {
    height: 2.15rem !important;
  }

  header .nav {
    column-gap: 0.55rem;
  }

  header .menu-toggle {
    width: 46px;
    min-width: 46px;
    height: 46px;
    padding: 0;
  }
}

@media (max-width: 980px) and (orientation: landscape) {
  body.nav-open {
    overflow: hidden;
  }

  header .nav {
    position: relative;
    overflow: visible;
    padding: 0.4rem 0;
  }

  header .brand {
    max-width: calc(100% - 3.35rem);
    font-size: 0.92rem !important;
    letter-spacing: 0.12em !important;
  }

  .brand > img {
    height: 2rem !important;
  }

  header .menu-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  header .nav-backdrop {
    display: none !important;
  }

  header .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: min(72dvh, 24rem);
    margin: 0;
    flex-direction: column !important;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.95rem 0.95rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
    border: 1px solid rgba(58, 44, 35, 0.1);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(251, 247, 244, 0.98) 0%, rgba(243, 235, 228, 0.98) 100%);
    box-shadow: 0 20px 40px rgba(24, 17, 12, 0.16);
    gap: 0.35rem;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
    z-index: 41;
    transform: none;
    visibility: visible;
    pointer-events: auto;
  }

  header.nav-open .nav-links {
    display: flex;
  }

  header .nav-links > li.nav-contact {
    margin-top: 0;
  }
}

@media (max-width: 560px) {
  header .container {
    width: min(1180px, calc(100% - 1rem));
  }

  header .nav {
    padding: 0.5rem 0;
  }

  header .brand {
    font-size: 0.84rem !important;
    letter-spacing: 0.08em !important;
  }

  .brand > img {
    height: 1.95rem !important;
  }

  header .menu-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
  }
}
