/* ─────────────────────────────────────────────
   HMNC Megamenu Tabs
   ───────────────────────────────────────────── */

:root {
  --mm-accent:        #0070c9;
  --mm-accent-light:  #e8f3fb;
  --mm-text:          #374151;
  --mm-text-muted:    #6b7280;
  --mm-text-dim:      #9aa4b0;
  --mm-border:        #e8ecef;
  --mm-bg:            #ffffff;
  --mm-nav-bg:        #f8f9fa;
  --mm-nav-width:     260px;
  --mm-radius:        10px;
}

/* ── Wrapper ── */
.hmnc-mm {
  font-family: inherit;
  font-size: 13.5px;
  color: var(--mm-text);
  background: var(--mm-bg);
  border-radius: var(--mm-radius);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 0 0 1px var(--mm-border);
  min-width: 1024px;
  position: relative;
  box-shadow: 0px 6px 16px 0px rgba(0, 64, 128, 0.09);
}

/* ── Mobile tab pills (hidden on desktop) ── */
.hmnc-mm__mobile-tabs {
  display: none;
  border-bottom: 1px solid var(--mm-border);
  background: var(--mm-bg);
  position: relative;
}

/* Right-side fade hint */
.hmnc-mm__mobile-tabs::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 48px;
  background: linear-gradient(to right, transparent, var(--mm-bg));
  pointer-events: none;
  opacity: 1;
  transition: opacity .2s;
  border-radius: 0;
}

/* Hide fade when scrolled all the way right */
.hmnc-mm__mobile-tabs.is-scrolled-end::after {
  opacity: 0;
}

.hmnc-mm__mobile-tabs-scroll {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hmnc-mm__mobile-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.hmnc-mm__mobile-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  border: 1px solid var(--mm-border);
  border-radius: 100px;
  background: var(--mm-bg);
  color: var(--mm-text-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.hmnc-mm__mobile-pill:active {
  transform: scale(.96);
}

.hmnc-mm__mobile-pill.is-active {
  background: var(--mm-accent);
  color: #fff;
  border-color: var(--mm-accent);
}

/* ── Body (flex row on desktop) ── */
.hmnc-mm__body {
  display: flex;
  min-height: 300px;
  overflow: hidden;
  border-radius: var(--mm-radius);
}

/* ── LEFT: nav (desktop only) ── */
.hmnc-mm__nav {
  width: var(--mm-nav-width);
  flex-shrink: 0;
  background: var(--mm-nav-bg);
  border-right: 1px solid var(--mm-border);
  padding: 12px 0;
  overflow-y: auto;
}

.hmnc-mm__nav-group-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mm-text-dim);
  padding: 8px 20px 5px;
}

.hmnc-mm__nav-divider {
  height: 1px;
  background: var(--mm-border);
  margin: 10px 18px;
}

.hmnc-mm__nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 18px;
  text-decoration: none;
  color: var(--mm-text);
  font-size: 13px;
  /* font-weight: 500; */
  border-left: 3px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
  cursor: pointer;
}

button.hmnc-mm__nav-item {
  width: 100%;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

.hmnc-mm__nav-item:hover {
  background: #fff;
  color: var(--mm-accent);
  border-left-color: var(--mm-accent);
}

.hmnc-mm__nav-item.is-active {
  background: var(--mm-accent-light);
  color: var(--mm-accent);
  border-left-color: var(--mm-accent);
}

.hmnc-mm__nav-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hmnc-mm__nav-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.hmnc-mm__nav-icon svg {
  width: 20px;
  height: 20px;
  color: var(--mm-text-muted);
}

.hmnc-mm__nav-item.is-active .hmnc-mm__nav-icon svg,
.hmnc-mm__nav-item:hover .hmnc-mm__nav-icon svg {
  color: var(--mm-accent);
}

.hmnc-mm__nav-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hmnc-mm__nav-arrow {
  width: 14px;
  height: 14px;
  color: var(--mm-border);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .12s;
}

.hmnc-mm__nav-item:hover .hmnc-mm__nav-arrow,
.hmnc-mm__nav-item.is-active .hmnc-mm__nav-arrow {
  opacity: 1;
  color: var(--mm-accent);
}

/* ── RIGHT: panels ── */
.hmnc-mm__panels {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.hmnc-mm__panel {
  display: none;
  padding: 20px 24px;
  height: 100%;
  overflow-y: auto;
}

.hmnc-mm__panel.is-active {
  display: block;
}

/* ── Panel header (label + optional CTA) ── */
.hmnc-mm__panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--mm-border);
}

/* ── Panel label ── */
a.hmnc-mm__panel-label,
.hmnc-mm__panel-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--mm-text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .12s;
}

a.hmnc-mm__panel-label:hover {
  color: var(--mm-accent);
}

.hmnc-mm__panel-label svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .12s;
}

a.hmnc-mm__panel-label:hover svg {
  opacity: 1;
}

/* ── Panel CTA ── */
.hmnc-mm__panel-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.hmnc-mm__panel-cta-crumb {
  font-size: 10.5px;
  color: var(--mm-text-dim);
  font-weight: 500;
  letter-spacing: .03em;
}

.hmnc-mm__panel-cta-crumb-link {
  color: var(--mm-text-dim);
  text-decoration: none;
  transition: color .12s;
}

.hmnc-mm__panel-cta-crumb-link:hover {
  color: var(--mm-accent);
}

.hmnc-mm__panel-cta-sep {
  color: var(--mm-border);
}

.hmnc-mm__panel-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: var(--mm-accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background .14s;
  white-space: nowrap;
}

.hmnc-mm__panel-cta-btn:hover {
  background: #005fa3;
}

/* ── Demo badge ── */
.hmnc-mm--demo {
  position: relative;
}

.hmnc-mm__demo-badge {
  font-size: 11px;
  color: var(--mm-text-dim);
  text-align: center;
  padding: 6px 12px;
  border-top: 1px solid var(--mm-border);
  background: var(--mm-nav-bg);
}

/* ── Feature columns ── */
.hmnc-mm__cols {
  display: grid;
  grid-template-columns: repeat(var(--mm-col-count, 3), 1fr);
  gap: 0 24px;
}

/* Column heading — div wrapper, toggle button for mobile */
.hmnc-mm__col-heading {
  font-size: 12.5px;
  font-weight: 700;
  color: #111827;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1.5px solid var(--mm-border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hmnc-mm__col-heading-text {
  flex: 1;
  min-width: 0;
}

.hmnc-mm__col-heading-link {
  flex: 1;
  min-width: 0;
  color: #111827;
  text-decoration: none;
  transition: color .12s;
}

.hmnc-mm__col-heading-link:hover {
  color: var(--mm-accent);
}

.hmnc-mm__col-heading-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  opacity: 0;
  margin-left: 4px;
  vertical-align: middle;
  transition: opacity .12s;
}

.hmnc-mm__col-heading-link:hover .hmnc-mm__col-heading-icon {
  opacity: 1;
}

.hmnc-mm__col-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}

.hmnc-mm__col-badge {
  font-size: 11px;
  color: var(--mm-ai-icon);
}

/* Chevron inside heading — hidden on desktop */
.hmnc-mm__col-chevron {
  display: none;
  width: 16px;
  height: 16px;
  color: var(--mm-text-dim);
  margin-left: auto;
  flex-shrink: 0;
  transition: transform .2s ease;
}

/* Links wrapper — always visible on desktop */
.hmnc-mm__col-links {
  padding-left: 1em;
  /* nothing needed on desktop */
}

.hmnc-mm__feat-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  color: var(--mm-text-muted);
  font-size: 12.5px;
  text-decoration: none;
  transition: color .12s;
}

.hmnc-mm__feat-link:hover {
  color: var(--mm-accent);
}

.hmnc-mm__feat-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.hmnc-mm__feat-icon svg {
  width: 15px;
  height: 15px;
}

/* Arrow on feat-link — hidden on desktop, shown on mobile */
.hmnc-mm__feat-arrow {
  display: none;
  width: 14px;
  height: 14px;
  color: var(--mm-border);
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Sub-tab links (panel bottom section) ── */
.hmnc-mm__sub-tabs {
  margin-top: 20px;
  /* padding-top: 18px; */
  border-top: 1.5px solid var(--mm-border);
}

.hmnc-mm__sub-tab-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  text-decoration: none;
  border-bottom: 1.5px solid var(--mm-border);
  transition: color .12s, border-color .12s;
}

.hmnc-mm__sub-tab-link:last-child {
  border-bottom: none;
}

.hmnc-mm__sub-tab-link:hover {
  color: var(--mm-accent);
  border-bottom-color: var(--mm-accent);
}

.hmnc-mm__sub-tab-arrow {
  width: 14px;
  height: 14px;
  color: var(--mm-border);
  flex-shrink: 0;
  opacity: 0;
  margin-left: 6px;
  transition: opacity .12s, color .12s;
}

.hmnc-mm__sub-tab-link:hover .hmnc-mm__sub-tab-arrow {
  opacity: 1;
  color: var(--mm-accent);
}

/* ─────────────────────────────────────────────
   Responsive — Full-width breakout at ≤1280px
   ───────────────────────────────────────────── */

@media (max-width: 1280px) {
  [class*=animated-submenu][data-submenu] {
    position: initial;
  }

  .hmnc-mm {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    border-radius: 0;
  }

  .hmnc-mm__body {
    border-radius: 0;
  }

  .hmnc-mm,
  .hmnc-mm ~ *,
  .wp-block-acf-hmnc-megamenu-tabs {
    overflow: visible !important;
  }

  :root { --mm-nav-width: 220px; }
}

/* Tablet — compact nav */
@media (max-width: 1024px) {
  :root { --mm-nav-width: 200px; }
}

/* ─────────────────────────────────────────────
   Mobile — ≤1000px
   ───────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hmnc-mm {
    position: static;
    transform: none;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .hmnc-mm__body {
    border-radius: 0;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
  }

  /* Show mobile pills */
  .hmnc-mm__mobile-tabs {
    display: block;
  }

  /* Hide desktop nav */
  .hmnc-mm__nav {
    display: none;
  }

  /* Panel */
  .hmnc-mm__panel {
    padding: 0;
    height: auto;
    overflow: visible;
  }

  /* Panel header becomes a header bar on mobile */
  .hmnc-mm__panel-header {
    margin-bottom: 0;
    padding: 0;
    border-bottom: none;
    background: var(--mm-accent-light);
    border-bottom: 1px solid var(--mm-border);
  }

  .hmnc-mm__panel-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--mm-accent);
    letter-spacing: 0;
    text-transform: none;
    padding: 14px 16px;
    border-bottom: none;
  }

  .hmnc-mm__panel-label svg {
    width: 14px;
    height: 14px;
    opacity: .5;
    flex-shrink: 0;
  }

  .hmnc-mm__panel-cta {
    display: none;
  }

  /* Columns stack vertically */
  .hmnc-mm__cols {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Column — accordion item */
  .hmnc-mm__col {
    border-bottom: 1px solid var(--mm-border);
  }

  .hmnc-mm__col:last-child {
    border-bottom: none;
  }

  /* Column heading — mobile layout */
  .hmnc-mm__col-heading {
    padding: 14px 16px;
    margin-bottom: 0;
    border-bottom: none;
    font-size: 13.5px;
    font-weight: 600;
    color: #111827;
  }

  .hmnc-mm__col-heading-link {
    font-size: 13.5px;
    font-weight: 600;
    color: #111827;
    -webkit-tap-highlight-color: transparent;
  }

  /* Show toggle button and chevron on mobile */
  .hmnc-mm__col-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
  }

  .hmnc-mm__col-chevron {
    display: block;
  }

  /* Accordion closed state */
  .hmnc-mm__col:not([data-open]) .hmnc-mm__col-links {
    display: none;
  }
d
  /* Accordion open — rotate chevron */
  .hmnc-mm__col[data-open] .hmnc-mm__col-chevron {
    transform: rotate(180deg);
  }

  .hmnc-mm__col[data-open] > .hmnc-mm__col-heading {
    padding-bottom: 6px;
  }

  /* Links inside accordion */
  .hmnc-mm__col-links {
    padding: 0 16px 6px;
  }

  /* Feature link — bigger touch targets */
  .hmnc-mm__feat-link {
    padding: 11px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    font-size: 14px !important;
    color: var(--mm-text);
    transition: background .12s;
    -webkit-tap-highlight-color: transparent;
  }

  .hmnc-mm__feat-link:active {
    background: var(--mm-nav-bg);
  }

  /* Show arrow on mobile */
  .hmnc-mm__feat-arrow {
    display: block;
  }

  .hmnc-mm__feat-icon svg {
    width: 17px;
    height: 17px;
  }

}

/* ── Extra small ── */
@media (max-width: 400px) {
  .hmnc-mm__mobile-pill {
    padding: 7px 12px;
    font-size: 12px;
  }
}
