/* ==========================================================================
   WebDesignUSA — Mega Menu
   Save to: /assets/css/mega-menu.css in your theme folder
   ========================================================================== */

/* ── TOKENS ─────────────────────────────────────────────────────────────── */
:root {
  --wm-blue:         #2196f3;
  --wm-blue-dark:    #1565c0;
  --wm-blue-bg:      rgba(33,150,243,.08);
  --wm-blue-border:  rgba(33,150,243,.35);
  --wm-red:          #e53935;
  --wm-bg:           #0a0a0f;
  --wm-card:         #111118;
  --wm-border:       rgba(255,255,255,.08);
  --wm-text:         #f0f0f5;
  --wm-muted:        #8a8a9a;
  --wm-topbar-h:     36px;
  --wm-nav-h:        44px;
  --wm-radius:       10px;
  --wm-radius-lg:    16px;
  --wm-shadow:       0 24px 64px rgba(0,0,0,.55);
  --wm-ease:         .18s ease;
}


/* ── RESET ──────────────────────────────────────────────────────────────── */
.wdusa-topbar *, .wdusa-navbar * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.wdusa-topbar, .wdusa-navbar {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}


/* ════════════════════════════════════════════════════════════════════════
   TOP BAR
   ════════════════════════════════════════════════════════════════════════ */
.wdusa-topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--wm-topbar-h);
  background: var(--wm-red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wdusa-topbar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

.wdusa-topbar__phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.wdusa-topbar__phone:hover { text-decoration: underline; }

.wdusa-topbar__sep   { opacity: .5; }
.wdusa-topbar__hours { opacity: .85; }

.wdusa-topbar__consult {
  color: rgba(255,255,255,.85);
  text-decoration: none;
}
.wdusa-topbar__consult:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .wdusa-topbar__hours,
  .wdusa-topbar__consult,
  .wdusa-topbar__sep:not(:first-of-type) { display: none; }
}


/* ════════════════════════════════════════════════════════════════════════
   NAVBAR SHELL
   ════════════════════════════════════════════════════════════════════════ */
.wdusa-navbar {
  position: fixed;
  top: var(--wm-topbar-h);
  left: 0; right: 0;
  z-index: 900;
  height: var(--wm-nav-h);
  background: transparent;
  transition: background var(--wm-ease),
              backdrop-filter var(--wm-ease),
              border-color var(--wm-ease);
  border-bottom: 1px solid transparent;
}

.wdusa-navbar.is-scrolled {
  background: rgba(10,10,15,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--wm-border);
}

/* Push page content below the fixed bar */
.wdusa-spacer {
      height: 77px;
}

.wdusa-navbar__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}


/* ── LOGO ────────────────────────────────────────────────────────────────── */
.wdusa-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.wdusa-logo img {
  width: 40px; height: 40px;
  object-fit: contain;
  transition: transform var(--wm-ease);
  filter: drop-shadow(0 0 8px rgba(33,150,255,.4));
}
.wdusa-logo:hover img { transform: scale(1.07); }

.wdusa-logo__text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--wm-text);
  line-height: 1;
}

.wdusa-logo__accent {
  background: linear-gradient(90deg, #2196f3, #e53935);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* ════════════════════════════════════════════════════════════════════════
   DESKTOP NAV
   ════════════════════════════════════════════════════════════════════════ */
.wdusa-nav { display: none; }

@media (min-width: 1024px) {
  .wdusa-nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
  }
}

.wdusa-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Base link / button */
.wdusa-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  border-radius: var(--wm-radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--wm-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  transition: color var(--wm-ease), background var(--wm-ease);
}

.wdusa-nav__link:hover,
.wdusa-nav__item.is-active > .wdusa-nav__link {
  color: var(--wm-text);
}

/* Trigger open state */
.wdusa-nav__mega-trigger[aria-expanded="true"] {
  color: var(--wm-blue);
}

/* Chevron */
.wdusa-chevron {
  flex-shrink: 0;
  transition: transform var(--wm-ease);
  pointer-events: none;
}
.wdusa-nav__mega-trigger[aria-expanded="true"] .wdusa-chevron {
  transform: rotate(180deg);
}

/* Sale link */
.wdusa-nav__link--sale:hover { color: var(--wm-red) !important; }

/* Red badge */
.wdusa-badge {
  display: inline-block;
  background: var(--wm-red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .02em;
  line-height: 1.5;
  margin-left: 2px;
}


/* ════════════════════════════════════════════════════════════════════════
   MEGA PANEL
   ════════════════════════════════════════════════════════════════════════ */
.wdusa-nav__item--mega { position: static; }

.wdusa-mega {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(980px, calc(100vw - 32px));
  background: var(--wm-card);
  border: 1px solid var(--wm-border);
  border-radius: var(--wm-radius-lg);
  box-shadow: var(--wm-shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--wm-ease),
              transform var(--wm-ease),
              visibility 0s linear var(--wm-ease);
  pointer-events: none;
  z-index: 800;
}

/* Caret tip */
.wdusa-mega::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 13px; height: 13px;
  background: var(--wm-card);
  border-top: 1px solid var(--wm-border);
  border-left: 1px solid var(--wm-border);
}

/* Visible state — toggled by JS */
.wdusa-mega.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity var(--wm-ease),
              transform var(--wm-ease),
              visibility 0s linear 0s;
  pointer-events: auto;
}

/* Grid layout */
.wdusa-mega__grid {
  display: grid;
  grid-template-columns: 1fr 224px;
  grid-template-rows: auto auto;
}

.wdusa-mega__col { padding: 22px 24px; }

.wdusa-mega__col--services { border-right: 1px solid var(--wm-border); }

.wdusa-mega__heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--wm-muted);
  margin-bottom: 12px;
}

/* ── Services 2-col grid ── */
.wdusa-mega__services {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.wdusa-mega__svc {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--wm-radius);
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--wm-text);
  transition: background var(--wm-ease), border-color var(--wm-ease);
}
.wdusa-mega__svc:hover {
  background: var(--wm-blue-bg);
  border-color: var(--wm-blue-border);
}

.wdusa-mega__svc-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(33,150,243,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wm-blue);
  transition: background var(--wm-ease);
}
.wdusa-mega__svc:hover .wdusa-mega__svc-icon {
  background: rgba(33,150,243,.2);
}

.wdusa-mega__svc-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wdusa-mega__svc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--wm-text);
  line-height: 1.3;
}

.wdusa-mega__svc-desc {
  font-size: 12px;
  color: var(--wm-muted);
  line-height: 1.4;
}

/* ── Cities column ── */
.wdusa-mega__col--cities { padding: 22px 18px; }

.wdusa-mega__cities { list-style: none; display: flex; flex-direction: column; gap: 1px; }

.wdusa-mega__city {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--wm-muted);
  text-decoration: none;
  transition: color var(--wm-ease), background var(--wm-ease);
}
.wdusa-mega__city svg { flex-shrink: 0; color: var(--wm-blue); opacity: .6; }
.wdusa-mega__city:hover { color: var(--wm-text); background: var(--wm-blue-bg); }
.wdusa-mega__city:hover svg { opacity: 1; }

/* ── Footer strip ── */
.wdusa-mega__footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 13px 24px;
  border-top: 1px solid var(--wm-border);
  background: rgba(255,255,255,.015);
  border-radius: 0 0 var(--wm-radius-lg) var(--wm-radius-lg);
}

.wdusa-mega__footer-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--wm-blue);
  text-decoration: none;
  transition: gap var(--wm-ease);
}
.wdusa-mega__footer-link:hover { gap: 9px; }


/* ════════════════════════════════════════════════════════════════════════
   DESKTOP CTAs
   ════════════════════════════════════════════════════════════════════════ */
.wdusa-ctas {
  display: none;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
@media (min-width: 1024px) {
  .wdusa-ctas { display: flex; }
}

/* Buttons */
.wdusa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  height: 36px;
  border-radius: var(--wm-radius);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--wm-ease), border-color var(--wm-ease), box-shadow var(--wm-ease);
}

.wdusa-btn--outline {
  background: transparent;
  color: var(--wm-text);
  border: 1px solid rgba(33,150,243,.4);
}
.wdusa-btn--outline:hover {
  border-color: var(--wm-blue);
  background: var(--wm-blue-bg);
  color: var(--wm-text);
}

.wdusa-btn--primary {
  background: var(--wm-blue);
  color: #fff;
}
.wdusa-btn--primary:hover {
  background: var(--wm-blue-dark);
  box-shadow: 0 4px 16px rgba(33,150,243,.35);
}

.wdusa-btn--block {
  width: 100%;
  justify-content: center;
  height: 42px;
  font-size: 14px;
}


/* ════════════════════════════════════════════════════════════════════════
   HAMBURGER
   ════════════════════════════════════════════════════════════════════════ */
.wdusa-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 7px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--wm-radius);
  transition: background var(--wm-ease);
}
.wdusa-hamburger:hover { background: rgba(255,255,255,.07); }
@media (min-width: 1024px) { .wdusa-hamburger { display: none; } }

.wdusa-hamburger__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--wm-text);
  border-radius: 2px;
  transform-origin: center;
  transition: transform .25s ease, opacity .2s ease;
}

.wdusa-hamburger.is-open .wdusa-hamburger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.wdusa-hamburger.is-open .wdusa-hamburger__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.wdusa-hamburger.is-open .wdusa-hamburger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ════════════════════════════════════════════════════════════════════════
   MOBILE MENU
   ════════════════════════════════════════════════════════════════════════ */
.wdusa-mobile {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--wm-card);
  border-bottom: 1px solid var(--wm-border);
  box-shadow: var(--wm-shadow);
  padding: 14px;
  max-height: calc(100dvh - var(--wm-topbar-h) - var(--wm-nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
  flex-direction: column;
  gap: 3px;
}
.wdusa-mobile.is-open { display: flex; }

@media (min-width: 1024px) {
  .wdusa-mobile,
  .wdusa-mobile.is-open { display: none !important; }
}

/* Phone row */
.wdusa-mobile__phone {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--wm-radius);
  background: rgba(229,57,53,.1);
  color: #ef5350;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 4px;
}

/* Mobile links */
.wdusa-mobile__link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--wm-radius);
  font-size: 15px;
  font-weight: 500;
  color: var(--wm-muted);
  text-decoration: none;
  transition: color var(--wm-ease), background var(--wm-ease);
}
.wdusa-mobile__link:hover,
.wdusa-mobile__link.is-active { color: var(--wm-text); background: rgba(255,255,255,.04); }
.wdusa-mobile__link--sale:hover { color: var(--wm-red); background: rgba(229,57,53,.06); }

/* Mobile CTA group */
.wdusa-mobile__ctas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid var(--wm-border);
}


/* ── ACCORDION (mobile services) ──────────────────────────────────────── */
.wdusa-accordion { border-radius: var(--wm-radius); }

.wdusa-accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--wm-muted);
  font-family: inherit;
  border-radius: var(--wm-radius);
  transition: color var(--wm-ease), background var(--wm-ease);
  text-align: left;
}
.wdusa-accordion__trigger:hover { color: var(--wm-text); background: rgba(255,255,255,.04); }
.wdusa-accordion__trigger[aria-expanded="true"] { color: var(--wm-blue); }
.wdusa-accordion__trigger[aria-expanded="true"] .wdusa-chevron { transform: rotate(180deg); }

.wdusa-accordion__panel {
  padding: 8px 0 8px 14px;
  margin-left: 12px;
  border-left: 2px solid rgba(33,150,243,.2);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.wdusa-accordion__group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--wm-muted);
  padding: 4px 6px;
}

.wdusa-accordion__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--wm-muted);
  text-decoration: none;
  transition: color var(--wm-ease), background var(--wm-ease);
}
.wdusa-accordion__link:hover { color: var(--wm-text); background: var(--wm-blue-bg); }
.wdusa-accordion__link--city { font-size: 12px; }

.wdusa-accordion__icon { color: var(--wm-blue); flex-shrink: 0; display: flex; }

.wdusa-accordion__view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--wm-blue);
  text-decoration: none;
  transition: gap var(--wm-ease);
}
.wdusa-accordion__view-all:hover { gap: 8px; }


/* ════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY — focus rings
   ════════════════════════════════════════════════════════════════════════ */
.wdusa-nav__link:focus-visible,
.wdusa-btn:focus-visible,
.wdusa-hamburger:focus-visible,
.wdusa-mega__svc:focus-visible,
.wdusa-mega__city:focus-visible,
.wdusa-mega__footer-link:focus-visible,
.wdusa-mobile__link:focus-visible,
.wdusa-accordion__link:focus-visible,
.wdusa-accordion__trigger:focus-visible {
  outline: 2px solid var(--wm-blue);
  outline-offset: 2px;
}
