/* =========================================================
   HEADER / NAV STYLES
   Mick Appleby Racing — header.css
   ========================================================= */

/* ── Top contact bar ─────────────────────────────────────── */
.nav-contact-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  height: 34px;
  background: rgba(10,10,10,0.95);
  border-bottom: 1px solid rgba(204,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  padding: 0 clamp(20px, 4vw, 60px);
}
.nav-contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.65);
  font-family: var(--condensed);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-contact-item:hover { color: var(--red); }
.nav-contact-item svg { flex-shrink: 0; opacity: 0.7; }

/* ── Top bar social icons ─────────────────────────────────── */
.nav-social-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 10px;
  padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,0.15);
}
.nav-social-link {
  --brand: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.nav-social-link svg { display: block; width: 14px; height: 14px; }
.nav-social-link:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 50%, transparent);
}
.nav-social-link--instagram:hover {
  background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 70%, #285AEB 100%);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(214,36,159,0.5);
  color: #fff;
}

@media (max-width: 600px) {
  .nav-contact-bar { display: none; }
}

/* ── Nav bar ─────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 34px;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 60px);
  transition: background 0.5s, backdrop-filter 0.5s, box-shadow 0.4s;
}

#navbar.scrolled {
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(204, 0, 0, 0.3);
}

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

.nav-logo-wrap img,
.nav-logo-wrap .custom-logo {
  height: 54px;
  width: auto;
  display: block;
  transition: transform 0.3s;
}
.nav-logo-wrap:hover img,
.nav-logo-wrap:hover .custom-logo { transform: scale(1.03); }

.nav-site-name {
  font-family: var(--condensed);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}

/* ── Nav links ───────────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 34px);
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}

.nav-links li { list-style: none; }

.nav-links a {
  font-family: var(--condensed);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--red);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links .current-menu-item > a {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after,
.nav-links .current-menu-item > a::after { width: 100%; }

/* ── CTA button (Join the Club) ──────────────────────────── */
.nav-links .nav-cta,
a.nav-cta {
  font-family: var(--condensed) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  letter-spacing: 0.18em !important;
  color: var(--white) !important;
  background: var(--red);
  padding: 10px 20px;
  text-decoration: none;
  transition: background 0.3s !important;
  white-space: nowrap;
}

.nav-links .nav-cta::after,
a.nav-cta::after { display: none !important; }

.nav-links .nav-cta:hover,
a.nav-cta:hover { background: var(--red-bright) !important; color: var(--white) !important; }

/* ── Burger button ───────────────────────────────────────── */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  background: none;
  border: none;
  padding: 4px;
}

.nav-burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}

.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile overlay menu ─────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-family: var(--condensed);
  font-size: clamp(28px, 6vw, 52px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s;
}

.mobile-menu a:hover,
.mobile-menu a.active { color: var(--red); }

.mobile-menu a.mobile-cta { color: var(--red); }

.mobile-close {
  position: absolute;
  top: 28px;
  right: clamp(20px, 4vw, 60px);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-close span {
  display: block;
  width: 30px;
  height: 2px;
  background: var(--white);
}

.mobile-close span:nth-child(1) { transform: rotate(45deg) translate(1px, 1px); }
.mobile-close span:nth-child(2) { transform: rotate(-45deg) translate(1px, -1px); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links    { display: none; }
  .nav-burger   { display: flex; }
  .mobile-menu  { display: flex; }
}
