:root {
  --eble-nav-gold: #d8ab45;
  --eble-nav-gold-dark: #b98b29;
  --eble-nav-bg: #1d1810;
  --eble-nav-text: #f5f0e6;
}

nav.eble-nav-enhanced {
  position: sticky;
  top: 0;
  z-index: 90;
}

nav.eble-nav-enhanced .nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 1.1vw, 18px);
  flex-wrap: nowrap;
}

nav.eble-nav-enhanced .nav-links a {
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, color 0.16s ease;
  transform: translateZ(0) scale(1);
}

nav.eble-nav-enhanced > a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

nav.eble-nav-enhanced > a .brand-logo {
  width: clamp(188px, 10.5vw, 220px) !important;
  height: auto !important;
  max-height: 74px !important;
  object-fit: contain !important;
  filter:
    drop-shadow(0 1px 0 rgba(31, 34, 33, 0.42))
    drop-shadow(0 0 1px rgba(31, 34, 33, 0.38))
    drop-shadow(0 6px 16px rgba(31, 34, 33, 0.08)) !important;
}

nav.eble-nav-enhanced .nav-links a.nav-home,
nav.eble-nav-enhanced .nav-links a.nav-contact {
  background: var(--eble-nav-gold);
  color: #151008 !important;
  padding: 14px 16px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

nav.eble-nav-enhanced .nav-links a.nav-home:hover,
nav.eble-nav-enhanced .nav-links a.nav-contact:hover,
nav.eble-nav-enhanced .nav-links a.is-active {
  background: var(--eble-nav-gold-dark);
  color: #151008 !important;
}

nav.eble-nav-enhanced .nav-links a:hover,
nav.eble-nav-enhanced .nav-links a:focus-visible {
  color: #151008 !important;
  transform: translateY(-1px) scale(1.045);
  box-shadow: 0 8px 18px rgba(31, 34, 33, 0.12);
  position: relative;
  z-index: 2;
}

nav.eble-nav-enhanced .nav-links a.is-active,
nav.eble-nav-enhanced .nav-links a.is-active:hover,
nav.eble-nav-enhanced .nav-links a.is-active:focus-visible,
nav.eble-nav-enhanced .nav-links a.nav-home,
nav.eble-nav-enhanced .nav-links a.nav-home:hover,
nav.eble-nav-enhanced .nav-links a.nav-home:focus-visible,
nav.eble-nav-enhanced .nav-links a.nav-contact,
nav.eble-nav-enhanced .nav-links a.nav-contact:hover,
nav.eble-nav-enhanced .nav-links a.nav-contact:focus-visible {
  background: var(--eble-nav-gold) !important;
  color: #151008 !important;
}

.eble-nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid rgba(216, 171, 69, 0.55);
  background: rgba(29, 24, 16, 0.95);
  width: 46px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  cursor: pointer;
  margin-left: auto;
}

.eble-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--eble-nav-gold);
}

.eble-scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(216, 171, 69, 0.7);
  background: var(--eble-nav-gold);
  color: #171209;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.eble-scroll-top::before {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  border-top: 5px solid currentColor;
  border-left: 5px solid currentColor;
  transform: rotate(45deg);
  margin: 17px auto 0;
}

.eble-scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.eble-scroll-top:hover {
  background: var(--eble-nav-gold-dark);
}

@media (max-width: 1120px) {
  nav.eble-nav-enhanced {
    min-height: 78px;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem;
    background: rgba(29, 24, 16, 0.98);
    border-bottom: 1px solid rgba(216, 171, 69, 0.22);
  }

  .eble-nav-toggle {
    display: inline-flex;
  }

  body > nav .nav-links,
  nav.eble-nav-enhanced .nav-links {
    display: none !important;
    position: fixed !important;
    left: 0 !important;
    right: auto !important;
    top: 78px !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: calc(100vh - 78px) !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    background: rgba(29, 24, 16, 0.99);
    border-top: 1px solid rgba(216, 171, 69, 0.25);
    border-bottom: 1px solid rgba(216, 171, 69, 0.25);
    padding: 12px 18px 18px;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0;
    list-style: none !important;
    margin: 0 !important;
    z-index: 1000 !important;
  }

  body > nav.eble-nav-open .nav-links,
  body > nav .nav-links.is-open,
  nav.eble-nav-enhanced.eble-nav-open .nav-links,
  nav.eble-nav-enhanced .nav-links.is-open {
    display: flex !important;
  }

  body > nav .nav-links li,
  nav.eble-nav-enhanced .nav-links li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body > nav .nav-links a,
  nav.eble-nav-enhanced .nav-links a {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 48px;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(216, 171, 69, 0.16);
    text-align: center;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: var(--eble-nav-text) !important;
  }

  nav.eble-nav-enhanced .nav-links a.nav-home,
  body > nav .nav-links a.nav-home,
  body > nav .nav-links a.nav-contact,
  nav.eble-nav-enhanced .nav-links a.nav-contact {
    margin: 6px 0;
    min-height: 48px;
  }

  .eble-scroll-top {
    right: 14px;
    bottom: 14px;
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 640px) {
  nav.eble-nav-enhanced {
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
  }

  nav.eble-nav-enhanced .brand-logo {
    width: 150px;
    height: 52px;
  }

  nav.eble-nav-enhanced .nav-links {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  nav.eble-nav-enhanced .nav-links a {
    font-size: 11px;
    letter-spacing: 0.12em;
  }
}
