/* ============================================================
NAVBAR
============================================================ */

:root {
  --eh-gold: #c9a84c;
  --eh-gold-light: #dbbf6a;
  --eh-dark: #0b1320;
  --nav-h: 80px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(11, 19, 32, 0);        /* ← stesso colore, alpha 0 */
  border-bottom: 1px solid rgba(201, 168, 76, 0);
  transition: background .5s ease, border-color .5s ease,
              box-shadow .5s ease, height .4s ease;
}

.navbar.is-scrolled {
  background: rgba(11, 19, 32, 1);        /* ← alpha 1, transizione fluida */
  border-bottom-color: rgba(201, 168, 76, 0.12);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* ============================================================
NAVBAR LAYOUT
============================================================ */

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* ============================================================
LOGO
============================================================ */

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  transition: opacity .25s ease, transform .25s ease;
}

.logo-text {
  font-family: "Cormorant Garamond", serif;
  font-size: 30px;
  font-weight: 600;
  color: white;
  letter-spacing: .04em;
  line-height: 1;
  transition: color .25s ease;
}

.logo:hover .logo-img {
  opacity: .85;
  transform: scale(1.02);
}

.logo:hover .logo-text {
  color: var(--eh-gold);
}

/* ============================================================
NAV LINKS
============================================================ */

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  letter-spacing: .02em;
  padding: 8px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: color .2s ease;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--eh-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}

.nav-link:hover,
.nav-link:hover .dropdown-arrow,
.nav-dropdown:hover .dropdown-trigger {
  color: white;
}

.nav-link:hover::after,
.nav-dropdown:hover .dropdown-trigger::after {
  transform: scaleX(1);
}

/* ============================================================
ACTIVE LINK — current section (set by nav-scroll.js)
============================================================ */

.nav-link.is-active {
  color: var(--eh-gold);
}

.nav-link.is-active::after {
  transform: scaleX(1);
  background: var(--eh-gold);
  opacity: .9;
}

/* ============================================================
DROPDOWN ARROW
============================================================ */

.dropdown-arrow {
  color: rgba(255, 255, 255, 0.45);
  transition: transform .25s ease, color .2s;
  flex-shrink: 0;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
  color: var(--eh-gold);
}

/* ============================================================
DROPDOWN MENU
============================================================ */

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 240px;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

/* Triangolino */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid rgba(201, 168, 76, 0.25);
}

.dropdown-inner {
  background: rgba(8, 15, 29, 0.97);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-top: 2px solid var(--eh-gold);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Bridge trasparente per evitare gap al hover */
.dropdown-menu::after {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

/* ============================================================
DROPDOWN ITEMS
============================================================ */

.dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 22px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background .2s ease;
  position: relative;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--eh-gold);
  transform: scaleY(0);
  transition: transform .25s ease;
}

.dropdown-item:hover {
  background: rgba(201, 168, 76, 0.06);
}

.dropdown-item:hover::before {
  transform: scaleY(1);
}

.dropdown-item-label {
  font-family: "Cormorant Garamond", serif;
  font-size: 17px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  transition: color .2s;
}

.dropdown-item:hover .dropdown-item-label {
  color: var(--eh-gold);
}

.dropdown-item-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: .02em;
}

/* ============================================================
NAV CTA
============================================================ */

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 20px;
  margin-left: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid var(--eh-gold);
  background: transparent;
  color: white;
  transition: background .25s ease;
}

.nav-cta:hover {
  background: rgba(201, 168, 76, .12);
}

/* ============================================================
HAMBURGER
============================================================ */

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  height: 1.5px;
  background: white;
  transition: transform .3s ease, opacity .3s ease, width .3s ease;
  transform-origin: center;
}

.menu-toggle span:nth-child(3) {
  width: 60%;
  align-self: flex-end;
}

.menu-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); width: 100%; }

/* ============================================================
RESPONSIVE
============================================================ */

@media (max-width: 900px) {

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    width: 100%;
    background: rgba(8, 15, 29, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 0 24px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-link,
  .dropdown-trigger {
    padding: 14px 28px;
    font-size: 15px;
    width: 100%;
    justify-content: space-between;
    border-radius: 0;
  }

  .nav-link::after { display: none; }

  /* Dropdown mobile — reset positioning ereditato da desktop */
  .dropdown-menu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }

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

  .dropdown-inner {
    border: none;
    border-top: none;
    border-left: 2px solid rgba(201, 168, 76, 0.3);
    margin-left: 28px;
    margin-right: 28px;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.03);
  }

  .nav-dropdown.is-open .dropdown-menu {
    max-height: 300px;
  }

  .nav-dropdown.is-open .dropdown-arrow {
    transform: rotate(180deg);
  }

.nav-cta {
    display: none;
  }
}