/* ── Base nav ── */

.custom-nav {
  width: 100%;
}

.custom-nav-inner {
  display: flex;

  align-items: center;

  justify-content: flex-end;
}

/* ── Desktop links ── */

.custom-nav-links {
  display: flex;

  gap: 2rem;

  list-style: none;

  margin: 0;

  padding: 0;

  align-items: center;
}

.custom-nav-item {
  position: relative;
}

/* Parent link + arrow sit side by side */

.custom-nav-link-wrap {
  display: flex;

  align-items: center;

  gap: 0.2rem;
}

.custom-nav-link {
  text-decoration: none;

  color: var(--wp--preset--color--earth-green);

  font-weight: 700;

  text-transform: uppercase;

  font-size: 1rem;

  transition: opacity 0.2s;
}

.custom-nav-link:hover {
  opacity: 0.6;
}

/* ── Desktop dropdown arrow button ── */

.dropdown-arrow-btn {
  background: none;

  border: none;

  cursor: pointer;

  padding: 2px 4px;

  color: currentColor;

  font-size: 0.75em;

  line-height: 1;

  display: flex;

  align-items: center;
}

.dropdown-arrow {
  display: inline-block;

  transition: transform 0.2s;
}

.dropdown-arrow-btn[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

/* ── Desktop dropdown ── */

.custom-nav-dropdown {
  display: none;

  position: absolute;

  top: calc(100% + 0.5rem);

  left: 0;

  min-width: 180px;

  list-style: none;

  margin: 0;

  padding: 0.5rem 0;

  background: #fff;

  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);

  border-radius: 4px;

  z-index: 100;
}

.custom-nav-dropdown.is-open {
  display: block;
}

.custom-nav-dropdown .custom-nav-link-wrap {
  padding: 0.5rem 1rem;

  transition: background 0.15s;
}

.custom-nav-dropdown .custom-nav-link-wrap:hover {
  background: #f5f5f5;
}

.custom-nav-dropdown .custom-nav-link {
  font-size: 0.95rem;
}

/* ── Hamburger button ── */

.custom-nav-toggle {
  display: none;

  flex-direction: column;

  gap: 5px;

  background: none;

  border: none;

  cursor: pointer;

  padding: 4px;

  z-index: 100;
}

.custom-nav-toggle span {
  display: block;

  width: 24px;

  height: 2px;

  background: var(--wp--preset--color--organic-clay);

  transition:
    transform 0.3s,
    opacity 0.3s;
}

/* ── Drawer ── */

.custom-nav-drawer {
  position: fixed;

  box-sizing: border-box;

  display: flex;

  flex-direction: column;

  justify-content: space-between;

  border-radius: 0px;

  top: 0;

  right: 0;

  width: 100%;

  max-width: 400px;

  height: 100%;

  background: var(--wp--preset--color--organic-clay);

  background-image: url(feed-bg-gradient.png);

  background-position: bottom;

  background-size: contain;

  background-repeat: no-repeat;

  z-index: 999;

  padding: 5rem 0 2rem;

  transform: translateX(100%);

  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);

  overflow-y: auto;
}

.custom-nav-drawer.is-open {
  transform: translateX(0);

  border-radius: 0%;
}

/* ── Drawer links ── */

.custom-nav-drawer-links {
  list-style: none;

  margin: 0;

  padding: 0;
}

/* Parent link + arrow sit side by side in drawer */

.drawer-link-wrap {
  display: flex;

  align-items: center;
}

.drawer-link-wrap a {
  flex: 1;

  display: block;

  padding: 0.85rem 2rem;

  text-decoration: none;

  color: var(--wp--preset--color--earth-green) !important;

  font-weight: 700;

  text-transform: uppercase;

  font-size: 1.1rem;

  transition: background 0.15s;
}

.drawer-link-wrap a:hover {
  background: #f9f9f9;
}

.nav-drawer-logo {
  width: 100%;

  height: 50px;

  background-image: url(Logo.svg);

  background-size: contain;

  background-position: center;

  background-repeat: no-repeat;
}

/* Arrow button in drawer */

.drawer-arrow-btn {
  background: none;

  border: none;

  border-left: 1px solid var(--wp--preset--color--earth-green);

  cursor: pointer;

  padding: 0.85rem 1rem;

  color: var(--wp--preset--color--earth-green);

  font-size: 30px;

  line-height: 20px;

  display: flex;

  align-items: center;
}

.drawer-arrow {
  display: inline-block;

  transition: transform 0.2s;
}

.drawer-arrow-btn[aria-expanded="true"] .drawer-arrow {
  transform: rotate(180deg);
}

/* ── Drawer submenu (accordion) ── */

.drawer-submenu {
  list-style: none;

  margin: 0;

  padding: 0;

  max-height: 0;

  overflow: hidden;

  transition: max-height 0.3s ease;

  background: #f9f9f9;
}

.drawer-submenu.is-open {
  max-height: 600px;
}

/* Child items indented */

.drawer-child .drawer-link-wrap a {
  padding-left: 2rem;

  font-size: 1rem;
}

/* Sub-child items more indented */

.drawer-child .drawer-child .drawer-link-wrap a {
  padding-left: 2rem;

  font-size: 0.95rem;
}

/* ── Close button ── */

.custom-nav-close {
  position: absolute;

  top: 1.5rem;

  right: 1.5rem;

  background: none;

  border: none;

  font-size: 1.8rem;

  cursor: pointer;

  line-height: 1;
  font-weight: bold;

  color: var(--wp--preset--color--earth-green);
}

/* ── Overlay ── */

.custom-nav-overlay {
  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.4);

  z-index: 998;

  opacity: 0;

  pointer-events: none;

  transition: opacity 0.35s;
}

.custom-nav-overlay.is-visible {
  opacity: 1;

  pointer-events: all;
}

/* ── Mobile ── */

@media (max-width: 991px) {
  .custom-nav-links {
    display: none;
  }

  .custom-nav-toggle {
    display: flex;
  }
}

.custom-nav-item,
.drawer-item {
  border-left: 8px solid transparent;
}

/* Active page indicator */
.custom-nav-item.is-current,
.drawer-item.is-current {
  border-left: 8px solid var(--wp--preset--color--parsley-green);
}
