/* =========================================================
   NAYA DESKTOP NAV
   Gäller viewport ≥ 783px. Ersätter TT25:s header på desktop.
   Rollback: ta bort wp_footer-hooken + enqueuen i functions.php.
   ========================================================= */

/* Dölj TT25:s block-header på desktop — #naya-desktop-nav tar över */
@media (min-width: 783px) {
  header.wp-block-template-part,
  .wp-site-blocks > header,
  .site-header {
    display: none !important;
    visibility: hidden !important;
  }
}

/* ---- Wrapper ----------------------------------------------- */
#naya-desktop-nav {
  display: none; /* dold på mobil */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 1001;
  align-items: center;
  padding: 0 40px;
  gap: 32px;
  background: rgba(199, 205, 171, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(26, 24, 21, 0.06);
  transition: transform 0.25s ease;
  box-sizing: border-box;
}

@media (min-width: 783px) {
  #naya-desktop-nav { display: flex; }
}

/* Admin bar: skjut ner så vi inte täcker den */
.admin-bar #naya-desktop-nav { top: 32px; }

/* Hide-on-scroll — naya-header.js sätter body.header-hidden */
body.header-hidden #naya-desktop-nav {
  transform: translateY(-100%);
}

/* ---- Logo -------------------------------------------------- */
.ndm-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.ndm-logo img {
  height: 30px;
  width: auto;
  display: block;
}

/* ---- Nav + lista ------------------------------------------- */
.ndm-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.ndm-list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---- Toppnivå-items --------------------------------------- */
.ndm-item {
  position: relative;
  margin: 0;
  padding: 0;
}

/* Delad grund-styling: länk och dropdown-trigger */
.ndm-link,
.ndm-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  height: 80px;
  font-family: var(--body-font, sans-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--naya-text, #2a2a2a);
  text-decoration: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease;
  box-sizing: border-box;
}

/* Hover: mörkgrön understrykning */
.ndm-link:hover,
.ndm-trigger:hover {
  border-bottom-color: #495333;
  color: var(--naya-text, #2a2a2a);
  text-decoration: none;
}

/* Aktuell sida: permanent mörkgrön */
.ndm-item--current .ndm-link,
.ndm-item--current .ndm-trigger {
  border-bottom-color: #495333;
}

/* Dropdown-pil roterar när öppen */
.ndm-arrow {
  font-size: 10px;
  display: inline-block;
  transition: transform 0.2s ease;
  margin-left: 3px;
  opacity: 0.75;
  /* Peka nedåt från start: › roteras 90deg */
  transform: rotate(90deg);
}

.ndm-item--dropdown.is-open .ndm-arrow {
  transform: rotate(270deg);
}

/* ---- Tag (Premiär Juni) — delar klass med mobil ----------- */
.ndm-tag {
  font-family: var(--body-font, sans-serif);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--naya-brand-2, #c7cdab);
  color: var(--naya-brand, #495333);
  border-radius: 3px;
  padding: 2px 5px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

/* ---- Dropdown --------------------------------------------- */
.ndm-dropdown {
  display: none; /* JS togglar via .is-open på förälder-li */
  position: absolute;
  top: calc(100% - 2px); /* täck border-bottom på trigger */
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  max-width: 280px;
  padding: 24px;
  background: var(--naya-bg, #faf7ea);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
  list-style: none;
  margin: 0;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
  box-sizing: border-box;
}

.ndm-item--dropdown.is-open .ndm-dropdown {
  display: flex;
}

/* Underpost-länk: italic Cormorant Garamond */
.ndm-dropdown a {
  font-family: var(--heading-font, 'Cormorant Garamond', serif);
  font-style: italic;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--naya-text, #2a2a2a);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  display: block;
  transition: background 0.15s ease, color 0.15s ease;
}

/* Hover underpost: cream-deep bakgrund + guld text */
.ndm-dropdown a:hover {
  background: var(--naya-line, #e6e0cf);
  color: var(--naya-gold, #9C8358);
}

/* ---- CTA: Boka rum ---------------------------------------- */
.ndm-cta {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 10px 22px;
  margin-left: 16px;
  background: var(--naya-brand, #495333);
  color: #fff !important;
  font-family: var(--body-font, sans-serif);
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.ndm-cta:hover {
  background: var(--dark-green, #1e2a19);
  color: #fff !important;
  text-decoration: none;
}
