/**
 * Fazenda Santa Cruz — Ultra-Premium Language Switcher & Navigation Design
 * Agência Taruga — www.agenciataruga.com
 * Leandro Oliveira Nunes — leandro@agenciataruga.com
 */

/* ==========================================================================
   1. NAVBAR HEADER & SCROLL BEHAVIOR
   ========================================================================== */
#site-header {
  transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#site-header.scrolled {
  background-color: rgba(10, 22, 12, 0.94) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(201, 162, 39, 0.15);
  padding-top: 0.85rem !important;
  padding-bottom: 0.85rem !important;
}

/* Luxury Nav Links with Animated Gold Underline */
.nav-link-premium {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(244, 240, 230, 0.82);
  text-decoration: none;
  padding: 0.35rem 0.15rem;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.nav-link-premium::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1.5px;
  background: linear-gradient(90deg, #c9a227, #e8cf78, #c9a227);
  transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 2px;
}

.nav-link-premium:hover {
  color: #e8cf78;
}

.nav-link-premium:hover::after,
.nav-link-premium.active-page::after {
  width: 100%;
}

.nav-link-premium.active-page {
  color: #c9a227;
  font-weight: 600;
}

/* Nav Actions Container */
.nav-actions-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: 0.5rem;
}

/* Nav CTA Contact Button */
.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9a227;
  border: 1px solid rgba(201, 162, 39, 0.5);
  background: rgba(201, 162, 39, 0.06);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.nav-cta-btn:hover {
  background: linear-gradient(135deg, #c9a227 0%, #dfb83c 100%);
  color: #0b1a0e;
  border-color: #dfb83c;
  box-shadow: 0 4px 20px rgba(201, 162, 39, 0.35);
  transform: translateY(-1px);
}

/* ==========================================================================
   2. ULTRA-PREMIUM DESKTOP LANGUAGE SWITCHER
   ========================================================================== */
.lang-dropdown-container {
  position: relative;
  display: inline-block;
}

/* Language Trigger Button */
.lang-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(14, 28, 16, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(244, 240, 230, 0.95);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
}

.lang-trigger-btn:hover {
  border-color: #c9a227;
  color: #ffffff;
  background: rgba(18, 36, 20, 0.9);
  box-shadow: 0 4px 16px rgba(201, 162, 39, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.lang-trigger-btn:focus-visible {
  outline: 2px solid #c9a227;
  outline-offset: 2px;
}

/* Flag inside trigger */
.lang-flag-trigger {
  width: 1.15rem;
  height: 0.82rem;
  border-radius: 2.5px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 1px 3px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

/* Chevron arrow */
.lang-chevron {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  opacity: 0.75;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  flex-shrink: 0;
}

.lang-dropdown-container.is-open .lang-chevron {
  transform: rotate(180deg);
  opacity: 1;
  stroke: #c9a227;
}

/* Luxury Dropdown Menu Popover */
.lang-menu-card {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  width: 15.5rem;
  background: rgba(11, 23, 13, 0.96);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 1rem;
  padding: 0.6rem;
  box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.75),
              0 0 0 1px rgba(255, 255, 255, 0.05),
              0 1px 15px rgba(201, 162, 39, 0.12);
  z-index: 100;
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.22s;
  pointer-events: none;
}

.lang-dropdown-container.is-open .lang-menu-card {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Menu Header Label */
.lang-menu-header {
  padding: 0.4rem 0.6rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(201, 162, 39, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lang-menu-header span:last-child {
  font-size: 0.58rem;
  opacity: 0.6;
  font-weight: 500;
}

/* Language Item Row */
.lang-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.65rem;
  text-decoration: none;
  color: rgba(244, 240, 230, 0.85);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 0.2rem;
  position: relative;
  background: transparent;
}

.lang-item-row:last-child {
  margin-bottom: 0;
}

.lang-item-row:hover {
  background: rgba(201, 162, 39, 0.1);
  color: #ffffff;
  transform: translateX(2px);
}

.lang-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Flag inside menu */
.lang-flag-menu {
  width: 1.5rem;
  height: 1.05rem;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.lang-item-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.lang-name-primary {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.lang-name-sub {
  font-size: 0.625rem;
  color: rgba(244, 240, 230, 0.5);
}

/* Active State Badge */
.lang-item-row.is-active {
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.18), rgba(201, 162, 39, 0.06));
  color: #e8cf78;
  border-left: 2.5px solid #c9a227;
  pointer-events: none;
  cursor: default;
}

.lang-item-row.is-active .lang-name-primary {
  color: #c9a227;
  font-weight: 700;
}

.lang-item-row.is-active .lang-name-sub {
  color: rgba(201, 162, 39, 0.75);
}

.lang-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: rgba(201, 162, 39, 0.2);
  border: 1px solid rgba(201, 162, 39, 0.4);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #c9a227;
  text-transform: uppercase;
}

.lang-active-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9a227;
  box-shadow: 0 0 6px #c9a227;
}

/* ==========================================================================
   3. ULTRA-PREMIUM MOBILE LANGUAGE SWITCHER PILL
   ========================================================================== */
.mobile-lang-segmented {
  display: inline-flex;
  align-items: center;
  background: rgba(11, 23, 13, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 9999px;
  padding: 2px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mobile-lang-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(244, 240, 230, 0.7);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mobile-lang-tab svg {
  width: 0.95rem;
  height: 0.7rem;
  border-radius: 1.5px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.mobile-lang-tab:hover {
  color: #e8cf78;
}

.mobile-lang-tab.is-active {
  background: linear-gradient(135deg, #c9a227 0%, #dfb83c 100%);
  color: #0b1a0e;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.4);
  pointer-events: none;
}

/* Mobile Drawer Links Polish */
#mobile-menu {
  background: rgba(10, 22, 12, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}
