/* ==========================================================================
   CABEÇALHO & SIDEBAR MOBILE (SITE HEADER & DRAWER)
   - MOBILE FIRST -
   ========================================================================== */

/* Bloqueio de Scroll do Body quando o menu está aberto */
body.menu-open {
  overflow: hidden !important;
  touch-action: none;
}

/* Fundo Desfocado (Glassmorphism Overlay) */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(42, 28, 18, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.site-header {
  background-color: var(--color-base);
  position: relative;
  z-index: 100;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: clamp(var(--space-16), 2vw, var(--space-24));
  padding-bottom: clamp(var(--space-16), 2vw, var(--space-24));
  gap: clamp(var(--space-16), 2vw, var(--space-32));
  max-height: 96px;
}

.site-branding {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  order: 1;
}

.site-logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  color: var(--color-primary);
}

.main-navigation {
  order: 2;
}

/* ==========================================================================
   MENU TOGGLE (HAMBURGER)
   ========================================================================== */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-8);
  color: var(--color-text);
  order: 3;
  margin-left: auto;
}

/* ==========================================================================
   NAV DRAWER (MOBILE BASE)
   ========================================================================== */
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 90vw;
  max-width: 380px;
  height: 100vh;
  height: 100dvh;
  background-color: var(--color-base);
  z-index: 999;
  box-shadow: -8px 0 32px rgba(42, 28, 18, 0.15);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: var(--space-24);
  gap: var(--space-32);
  overflow-y: auto;
}

.nav-drawer.is-active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-16);
  border-bottom: 1px solid rgba(42, 28, 18, 0.08);
}

.drawer-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-8);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
}

.drawer-close:hover {
  background-color: rgba(42, 28, 18, 0.06);
}

/* Menu Links */
.nav-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-20);
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  font-family: var(--font-family-button);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-neutral-900);
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease, text-decoration 0.2s ease;
  width: 100%;
  display: block;
}

.nav-menu a:hover {
  opacity: 1;
}

.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a,
.nav-menu .current-menu-ancestor > a,
.nav-menu .current-post-ancestor > a,
.nav-menu .current-post-type-ancestor > a,
.nav-menu .current-post-type-archive > a,
.nav-menu li[class*="current"] > a {
  color: var(--color-neutral-900);
  opacity: 1;
  text-decoration: underline;
  text-decoration-style: solid;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

/* Actions Wrapper */
.header-actions {
  display: contents; /* Mobile: Direct children */
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
  order: 2;
  width: 100%;
  margin-left: 0;
  justify-content: flex-start;
  padding-top: var(--space-20);
  border-top: 1px solid rgba(42, 28, 18, 0.08);
}

.lang-dropdown {
  position: relative;
}

.lang-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  background: transparent;
  border: none;
  padding: var(--space-4) var(--space-8);
  cursor: pointer;
  color: var(--color-text);
  font-family: var(--font-family-button);
  font-weight: 500;
  font-size: 16px;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
}

.lang-dropdown-toggle:hover {
  background-color: rgba(42, 28, 18, 0.05);
}

.lang-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  margin: 0;
  padding: var(--space-8) 0;
  list-style: none;
  background-color: var(--color-base);
  border: 1px solid rgba(42, 28, 18, 0.08);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(42, 28, 18, 0.1);
  min-width: 80px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 10;
}

.lang-dropdown:hover .lang-dropdown-menu,
.lang-dropdown:focus-within .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.lang-dropdown-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  padding: var(--space-4) var(--space-16);
  font-family: var(--font-family-button);
  font-size: var(--font-size-body-medium);
  color: var(--color-text);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-dropdown-menu .lang-name { font-weight: 500; }
.lang-dropdown-menu .lang-slug { font-weight: 400; font-size: 14px; }
.lang-dropdown-menu a:hover {
  background-color: rgba(42, 28, 18, 0.05);
  color: var(--color-terracota-500);
}

/* ==========================================================================
   DROPDOWN SUBMENUS DOS BOTÕES DE AÇÃO DO CABEÇALHO (HEADER BUTTON DROPDOWNS)
   ========================================================================== */
.header-btn-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.header-btn-dropdown-wrapper .btn.has-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-btn-dropdown-wrapper .chevron-icon {
  transition: transform 0.2s ease;
}

.header-btn-dropdown-wrapper:hover .chevron-icon,
.header-btn-dropdown-wrapper:focus-within .chevron-icon {
  transform: rotate(180deg);
}

.header-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 240px;
  background: #ffffff;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(42, 28, 18, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
}

.header-btn-dropdown-wrapper:hover .header-dropdown-menu,
.header-btn-dropdown-wrapper:focus-within .header-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-dropdown-menu .dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  background: transparent;
  color: var(--color-neutral-900, #2b2623);
  font-family: var(--font-family-body, 'Inter', sans-serif);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-dropdown-menu .dropdown-item:hover {
  background-color: rgba(217, 106, 61, 0.08); /* Terracota suave */
  color: var(--color-neutral-900, #2b2623);
}

.header-dropdown-menu .arrow-right-icon {
  color: var(--color-neutral-900, #2b2623);
  transition: transform 0.2s ease;
}

.header-dropdown-menu .dropdown-item:hover .arrow-right-icon {
  transform: translateX(3px);
}
.lang-dropdown-menu .is-active a { color: var(--color-terracota-700); }
.lang-dropdown-menu .is-active .lang-name { font-weight: 600; }

/* Buttons */
.btn-header-contact {
  padding: var(--space-8) var(--space-16);
  font-size: var(--font-size-button-medium);
  order: 3;
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

.btn-header-reserve {
  padding: var(--space-8) var(--space-20);
  font-size: var(--font-size-button-medium);
  order: 4;
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
   DESKTOP / NAVEGAÇÃO EXPANDIDA (>= 992px)
   ========================================================================== */
@media (min-width: 992px) {
  .site-branding { order: 0; }
  
  .main-navigation { 
    order: 0; 
    display: flex; 
    align-items: center; 
    flex: 1; 
    justify-content: flex-end; 
  }
  
  .menu-toggle { display: none; }
  
  .nav-drawer {
    position: static;
    width: 100%;
    max-width: none;
    height: auto;
    background-color: transparent;
    box-shadow: none;
    transform: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    gap: clamp(var(--space-16), 2vw, var(--space-48));
    overflow-y: visible;
    z-index: auto;
  }
  
  .drawer-header { display: none; }
  
  .nav-menu {
    flex-direction: row;
    align-items: center;
    gap: clamp(var(--space-16), 3vw, var(--space-32));
    margin: 0 auto;
    width: auto;
  }
  
  .nav-menu a {
    font-size: 16px;
    width: auto;
    display: inline-block;
  }
  
  .header-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(var(--space-8), 1.5vw, var(--space-16));
    flex-shrink: 0;
  }
  
  .language-switcher {
    order: 0;
    width: auto;
    margin-left: var(--space-4);
    justify-content: center;
    padding-top: 0;
    border-top: none;
  }
  
  .lang-dropdown-menu {
    right: 0;
    left: auto;
  }
  
  .btn-header-contact {
    order: 0;
    width: auto;
    justify-content: center;
    margin-top: 0;
  }
  
  .btn-header-reserve {
    order: 0;
    width: auto;
    justify-content: center;
  }
}
