/*
 * "Shop All" mega menu.
 *
 * The markup is an Elementor saved template (Templates > Saved Templates > "Mega Menu - Shop All"),
 * so every selector here hangs off the reusable CSS classes set on those containers/widgets rather
 * than off Elementor's generated element ids — editing the template in Elementor never breaks this
 * file, and duplicating a card keeps its styling.
 *
 * Two Elementor quirks are handled up front, once, in the reset block:
 *  - every Container ships a default 10px padding and a 20px flex gap;
 *  - every Container defaults to flex-direction:column even where a row is wanted;
 *  - widgets render one wrapper div deeper than the mockup markup, so heading/image/icon rules
 *    have to reach *through* `.elementor-heading-title`, `img`, `svg` instead of styling the
 *    class directly.
 */

/* ---------- trigger + dropdown shell ---------- */

/*
 * `.fp-menu > li` is position:relative so ordinary submenus can hang off their own item. The mega
 * item must be the exception — left relative, the panel below resolves against the 261px-wide <li>
 * instead of the header and renders as a narrow column. The `.fp-menu > li` prefix is what makes
 * this win that rule; a bare `.fp-mega-wrap` loses to it on specificity.
 */
.fp-menu > li.fp-mega-wrap,
.fp-mega-wrap {
  position: static;
  display: flex;
}

.fp-mega-dropdown {
  position: absolute;
  z-index: 999;
  top: 100%;
  right: 0;
  left: 0;
  padding-top: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
/* Opens on hover and on keyboard focus alike, so the menu is reachable without a mouse. */
.fp-mega-wrap:hover .fp-mega-dropdown,
.fp-mega-wrap:focus-within .fp-mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/*
 * `.fp-desktop-nav a` already owns a gradient underline on `::after` that it reveals with
 * `transform: scaleX(1)` on hover. Reuse it — hovering anywhere over the dropdown keeps the
 * trigger underlined — instead of drawing a second, competing underline on the same pseudo
 * element.
 */
.fp-mega-wrap:hover .fp-mega-trigger,
.fp-mega-wrap:focus-within .fp-mega-trigger { color: var(--fp-red, #f7192d); }
.fp-mega-wrap:hover .fp-mega-trigger::after,
.fp-mega-wrap:focus-within .fp-mega-trigger::after { transform: scaleX(1); }

/* ---------- reset Elementor container defaults inside the menu ---------- */

.fp-mega .e-con,
.fp-mega.e-con { padding: 0; gap: 0; }
.fp-mega .elementor-widget { margin: 0; }
.fp-mega p { margin: 0; }

/* ---------- shell ---------- */

.fp-mega {
  width: min(calc(100% - 24px), 1500px);
  margin-inline: auto;
  padding: 24px 24px 20px !important;
  border: 1px solid #e4eaf5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 64px rgba(6, 30, 74, .16);
  color: var(--navy, #061e4a);
  font-family: "Manrope", Arial, sans-serif;
}

.fp-mega .fp-mega-conf-row {
  display: flex;
  flex-direction: row;
  gap: 24px !important;
}
.fp-mega .fp-mega-panel { flex: 1 1 0; min-width: 0; }
/* Divider between the two conferences, matching the mockup's hairline. */
.fp-mega .fp-mega-panel.fp-conf-nfc {
  padding-left: 24px !important;
  border-left: 1px solid #e8edf6;
}

/* ---------- conference heading ---------- */

.fp-mega .fp-panel-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px !important;
  margin-bottom: 16px;
}
.fp-mega .fp-conf-badge {
  display: grid;
  width: 46px;
  height: 40px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
}
.fp-mega .fp-conf-afc .fp-conf-badge { background: var(--red, #f7192d); }
.fp-mega .fp-conf-nfc .fp-conf-badge { background: var(--navy, #061e4a); }

html body .fp-mega .fp-conf-title .elementor-heading-title {
  margin: 0 !important;
  color: var(--navy, #061e4a) !important;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif !important;
  font-size: 25px !important;
  font-style: italic !important;
  font-weight: 800 !important;
  letter-spacing: -.02em !important;
  line-height: 1.1 !important;
}

/* ---------- division columns ---------- */

.fp-mega .fp-div-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px !important;
}
.fp-mega .fp-div { min-width: 0; }

.fp-mega .fp-div-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px !important;
  margin-bottom: 9px;
  padding: 8px 10px !important;
  border: 1px solid #e4eaf5;
  border-radius: 10px;
  background: #fbfcfe;
}
.fp-mega .fp-div-mark {
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.fp-mega .fp-conf-afc .fp-div-mark { background: var(--red, #f7192d); }
.fp-mega .fp-conf-nfc .fp-div-mark { background: var(--navy, #061e4a); }

html body .fp-mega .fp-div-name .elementor-heading-title {
  margin: 0 !important;
  color: var(--navy, #061e4a) !important;
  font-family: "Manrope", Arial, sans-serif !important;
  font-size: 10.5px !important;
  font-style: normal !important;
  font-weight: 800 !important;
  letter-spacing: .11em;
  text-transform: uppercase;
}

/* ---------- team rows ---------- */

.fp-mega .fp-team-list {
  display: flex;
  flex-direction: column;
  gap: 4px !important;
}
.fp-mega .fp-team {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px !important;
  height: 34px;
  padding: 0 6px !important;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--navy, #061e4a);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.fp-mega .fp-team:hover,
.fp-mega .fp-team:focus-visible {
  border-color: #f3d3d7;
  background: #fdf2f3;
}

.fp-mega .fp-team-logo {
  display: grid;
  width: 18px;
  height: 18px;
  flex: none;
  place-items: center;
}
.fp-mega .fp-team-logo .elementor-widget-container { display: contents; }
.fp-mega .fp-team-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fp-mega .fp-team-name { min-width: 0; flex: 1 1 auto; }
.fp-mega .fp-team-name .elementor-heading-title {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

/* Collapse chevrons are mobile-only; desktop shows everything at once. */
.fp-mega .fp-panel-toggle,
.fp-mega .fp-div-toggle { display: none; }

.fp-mega .fp-team-arrow { flex: none; line-height: 0; }
.fp-mega .fp-team-arrow svg {
  width: 8px;
  height: 8px;
  fill: #b6c2d8;
  stroke: none;
}
.fp-mega .fp-team:hover .fp-team-arrow svg { fill: var(--red, #f7192d); }

/* ---------- bottom "Custom ..." row ---------- */

.fp-mega .fp-custom-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px !important;
  margin-top: 20px;
  padding-top: 20px !important;
  border-top: 1px solid #e8edf6;
}
.fp-mega .fp-custom-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px !important;
  padding: 14px 18px !important;
  border: 1px solid #e4eaf5;
  border-radius: 12px;
  background: #fff;
  color: var(--navy, #061e4a);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.fp-mega .fp-custom-card:hover,
.fp-mega .fp-custom-card:focus-visible {
  transform: translateY(-1px);
  border-color: #f3d3d7;
  box-shadow: 0 10px 24px rgba(6, 30, 74, .09);
}
.fp-mega .fp-custom-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
}
.fp-mega .fp-custom-icon .elementor-widget-container { display: contents; }
.fp-mega .fp-custom-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.fp-mega .fp-custom-name { min-width: 0; flex: 1 1 auto; }
.fp-mega .fp-custom-name .elementor-heading-title {
  margin: 0;
  color: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}
.fp-mega .fp-custom-arrow { flex: none; line-height: 0; }
.fp-mega .fp-custom-arrow svg {
  width: 13px;
  height: 13px;
  fill: var(--red, #f7192d);
  stroke: none;
}

/* ---------- narrow screens ---------- */

/*
 * Below 1080px the header switches to the burger menu, which has its own list, and a 8-column
 * mega panel cannot fit anyway — so the dropdown is removed from the layout entirely rather than
 * merely hidden, to keep its 32 rows out of the tab order on touch devices.
 */
@media (max-width: 1080px) {
  /*
   * Without JS the drawer cannot open, so the dropdown is removed outright and the header's own
   * <details class="fp-mobile-menu"> list stays the mobile menu. `fp-js` is set by fp-mega.js
   * once it has wired the drawer up — everything below is scoped to it.
   */
  .fp-mega-dropdown { display: none; }
}

/* ==========================================================================
   Mobile — burger opens the whole nav as a slide-in drawer holding the same
   mega-menu template, with the conferences and divisions collapsed.
   ========================================================================== */

@media (max-width: 1080px) {
  .fp-js .fp-mobile-menu > nav { display: none; }

  /* Drawer shell: the existing desktop nav, re-laid-out. */
  .fp-js .fp-desktop-nav {
    position: fixed;
    z-index: 1000;
    /* Sits below the header bar, which stays visible and keeps the burger reachable.
       fp-mega.js measures the header and publishes its height as --fp-header-h. */
    top: var(--fp-header-h, 0px);
    right: 0;
    bottom: 0;
    display: flex;
    width: min(88vw, 380px);
    flex-direction: column;
    padding: 18px 16px 28px;
    border-radius: 18px 0 0 0;
    background: #fff;
    box-shadow: -18px 0 48px rgba(6, 30, 74, .22);
    gap: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(102%);
    transition: transform .26s ease;
    visibility: hidden;
  }
  .fp-js .fp-site-header.fp-drawer-open .fp-desktop-nav {
    transform: none;
    visibility: visible;
  }
  .fp-js body.fp-drawer-lock { overflow: hidden; }

  /* Top row of nav links, as in the design. */
  .fp-js .fp-menu > li > a {
    padding: 0 !important;
    font-size: 12.5px;
    white-space: nowrap;
  }
  .fp-js .fp-menu > li > a::after { display: none; }
  .fp-js .fp-menu > li > .fp-mega-trigger { color: var(--fp-red, #f7192d); }
  /* Submenu items join the same strip rather than dropping to their own line. */
  .fp-js .fp-menu .sub-menu {
    position: static;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 18px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .fp-js .fp-menu .sub-menu li { flex: 0 0 auto; }
  .fp-js .fp-menu .sub-menu a {
    padding: 0;
    border-radius: 0;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
  }

  .fp-js .fp-desktop-nav { overflow-x: hidden; }
  /*
   * One line, swipe sideways — never wrapped. fp-mega.js moves the mega panel out of this list
   * while the drawer is active, so the only things left here are the links themselves and they can
   * all sit on a single scrolling row.
   *
   * `flex-direction: row` is restated on purpose: the drawer shell above sets `column`, and
   * inheriting that would turn `nowrap` into one tall column instead of one wide row.
   */
  .fp-js .fp-menu {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    /*
     * No shrinking. The drawer is a column flex container and now holds two children — this strip
     * and the very tall mega panel. Flex items shrink to fit before a container overflows, so with
     * the default `flex-shrink: 1` the panel squeezed this row down to 0px high and the links
     * vanished entirely, even though they were still in the DOM at the right coordinates.
     */
    flex: 0 0 auto;
    gap: 18px;
    width: 100%;
    padding-bottom: 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .fp-js .fp-menu::-webkit-scrollbar { display: none; }
  /* Transparent li's, so a parent and its submenu items all become items of the same strip. */
  .fp-js .fp-menu > li { display: contents; }
  .fp-js .fp-menu > li > a { flex: 0 0 auto; }

  /* Out of the list on mobile: an ordinary block under the strip. */
  .fp-js .fp-desktop-nav > .fp-mega-dropdown {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 2px;
  }
  /* Dropdown stops being a dropdown: it becomes the drawer's scrolling body. */
  .fp-js .fp-mega-dropdown {
    position: static;
    display: block;
    width: 100%;
    flex: 1 0 100%;
    padding-top: 14px;
    opacity: 1;
    transform: none;
    visibility: visible;
  }

  .fp-js .fp-mega {
    width: auto;
    max-width: 100%;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  /* Conferences stack; the divider and the 4-up grid both go away. */
  .fp-js .fp-mega .fp-mega-conf-row {
    flex-direction: column;
    gap: 14px !important;
  }
  .fp-js .fp-mega .fp-mega-panel.fp-conf-nfc {
    padding-left: 0 !important;
    border-left: 0;
  }
  .fp-js .fp-mega .fp-div-grid {
    display: flex;
    flex-direction: column;
    gap: 8px !important;
  }

  /* Conference header becomes a tappable bar. */
  .fp-js .fp-mega .fp-panel-head {
    margin-bottom: 10px;
    padding: 10px 12px !important;
    border: 1px solid #e4eaf5;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    gap: 10px !important;
  }
  .fp-js .fp-mega .fp-conf-badge { width: 38px; height: 34px; font-size: 12px; }
  html body .fp-js .fp-mega .fp-conf-title .elementor-heading-title { font-size: 19px !important; }
  .fp-js .fp-mega .fp-conf-title { flex: 1 1 auto; min-width: 0; }

  .fp-js .fp-mega .fp-panel-toggle,
  .fp-js .fp-mega .fp-div-toggle {
    display: block;
    flex: none;
    line-height: 0;
  }
  .fp-js .fp-mega .fp-panel-toggle svg,
  .fp-js .fp-mega .fp-div-toggle svg {
    width: 12px;
    height: 12px;
    fill: #8fa0bd;
    stroke: none;
    transition: transform .18s ease;
  }
  /* One chevron glyph, rotated, so open/closed never disagree with each other. */
  .fp-js .fp-mega .fp-mega-panel:not(.is-open) .fp-panel-toggle svg { transform: rotate(180deg); }
  .fp-js .fp-mega .fp-div.is-open .fp-div-toggle svg { transform: rotate(180deg); }

  .fp-js .fp-mega .fp-mega-panel:not(.is-open) .fp-div-grid { display: none; }

  /* Division header bar. */
  .fp-js .fp-mega .fp-div-head {
    margin-bottom: 0;
    padding: 11px 12px !important;
    border-radius: 11px;
    background: #f4f7fc;
    cursor: pointer;
    gap: 10px !important;
  }
  .fp-js .fp-mega .fp-div-name { flex: 1 1 auto; min-width: 0; }
  html body .fp-js .fp-mega .fp-div-name .elementor-heading-title { font-size: 12px !important; }
  .fp-js .fp-mega .fp-div-mark { width: 24px; height: 24px; font-size: 12px; }

  .fp-js .fp-mega .fp-div:not(.is-open) .fp-team-list { display: none; }
  .fp-js .fp-mega .fp-team-list {
    padding: 6px 0 2px;
    gap: 2px !important;
  }

  /* Team rows get room to breathe — and a tap target that meets the 44px guidance. */
  .fp-js .fp-mega .fp-team {
    height: auto;
    min-height: 44px;
    padding: 6px 10px !important;
    gap: 10px !important;
  }
  .fp-js .fp-mega .fp-team-logo { width: 22px; height: 22px; }
  html body .fp-js .fp-mega .fp-team-name .elementor-heading-title {
    font-size: 13px;
    line-height: 1.3;
  }
  .fp-js .fp-mega .fp-team-arrow svg {
    width: 11px;
    height: 11px;
    fill: var(--fp-red, #f7192d);
  }

  /* Custom cards stack. */
  .fp-js .fp-mega .fp-custom-row {
    grid-template-columns: 1fr;
    gap: 8px !important;
    margin-top: 14px;
    padding-top: 14px !important;
  }
  .fp-js .fp-mega .fp-custom-card {
    min-height: 56px;
    padding: 10px 12px !important;
    gap: 12px !important;
  }
  .fp-js .fp-mega .fp-custom-icon { width: 34px; height: 34px; }
  html body .fp-js .fp-mega .fp-custom-name .elementor-heading-title { font-size: 13px !important; }
}
