/* ==========================================================
   Música Única – Header (Hello Elementor child + UAE)
   Custom CSS classes to add in Elementor > Advanced > CSS Classes:
     Top bar container ........ mu-topbar
     Main header container .... mu-header
     Logo widget .............. mu-logo
     Nav Menu widget .......... mu-nav
     Button / search wrapper .. mu-cta
   ========================================================== */

:root {
  --mu-ink: #14162b;        /* deep midnight navy */
  --mu-ink-2: #1d2040;
  --mu-ivory: #faf6ee;      /* score-paper white */
  --mu-gold: #c2a063;       /* brass / gilded */
  --mu-burgundy: #6b1d2a;   /* concert-hall velvet */
  --mu-header-h: 84px;
  --mu-header-h-shrunk: 62px;
  --mu-font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

/* ---------- Sticky wrapper (Elementor free has no sticky) ---------- */
#masthead,
header.hfe-header,
.ehf-header #masthead {
  position: sticky;
  top: 0;
  z-index: 999;
}

/* ---------- Top bar (hidden on mobile) ---------- */
.mu-topbar {
  background: var(--mu-burgundy);
  color: var(--mu-ivory);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}
.mu-topbar a { color: var(--mu-ivory); }
.mu-topbar a:hover { color: var(--mu-gold); }
@media (max-width: 767px) { .mu-topbar { display: none; } }

/* ---------- Main bar ---------- */
.mu-header {
  background: var(--mu-ink);
  min-height: var(--mu-header-h);
  transition: min-height .25s ease, box-shadow .25s ease;
  position: relative;
}

/* Five-line stave under the header: the classical motif */
.mu-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 9px;
  background: repeating-linear-gradient(
    to bottom,
    var(--mu-gold) 0 1px,
    transparent 1px 2px
  );
  opacity: .45;
  pointer-events: none;
}

.mu-header.is-shrunk {
  min-height: var(--mu-header-h-shrunk);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
.mu-header.is-shrunk .mu-logo img { max-height: 38px; }
.mu-logo img { max-height: 52px; width: auto; transition: max-height .25s ease; }

/* ---------- Navigation (UAE Navigation Menu widget) ---------- */
.mu-nav .hfe-nav-menu .menu-item a.hfe-menu-item,
.mu-nav .hfe-nav-menu a {
  font-family: var(--mu-font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mu-ivory);
  position: relative;
  padding: 12px 16px;
  transition: color .2s ease;
}

/* Gold underline that draws in on hover / current page */
.mu-nav .hfe-nav-menu a::before {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 6px;
  height: 1px;
  background: var(--mu-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.mu-nav .hfe-nav-menu a:hover,
.mu-nav .hfe-nav-menu .current-menu-item > a,
.mu-nav .hfe-nav-menu .current-menu-ancestor > a { color: var(--mu-gold); }
.mu-nav .hfe-nav-menu a:hover::before,
.mu-nav .hfe-nav-menu .current-menu-item > a::before,
.mu-nav .hfe-nav-menu .current-menu-ancestor > a::before { transform: scaleX(1); }

/* Dropdown (categories / custom post types) */
.mu-nav .sub-menu {
  background: var(--mu-ink-2);
  border-top: 2px solid var(--mu-gold);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
  min-width: 240px;
}
.mu-nav .sub-menu a {
  font-size: 1rem;
  text-transform: none;
  letter-spacing: .02em;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

/* ---------- CTA / button ---------- */
.mu-cta .elementor-button {
  background: transparent;
  border: 1px solid var(--mu-gold);
  color: var(--mu-gold);
  border-radius: 999px;
  font-family: var(--mu-font-display);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease;
}
.mu-cta .elementor-button:hover { background: var(--mu-gold); color: var(--mu-ink); }

/* ---------- Accessibility ---------- */
.mu-header a:focus-visible,
.mu-header button:focus-visible {
  outline: 2px solid var(--mu-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Mobile / tablet (UAE hamburger) ---------- */
@media (max-width: 1024px) {
  .mu-header { min-height: 64px; }
  .mu-logo img { max-height: 40px; }

  /* Hamburger: 44px minimum touch target */
  .mu-nav .hfe-nav-menu__toggle {
    min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--mu-ivory);
  }

  /* Dropdown panel anchored to the header */
  .mu-nav .hfe-nav-menu__layout-horizontal,
  .mu-nav nav.hfe-dropdown {
    background: var(--mu-ink);
    border-top: 1px solid rgba(194, 160, 99, .5);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mu-nav .hfe-nav-menu a {
    font-size: 1.25rem;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
  }
  .mu-nav .hfe-nav-menu a::before { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .mu-header, .mu-logo img, .mu-nav a, .mu-nav a::before, .mu-cta .elementor-button {
    transition: none;
  }
}