/*
 * es-overrides.css
 * Small overrides for es.bmoutdoor.com
 * The main BM Design System is loaded from bmoutdoor.com/css/bm-design-system.css
 */

/* Ensure nav-mega has display:none by default and shows when .open */
.nav-mega {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 320px;
  background: var(--navy2);
  border: 1px solid var(--rule2);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  z-index: 500;
}
.nav-mega.open {
  display: block;
}

/* Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 800;
  display: none;
}
.nav-overlay[aria-hidden="false"] {
  display: block;
}

/* Hero h1 fix — prevent double .es-hero h1 conflict */
.es-hero h1 {
  font-family: var(--cond);
  font-weight: 900;
  line-height: .95;
  text-transform: uppercase;
  color: #fff;
}

/* btn-ghost on dark bg */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: 1.5px solid rgba(240,237,232,.25);
  border-radius: 6px;
  font-family: var(--cond);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--warm);
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover {
  border-color: var(--bm);
  color: var(--bm);
}

/* Ensure body.bm-light works for light sections */
.es-section-light {
  background: var(--light);
  color: var(--dark-txt);
}
.es-section-light .es-h2 {
  color: var(--ink);
}

/* Mobile nav burger button */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 8px;
}
@media (max-width: 900px) {
  .nav-burger { display: flex; }
  .nav-links   { display: none; }
  .nav-has-mega { display: none; }
  .nav-cta      { display: none; }
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--warm);
  border-radius: 2px;
  transition: all .25s;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mega grid */
.mega-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 12px 0;
}
.mega-state {
  text-align: center;
  padding: 6px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-family: var(--cond);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(240,237,232,.6);
  transition: all .15s;
}
.mega-state:hover {
  background: var(--bm-dim);
  border-color: rgba(60,180,229,.3);
  color: var(--bm);
}
.mega-header {
  font-family: var(--cond);
  font-size: .68rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.mega-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.mega-footer-note { font-size: .72rem; color: var(--muted); }
.mega-footer-cta  { font-family: var(--cond); font-size: .75rem; font-weight: 700; color: var(--bm); display: flex; align-items: center; gap: 4px; }

/* ═══════════════════════════════════════════════════════════════
   Visual improvements 2026-05-25
   Images, cards, hero, responsiveness
   ════════════════════════════════════════════════════════════════ */

/* ── Image loading fade-in ── */
img[loading="lazy"] {
  transition: opacity .3s ease;
}

/* ── Medium cards with images (home.php grid) ── */
.es-mediums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.es-medium-card {
  background: rgba(240,237,232,.04);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  transition: all .25s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.es-medium-card:hover {
  border-color: rgba(60,180,229,.35);
  background: var(--bm-dim);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.es-mc-img-wrap {
  width: 100%;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
}
.es-mc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s, filter .4s;
  filter: brightness(.8) saturate(.85);
  display: block;
}
.es-medium-card:hover .es-mc-img {
  transform: scale(1.04);
  filter: brightness(.95) saturate(1);
}
.es-mc-name {
  font-family: var(--cond);
  font-weight: 900;
  font-size: 1rem;
  color: var(--bm);
  margin: 16px 18px 4px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.es-mc-desc {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 18px 8px;
  flex: 1;
}
.es-mc-price {
  font-family: var(--cond);
  font-size: .68rem;
  letter-spacing: .08em;
  color: rgba(240,237,232,.3);
  margin: 0 18px 14px;
}

/* ── OOH Grid cards (medios-ooh.php) ── */
.ooh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.ooh-card {
  background: rgba(240,237,232,.03);
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  transition: all .25s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.ooh-card:hover {
  border-color: rgba(60,180,229,.4);
  transform: translateY(-3px);
  box-shadow: 0 16px 50px rgba(0,0,0,.3);
}
.ooh-card-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.ooh-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s, filter .4s;
  filter: brightness(.75) saturate(.8);
  display: block;
}
.ooh-card:hover .ooh-card-img {
  transform: scale(1.05);
  filter: brightness(.9) saturate(1);
}
.ooh-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* ── Hero improvements ── */
.es-home-hero-video {
  will-change: transform;
}

/* ── Benefit blocks with icons ── */
.es-feat-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background: var(--bm-dim);
  border: 1px solid rgba(60,180,229,.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bm);
}

/* ── CTA buttons more solid ── */
.btn-primary {
  background: var(--bm);
  color: var(--navy);
  padding: 14px 28px;
  border-radius: 6px;
  font-family: var(--cond);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 4px 20px rgba(60,180,229,.3);
}

/* ── Info cards (medio-ooh.php sidebar) ── */
.info-card {
  background: rgba(240,237,232,.04);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 22px 24px;
  transition: border-color .2s;
}
.info-card:hover {
  border-color: rgba(60,180,229,.2);
}

/* ── Responsive tweaks ── */
@media (max-width: 640px) {
  .es-mediums-grid {
    grid-template-columns: 1fr 1fr;
  }
  .es-mc-img-wrap {
    height: 120px;
  }
  .ooh-grid {
    grid-template-columns: 1fr;
  }
  .es-home-hero-inner {
    padding: 48px 20px !important;
  }
}
@media (max-width: 400px) {
  .es-mediums-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE NAV — Full redesign 2026-05-25
   ═══════════════════════════════════════════════════════════════════ */

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(60,180,229,.08) !important;
  border: 1px solid rgba(60,180,229,.22) !important;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  margin-left: 12px;
  transition: background .2s, border-color .2s;
  flex-shrink: 0;
}
.nav-burger:hover {
  background: rgba(60,180,229,.15) !important;
  border-color: rgba(60,180,229,.45) !important;
}
.nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #3cb4e5 !important;
  border-radius: 2px;
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .2s;
  transform-origin: center;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-burger   { display: flex; }
  .nav-links    { display: none !important; }
  .nav-has-mega { display: none !important; }
  .nav-cta      { display: none !important; }
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,9,20,.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s cubic-bezier(.4,0,.2,1);
}
.nav-overlay.is-open { opacity: 1; pointer-events: auto; }

.nav-mobile {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(360px, 92vw);
  background: #0d1525;
  border-left: 1px solid rgba(60,180,229,.12);
  z-index: 950;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .38s cubic-bezier(.4,0,.2,1);
  will-change: transform;
  overflow: hidden;
}
.nav-mobile.is-open { transform: translateX(0); }

.nm-head {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,.08);
  flex-shrink: 0;
}
.nm-logo img { height: 32px; width: auto; display: block; }
.nm-close {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 50%;
  color: rgba(10,15,30,.5);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.nm-close:hover { background: rgba(60,180,229,.12); border-color: rgba(60,180,229,.3); color: #3cb4e5; }

.nm-body {
  position: relative; z-index: 1;
  flex: 1; overflow-y: auto;
  padding: 8px 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.nm-body::-webkit-scrollbar { width: 3px; }
.nm-body::-webkit-scrollbar-thumb { background: rgba(60,180,229,.2); border-radius: 2px; }

.nm-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px;
  font-family: var(--cond, sans-serif);
  font-weight: 700; font-size: 1rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(240,237,232,.72);
  transition: color .2s, background .2s;
  border-left: 2px solid transparent;
}
.nm-link svg { opacity: .45; flex-shrink: 0; transition: opacity .2s; }
.nm-link:hover { color: #f0ede8; background: rgba(60,180,229,.06); border-left-color: #3cb4e5; }
.nm-link:hover svg { opacity: .9; }

.nm-rule { height: 1px; background: rgba(255,255,255,.06); margin: 8px 24px; }

.nm-group-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 14px 24px;
  background: none; border: none;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.nm-group-toggle:hover { background: rgba(60,180,229,.06); border-left-color: rgba(60,180,229,.4); }
.nm-group-toggle[aria-expanded="true"] { background: rgba(60,180,229,.08); border-left-color: #3cb4e5; }
.nm-group-label {
  font-family: var(--cond, sans-serif);
  font-weight: 700; font-size: 1rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(240,237,232,.85);
}
.nm-group-toggle[aria-expanded="true"] .nm-group-label { color: #f0ede8; }
.nm-chevron {
  color: rgba(240,237,232,.4);
  transition: transform .25s cubic-bezier(.4,0,.2,1), color .2s;
  flex-shrink: 0;
}
.nm-group-toggle[aria-expanded="true"] .nm-chevron { transform: rotate(180deg); color: #3cb4e5; }

.nm-submenu {
  display: none; list-style: none; margin: 0; padding: 4px 0 12px;
  background: rgba(0,0,0,.18);
  border-top: 1px solid rgba(255,255,255,.04);
}
.nm-submenu.is-open { display: block; }
.nm-submenu li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 24px 10px 34px;
  font-size: .875rem;
  color: rgba(240,237,232,.55);
  transition: color .15s, padding-left .15s;
}
.nm-submenu li a:hover { color: #3cb4e5; padding-left: 40px; }
.nm-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(60,180,229,.45); flex-shrink: 0;
  transition: background .15s;
}
.nm-submenu li a:hover .nm-dot { background: #3cb4e5; }
.nm-submenu-all a {
  color: rgba(60,180,229,.7) !important;
  font-size: .8rem !important;
  margin-top: 4px; padding-top: 12px !important;
  border-top: 1px solid rgba(255,255,255,.05);
}
.nm-submenu-all a:hover { color: #3cb4e5 !important; }

.nm-foot {
  position: relative; z-index: 1;
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,.07);
  background: rgba(0,0,0,.2);
  flex-shrink: 0;
}

.nm-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px 24px;
  background: #3cb4e5; color: #0a0f1e;
  font-family: var(--cond, sans-serif);
  font-weight: 800; font-size: .9rem;
  letter-spacing: .12em; text-transform: uppercase;
  border-radius: 8px;
  transition: background .2s, box-shadow .2s, transform .15s;
  margin-bottom: 16px;
}
.nm-cta:hover { background: #5ac6f0; box-shadow: 0 4px 24px rgba(60,180,229,.35); transform: translateY(-1px); }
.nm-cta svg { transition: transform .2s; }
.nm-cta:hover svg { transform: translateX(3px); }

.nm-markets { display: flex; flex-wrap: wrap; gap: 6px; }
.nm-market {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  font-size: .72rem;
  color: rgba(240,237,232,.45);
  transition: background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.nm-market--active { background: rgba(60,180,229,.1); border-color: rgba(60,180,229,.25); color: rgba(60,180,229,.9); }
a.nm-market:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: rgba(240,237,232,.8); }
