:root {
  --cwtw-forest:  #1a3b2e;
  --cwtw-emerald: #2c6e49;
  --cwtw-sage:    #8cb47b;
  --cwtw-sand:    #ecd9b4;
  --cwtw-gold:    #c4a747;
  --cwtw-cream:   #fefae0;
  --cwtw-nav-h:   66px;
}

/* ── Reset (scoped) ── */
.cwtw-nav *,
.cwtw-nav *::before,
.cwtw-nav *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Top bar shell ── */
.cwtw-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 9000;
  height: var(--cwtw-nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
  will-change: background, box-shadow;
}

/* Solid background when scrolled */
.cwtw-nav.cwtw-scrolled {
  background: linear-gradient(135deg,
    rgba(26, 59, 46, 0.55) 0%,
    rgba(44, 110, 73, 0.50) 100%);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

/* ── Inner wrapper ── */
.cwtw-nav__inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ── Logo (top bar) ── */
.cwtw-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.cwtw-nav__logo-img {
  width: 44px;
  height: 44px;
  object-fit: cover;

  transition: border-color 0.3s;
}



.cwtw-nav__logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.cwtw-nav__logo-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
.cwtw-nav__logo-url {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.65);
  font-family: "Inter", sans-serif;
  letter-spacing: 0.04em;
}

/* ── Hamburger button ── */
.cwtw-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.22s;
}
.cwtw-nav__toggle:hover { background: rgba(255,255,255,0.18); }

.cwtw-nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s, width 0.3s;
  transform-origin: center;
}

.cwtw-nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.cwtw-nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0; width: 0;
}
.cwtw-nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Desktop navigation menu ── */
.cwtw-nav__menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

/* Desktop links */
.cwtw-nav__link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.22s, background 0.22s;
  position: relative;
}

.cwtw-nav__link:hover,
.cwtw-nav__link.cwtw-active {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.cwtw-nav__link.cwtw-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--cwtw-gold);
}

/* Chevron */
.cwtw-nav__chevron {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.22s;
  flex-shrink: 0;
}

/* Dropdown container (desktop) */
.cwtw-nav__item--dropdown { position: relative; }

.cwtw-nav__item--dropdown.cwtw-dd-open > .cwtw-nav__link .cwtw-nav__chevron,
.cwtw-nav__item--dropdown:focus-within > .cwtw-nav__link .cwtw-nav__chevron {
  transform: rotate(225deg) translateY(2px);
}

.cwtw-nav__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 200px;
  background: linear-gradient(160deg, rgba(26,59,46,0.97), rgba(22,50,38,0.98));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  padding: 0.5rem;
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 100;
  padding-top: 0.75rem;
  margin-top: 0;
}

.cwtw-nav__dropdown::after {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
}

.cwtw-nav__item--dropdown:focus-within > .cwtw-nav__dropdown,
.cwtw-nav__item--dropdown.cwtw-dd-open > .cwtw-nav__dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.cwtw-nav__dropdown::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: rgba(26,59,46,0.97);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-left: 1px solid rgba(255,255,255,0.1);
}

.cwtw-nav__dropdown li a {
  display: block;
  padding: 0.6rem 1rem;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s, padding-left 0.18s;
}

.cwtw-nav__dropdown li a:hover,
.cwtw-nav__dropdown li a.cwtw-active {
  background: rgba(196,167,71,0.2);
  color: var(--cwtw-gold);
  padding-left: 1.3rem;
}

/* Auth & CTA (desktop) */
.cwtw-nav__auth {
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.cwtw-nav__auth a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
  text-decoration: none;
}

.cwtw-nav__auth a:hover {
  border-color: var(--cwtw-gold);
  transform: scale(1.08);
}

.cwtw-nav__auth img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cwtw-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  background: var(--cwtw-gold);
  color: var(--cwtw-forest) !important;
  font-weight: 700 !important;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.75rem !important;
  letter-spacing: 0.06em;
  transition: background 0.22s, transform 0.22s, box-shadow 0.22s;
  box-shadow: 0 4px 14px rgba(196,167,71,0.3);
  white-space: nowrap;
}

.cwtw-nav__cta:hover {
  background: #d4b74a;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(196,167,71,0.4);
  color: var(--cwtw-forest) !important;
}

/* ===================================================================
   MOBILE DRAWER + OVERLAY — base hide/position rules
   IMPORTANT: these must apply at ALL viewport widths by default,
   not just inside the mobile media query, otherwise the drawer
   markup renders inline (unstyled) on desktop widths.
   =================================================================== */

/* Overlay (darkens background) */
.cwtw-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
body.cwtw-menu-open .cwtw-drawer-overlay {
  opacity: 1;
  visibility: visible;
}

/* Drawer itself */
.cwtw-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
    rgba(26, 59, 46, 0.98) 0%,
    rgba(44, 110, 73, 0.96) 100%);
  z-index: 10000;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 1.5rem 0 2rem;
  box-shadow: 2px 0 20px rgba(0,0,0,0.3);
  visibility: hidden;
}

.cwtw-drawer.cwtw-open {
  transform: translateX(0);
  visibility: visible;
}

/* ========== MOBILE STYLES ========== */
@media (max-width: 1024px) {
  .cwtw-nav__toggle { display: flex; }
  .cwtw-nav__menu { display: none; }
  .cwtw-nav__desktop-actions { display: none !important; }

  /* Hide top bar when drawer is open */
  body.cwtw-menu-open .cwtw-nav {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  /* Drawer header */
  .cwtw-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
  }

  .cwtw-drawer__logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
  }

  .cwtw-drawer__logo-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
  }

  .cwtw-drawer__logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
  }

  .cwtw-drawer__logo-name {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
  }

  .cwtw-drawer__logo-url {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.65);
    font-family: "Inter", sans-serif;
  }

  .cwtw-drawer__close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
  }

  .cwtw-drawer__close:hover {
    background: rgba(255,255,255,0.25);
  }

  /* Drawer navigation */
  .cwtw-drawer__nav {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .cwtw-drawer__item {
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .cwtw-drawer__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.5rem;
    font-family: "Inter", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
  }

  .cwtw-drawer__link.cwtw-active {
    color: var(--cwtw-gold);
    border-left: 3px solid var(--cwtw-gold);
    padding-left: calc(1.5rem - 3px);
  }

  /* Dropdown inside drawer */
  .cwtw-drawer__dropdown {
    background: rgba(0,0,0,0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .cwtw-drawer__dropdown.cwtw-open {
    max-height: 400px;
  }

  .cwtw-drawer__dropdown a {
    display: block;
    padding: 0.7rem 1.5rem 0.7rem 2.5rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: background 0.2s, padding-left 0.2s;
  }

  .cwtw-drawer__dropdown a:hover,
  .cwtw-drawer__dropdown a.cwtw-active {
    background: rgba(196,167,71,0.15);
    color: var(--cwtw-gold);
    padding-left: 2.8rem;
  }

  /* CTA and Auth inside drawer */
  .cwtw-drawer__cta {
    display: flex;
    justify-content: center;
    margin: 1.5rem 1.5rem 0;
  }

  .cwtw-drawer__cta .cwtw-nav__cta {
    width: 100%;
    justify-content: center;
    padding: 0.9rem;
    font-size: 0.9rem !important;
  }

  .cwtw-drawer__auth {
    margin: 1rem 1.5rem 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
  }

  .cwtw-drawer__auth a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
  }

  .cwtw-drawer__auth img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
  }
}

@media (max-width: 480px) {
  .cwtw-nav__inner { padding: 0 1rem; }
  .cwtw-nav__logo-name { font-size: 1rem; }
  .cwtw-nav__logo-url { display: none; }
}

/* Spacer */
.cwtw-nav-spacer { height: var(--cwtw-nav-h); }
.hero-page .cwtw-nav-spacer { height: 0; }