/* ============================================================
   Nobu Header — Frontend CSS v1.0.0
   All colors driven by CSS variables set inline from PHP
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:wght@300;400;500&display=swap');

/* ---- Defaults (overridden by inline vars) ---- */
.nh-header {
  --nh-accent:      #1a3fff;
  --nh-nav-h:       72px;
  --nh-topbar-h:    38px;
  --nh-topbar-bg:   #080808;
  --nh-nav-bg:      rgba(13,13,13,0.88);
  --nh-nav-bg-s:    rgba(13,13,13,0.98);
  --nh-mega-bg:     #111111;
  --nh-mega-border: rgba(255,255,255,0.06);
  --nh-mega-title:  #1a3fff;
  --nh-mega-link:   rgba(255,255,255,0.55);
  --nh-mega-link-h: #ffffff;
  --nh-nav-link:    rgba(255,255,255,0.68);
  --nh-nav-link-h:  #ffffff;
  --nh-cta-bg:      #1a3fff;
  --nh-topbar-blur: blur(0px);
  --nh-nav-blur:    blur(20px);
  --nh-cta-bg-h:    #0033e0;
  --nh-cta-txt:     #ffffff;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  font-family: 'DM Sans', sans-serif;
}

/* Body offset — added by JS */
body.nh-offset { padding-top: calc(var(--nh-nav-h) + var(--nh-topbar-h, 38px)); }
body.nh-scrolled-offset { padding-top: var(--nh-nav-h); }

/* ---- TOP BAR ---- */
.nh-topbar {
  height: var(--nh-topbar-h);
  backdrop-filter: var(--nh-topbar-blur);
  -webkit-backdrop-filter: var(--nh-topbar-blur);
  background: var(--nh-topbar-bg);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex; align-items: center;
  overflow: hidden;
  transition: height 0.3s, opacity 0.3s;
}
.nh-header.nh-scrolled .nh-topbar { height: 0; opacity: 0; pointer-events: none; }

.nh-topbar-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 32px; width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.nh-topbar-left   { display: flex; align-items: center; gap: 2px; justify-content: flex-start; }
.nh-topbar-center { display: flex; align-items: center; justify-content: center; }
.nh-topbar-right  { display: flex; align-items: center; justify-content: flex-end; }

.nh-topbar-social { display: flex; align-items: center; gap: 2px; }
.nh-social-link {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 7px;
  color: rgba(255,255,255,0.38); text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nh-social-link:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.8); }
.nh-social-link svg { width: 14px; height: 14px; }

.nh-topbar-div { width:1px; height:14px; background:rgba(255,255,255,0.08); margin: 0 6px; }

.nh-topbar-phone {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,0.6); text-decoration: none;
  transition: color 0.2s;
}
.nh-topbar-phone:hover { color: #fff; }
.nh-topbar-phone svg { width: 13px; height: 13px; flex-shrink: 0; }

.nh-topbar-links { display: flex; align-items: center; gap: 2px; }
.nh-topbar-links li { list-style: none; }
.nh-topbar-links li a {
  font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,0.42); text-decoration: none;
  padding: 4px 10px; border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.nh-topbar-links li a:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); }

/* ---- MAIN NAV ---- */
.nh-nav {
  height: var(--nh-nav-h);
  display: flex; align-items: center;
  background: var(--nh-nav-bg);
  backdrop-filter: var(--nh-nav-blur); -webkit-backdrop-filter: var(--nh-nav-blur);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.3s, box-shadow 0.3s;
}
.nh-header.nh-scrolled .nh-nav {
  background: var(--nh-nav-bg-s);
  box-shadow: 0 4px 32px rgba(0,0,0,0.45);
}
.nh-nav-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 32px; width: 100%;
  display: flex; align-items: center;
}

/* Logo */
.nh-logo {
  font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800;
  color: #fff; text-decoration: none; letter-spacing: -0.03em;
  margin-right: 36px; flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
}
.nh-logo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--nh-accent); box-shadow: 0 0 8px color-mix(in srgb, var(--nh-accent) 70%, transparent);
  flex-shrink: 0;
}
.nh-logo-text { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; }
.nh-logo-img  { height: 36px; width: auto; display: block; }
.nh-logo svg  { height: 36px; width: auto; }

/* Desktop menu */
.nh-menu { display: flex; align-items: center; list-style: none; gap: 0; flex: 1; }
.nh-item { position: relative; }

.nh-link {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 11px; height: var(--nh-nav-h);
  font-family: 'DM Sans', sans-serif; font-size: 13.5px; font-weight: 500;
  color: var(--nh-nav-link);
  text-decoration: none; border-radius: 0;
  background: none; border: none; cursor: pointer;
  white-space: nowrap; position: relative;
  transition: color 0.2s;
}
.nh-link:hover, .nh-item.nh-open > .nh-link { color: var(--nh-nav-link-h); }
.nh-link::after {
  content: ''; position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 16px; height: 2px;
  background: var(--nh-accent); border-radius: 2px;
  transition: transform 0.25s;
}
.nh-item.nh-open > .nh-link::after,
.nh-link:hover::after { transform: translateX(-50%) scaleX(1); }

.nh-chevron {
  width: 13px; height: 13px; opacity: 0.55; flex-shrink: 0;
  transition: transform 0.25s;
}
.nh-item.nh-open .nh-chevron { transform: rotate(180deg); }

/* CTA */
.nh-cta { margin-left: auto; flex-shrink: 0; }
.nh-cta a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 500; font-family: 'DM Sans', sans-serif;
  padding: 10px 22px; border-radius: 100px;
  background: var(--nh-cta-bg); color: var(--nh-cta-txt);
  text-decoration: none; border: 2px solid var(--nh-cta-bg);
  transition: background 0.3s, border-color 0.3s, transform 0.2s, box-shadow 0.3s;
  white-space: nowrap;
}
.nh-cta a:hover {
  background: var(--nh-cta-bg-h); border-color: var(--nh-cta-bg-h);
  transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  color: var(--nh-cta-txt);
}
.nh-cta svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ---- SMALL DROPDOWN ---- */
.nh-dropdown {
  position: absolute; top: calc(100% + 4px); left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #181818; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 8px; min-width: 240px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s; z-index: 998;
}
.nh-item.nh-open .nh-dropdown {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0); pointer-events: all;
}
.nh-dropdown-list { list-style: none; }
.nh-dropdown-list li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 13.5px; color: rgba(255,255,255,0.65); text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nh-dropdown-list li a:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nh-dd-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: color-mix(in srgb, var(--nh-accent) 50%, transparent);
  flex-shrink: 0;
}

/* ---- MEGA MENU ---- */
.nh-mega {
  position: fixed; top: calc(var(--nh-nav-h) + var(--nh-topbar-h)); left: 0; right: 0;
  background: var(--nh-mega-bg);
  border-top: 1px solid var(--nh-mega-border);
  border-bottom: 1px solid var(--nh-mega-border);
  box-shadow: 0 24px 60px rgba(0,0,0,0.65);
  opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s; z-index: 997;
}
.nh-header.nh-scrolled .nh-mega { top: var(--nh-nav-h); }
.nh-item.nh-open .nh-mega {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: all;
}

.nh-mega-inner {
  max-width: 1360px; margin: 0 auto; padding: 36px 32px 40px;
  display: grid; gap: 0;
  /* Columns = number of groups, set inline or default 4 */
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.nh-mega-inner.nh-mega-groups {
  grid-template-columns: repeat(var(--nh-cols, 4), 1fr);
}

.nh-mega-group { padding: 0 28px; border-right: 1px solid var(--nh-mega-border); }
.nh-mega-group:first-child { padding-left: 0; }
.nh-mega-group:last-child  { border-right: none; padding-right: 0; }

.nh-mega-group-title {
  font-family: 'Syne', sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--nh-mega-title); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.nh-mega-group-title::after { content: ''; flex: 1; height: 1px; background: var(--nh-mega-border); }

.nh-mega-links { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.nh-mega-links li a {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px;
  font-size: 13.5px; color: var(--nh-mega-link); text-decoration: none;
  transition: background 0.15s, color 0.15s, padding-left 0.15s; line-height: 1.3;
}
.nh-mega-links li a:hover {
  background: rgba(255,255,255,0.05); color: var(--nh-mega-link-h); padding-left: 14px;
}
.nh-mega-links li a::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: color-mix(in srgb, var(--nh-accent) 45%, transparent); flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.nh-mega-links li a:hover::before { background: var(--nh-accent); transform: scale(1.5); }

/* ---- HAMBURGER ---- */
.nh-hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  padding: 8px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  margin-left: auto; transition: background 0.2s;
}
.nh-hamburger:hover { background: rgba(255,255,255,0.09); }
.nh-hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nh-hamburger.nh-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nh-hamburger.nh-open span:nth-child(2) { opacity: 0; }
.nh-hamburger.nh-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- MOBILE MENU ---- */
.nh-mobile {
  display: none; position: fixed;
  top: calc(var(--nh-nav-h) + var(--nh-topbar-h, 38px));
  left: 0; right: 0; bottom: 0;
  background: #0d0d0d; z-index: 9998; overflow-y: auto;
  flex-direction: column; border-top: 1px solid rgba(255,255,255,0.07);
}
.nh-header.nh-scrolled ~ .nh-mobile { top: var(--nh-nav-h); }
.nh-mobile.nh-open { display: flex; }

.nh-mobile-strip {
  padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.06);
  background: #080808; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.nh-mobile-social { display: flex; align-items: center; gap: 4px; }
.nh-mobile-social .nh-social-link { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,0.05); }
.nh-mobile-strip-right { display: flex; align-items: center; gap: 12px; }
.nh-mobile-phone {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.6); text-decoration: none;
}
.nh-mobile-phone svg { width: 13px; height: 13px; flex-shrink: 0; }
.nh-mobile-toplinks { display: flex; gap: 2px; }
.nh-mobile-toplinks a {
  font-size: 12px; color: rgba(255,255,255,0.4); text-decoration: none;
  padding: 4px 8px; border-radius: 6px; transition: color 0.2s, background 0.2s;
}
.nh-mobile-toplinks a:hover { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.05); }

.nh-mobile-items { padding: 12px 16px; display: flex; flex-direction: column; gap: 3px; }

.nh-mobile-item { border-radius: 12px; overflow: hidden; }
.nh-mobile-toggle {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px; font-size: 15px; font-weight: 500;
  color: rgba(255,255,255,0.78); background: rgba(255,255,255,0.03);
  border-radius: 12px; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.nh-mobile-toggle:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nh-mobile-link { text-decoration: none; display: flex; }
.nh-mobile-toggle svg { width: 15px; height: 15px; opacity: 0.5; transition: transform 0.25s; flex-shrink: 0; }
.nh-mobile-item.nh-open .nh-mobile-toggle { background: rgba(255,255,255,0.06); color: #fff; }
.nh-mobile-item.nh-open .nh-mobile-toggle svg { transform: rotate(180deg); }

.nh-mobile-sub { display: none; padding: 4px 6px 8px; flex-direction: column; gap: 1px; }
.nh-mobile-item.nh-open .nh-mobile-sub { display: flex; }
.nh-mobile-sub a {
  padding: 8px 14px; font-size: 13.5px;
  color: rgba(255,255,255,0.5); text-decoration: none;
  border-radius: 8px; display: flex; align-items: center; gap: 8px;
  transition: background 0.15s, color 0.15s; line-height: 1.3;
}
.nh-mobile-sub a::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: rgba(26,63,255,0.45); flex-shrink: 0; }
.nh-mobile-sub a:hover { background: rgba(255,255,255,0.05); color: #fff; }

.nh-mobile-cta {
  margin: 8px 16px 20px; padding: 15px; background: var(--nh-cta-bg);
  border-radius: 14px; text-align: center; color: var(--nh-cta-txt);
  font-weight: 600; font-size: 15px; text-decoration: none;
  display: block; flex-shrink: 0; transition: opacity 0.2s;
}
.nh-mobile-cta:hover { opacity: 0.88; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1100px) { .nh-link { padding: 8px 9px; font-size: 13px; } .nh-logo { margin-right: 20px; } }
@media (max-width: 900px)  { .nh-menu, .nh-cta { display: none; } .nh-hamburger { display: flex; } }
