/* ==========================================================================
   MEGA MENU (Core)
   ========================================================================== */

/* Root nav */
.menu--primary {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu__item {
  position: static;
}

.menu__link {
  display: inline-block;
  padding: 0.75rem 0.5rem;
  text-decoration: none;
}

.menu__link:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Panels: animation-ready */
.mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-top: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
  will-change: opacity, transform;
  z-index: 950;
}

.mega.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mega--full {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  margin: 0;
}

/* 2000px inner container */
.mega__inner--wide {
  max-width: 2000px;
  margin: 0 auto;
  padding: 35px 24px 24px;
}

/* ==========================================================================
   Desktop chevrons for dropdown parents
   ========================================================================== */
@media (min-width: 901px) {
  .menu--primary > li > a.menu__link {
    display: inline-flex;
    align-items: center; /* keeps chevron on the text centreline */
    gap: 8px;
  }

  /* NOTE: you should keep your "tight" selector here (whatever you ended up with)
     This is the version from your pasted file; adjust selector if your logic changed. */
  .menu--primary > li > a.menu__link[data-panel]:not([data-panel=""])::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0.65;
    vertical-align: middle;
    transform: rotate(45deg);
    transform-origin: 50% 50%;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .menu--primary > li:hover > a.menu__link[data-panel-id]::after,
  .menu--primary > li:focus-within > a.menu__link[data-panel-id]::after {
    transform: rotate(-135deg);
    opacity: 0.9;
  }
}

/* ==========================================================================
   Mobile-only main-menu links
   ========================================================================== */
/* Mobile-first: show on mobile */
a.menu__link[data-panel="mobile-only"] {
  display: block;
}

/* Hide on desktop */
@media (min-width: 901px) {
  a.menu__link[data-panel="mobile-only"] {
    display: none !important;
  }
}

/* ==========================================================================
   Products panel (expo_category grid)
   ========================================================================== */

/* Panel heading wrapper */
.products-panel__head {
  margin-bottom: 28px;
}

.products-panel__title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-stylistic);
  font-size: 26px;
  height: 48px;
  line-height: 48px;
  font-weight: 600;
  color: #0f172a;
  grid-column: 1 / span 8;
}

.products-panel__arrow {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: transform 0.15s ease;
}

.products-panel__arrow:hover {
  transform: translateX(4px);
}

.products-panel__arrow i {
  font-size: 20px;
  color: #006aff;
}

/* 4-col grid */
.products-grid {
  display: grid;
  margin: 35px 0;
  row-gap: 26px;
  column-gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.products-grid__item {
  background: #fff;
  border-radius: 6px;
  padding: 10px;
  transition: box-shadow 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.products-grid__item:hover {
  background-color: #f6f6f6;
}

.products-grid__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.products-grid__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.products-grid__icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  object-fit: contain;
}

.products-grid__text {
  flex: 1 1 auto;
  min-width: 0;
}

.products-grid__item:hover .products-grid__text {
  color: #333;
}

.products-grid__title {
  display: block;
  max-width: 100%;
  font-size: 15px;
  line-height: 1.25;
  margin: 0 0 10px 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.products-grid__subtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #5f6470;
}

/* Footer bar */
.products-panel__footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.products-panel__footer-link {
  text-decoration: none;
  color: #111827;
  font-weight: 500;
  font-size: 14px;
}

ul.menu li a.products-panel__footer-link--primary {
  font-weight: 600;
  font-size: 16px;
}

.products-panel__footer-actions {
  display: flex;
  gap: 14px;
}

/* ==========================================================================
   News panel (split layout)
   ========================================================================== */

.news-panel .eb-container {
  max-width: 1600px;
  margin-left: 0;
  padding-left: 20px;
}

.news-panel .eb-section {
  padding-top: 0;
}

/* Split: override wide container */
.mega--split .mega__inner--wide {
  max-width: 100%;
}

/* Split layout */
.mega--split .mega__inner.mega-news-split {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  min-height: 280px;
}

/* Left rail */
.news-rail {
  border-right: 1px solid #eee;
  padding-right: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-rail__link {
  background: none;
  border: 0;
  text-align: left;
  padding: 8px 10px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  color: #1f2937;
  display: block;
}

.news-rail__link:hover,
.news-rail__link:focus {
  background: #f3f4f6;
  outline: none;
}

.news-rail__link.is-active {
  background: #eef2ff;
  color: #111827;
  font-weight: 600;
}

/* Right side panels */
.news-panels {
  min-height: 220px;
}

.news-panel {
  display: none;
}

.news-panel.is-active {
  display: block;
}

.news-panel__empty {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

/* Webinars: 2x2 grid */
#news-tab-webinars .eb-card-slider__list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

#news-tab-webinars .splide__slide {
  width: auto !important;
}

/* ==========================================================================
   Topics panel
   ========================================================================== */

.topics-list {
  list-style: none;
  max-width: 400px;
  margin: 0;
  padding: 0;
}

.topics-list__item {
  margin: 0;
}

ul.menu li a.topics-list__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
}

.topics-list__link:hover,
.topics-list__link:focus {
  background: #f3f4f6;
  outline: none;
}

.topics-list__icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
}

.topics-list__icon--placeholder {
  background: #e5e7eb;
  border-radius: 4px;
}

.topics-list__text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topics-list__text.text {
  font-weight: bold;
  text-transform: uppercase;
  display: block;
  font-size: 16px;
  margin-bottom: 10px;
  padding: 20px 0 5px 0;
  border-bottom: solid 1px #ddd;
}

/* ==========================================================================
   Partners panel
   ========================================================================== */

.mega--partners .partners-panel__header {
  padding: 10px 0 0;
}

.mega--partners .partners-panel__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

.mega--partners .partners-panel__intro {
  margin: 0 0 18px;
  max-width: 900px;
  text-wrap: balance;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.5;
}

.mega--partners .partners-panel__subheading {
  margin: 0 0 14px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #111827;
}

/* Desktop-hidden “mobile helper” title link */
ul.menu li a.partner-card_title {
  display: none;
}

/* Grid */
.mega--partners .partners-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.mega--partners .partner-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: #fff;
}

.mega--partners .partner-card__logo img {
  max-width: 250px;
  height: auto;
  display: block;
  object-fit: contain;
}

.mega--partners .partner-card__intro {
  margin: 0;
  font-size: 14px;
  padding: 15px 0;
  color: #4b5563;
  line-height: 1.45;
}

/* Inline links separated by | */
.mega--partners .partner-card__links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

.mega--partners .partner-card__links li {
  display: inline-flex;
  align-items: center;
}

.mega--partners .partner-card__links li + li::before {
  content: "|";
  margin-right: 10px;
  color: #cbd5e1;
}

.mega--partners .partner-card__links a {
  text-decoration: none;
}

/* CTA button */
.mega--partners .partner-card__button,
.mega--partners .partner-card__button:hover {
  margin-top: auto;
  text-decoration: none;
  background-color: #0066c3;
  border-color: #0066c3;
  color: #fff;
  text-align: center;
  display: inline-block;
  cursor: pointer;
  line-height: normal;
  padding: 8px 12px !important;
  font-size: 16px;
  border-radius: 4px;
  font-weight: 400;
  border: solid 1px;
}

/* ==========================================================================
   Mobile menu overlay (Core)
   ========================================================================== */

.mobile-menu-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  line-height: 1;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 2000;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #eee;
}

.mobile-menu__title {
  font-family: var(--font-stylistic);
  font-weight: 700;
  font-size: 18px;
  margin: 0;
}

.mobile-menu__close,
.mobile-menu__back {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 20px;
  padding: 6px 10px;
}

.mobile-menu__nav {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
}

.mobile-menu__list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.mobile-menu__list li {
  margin: 0 !important;
  padding: 0 !important;
}

.mobile-menu__list a,
.mobile-menu__list button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  font-size: 15px;
  text-decoration: none;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 1px solid #eee;
  text-align: left;
  cursor: pointer;
}

.mobile-menu__chev {
  opacity: 0.55;
  font-size: 18px;
}

body.mobile-menu-open {
  overflow: hidden;
}

/* Icons in mobile menu links */
img.mobile-menu__icon {
  max-width: 25px;
  max-height: 25px;
}

/* Search inside mobile menu */
.mobile-menu__search {
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}

/* (you had an extra override; kept, but merged cleanly) */
.mobile-menu__list li.mobile-menu__search {
  padding: 20px !important;
}

.mobile-menu__searchinput {
  width: 100%;
  font-size: 18px;
  padding: 12px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

/* Mobile header icons */
.mobile-search-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  line-height: 1;
}

/* ==========================================================================
   Responsive (grouped)
   ========================================================================== */

/* --- <= 1200px --- */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --- <= 1100px --- */
@media (max-width: 1100px) {
  .mega--split .mega__inner.mega-news-split {
    grid-template-columns: 200px 1fr;
  }

  .mega--partners .partners-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- <= 900px --- */
@media (max-width: 900px) {
  .products-panel__title {
    font-size: 24px;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .products-panel__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .products-panel__footer-actions {
    flex-wrap: wrap;
  }

  /* Mobile menu behaviour */
  .navbar-menu {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    font-size: 22px;
    color: #666;
  }

  .mobile-search-toggle {
    display: inline-flex;
    align-items: center;
    font-size: 22px;
    color: #666;
  }

  .header-navbar.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    padding-right: 12px;
  }

  .mobile-search-toggle,
  .mobile-menu-toggle {
    margin: 0;
  }

  .mobile-menu-toggle__icon {
    font-size: 30px;
  }

  /* Link rows containing icons: align icon+text left */
  .mobile-menu__list a:has(.mobile-menu__icon) {
    justify-content: flex-start;
    gap: 10px;
  }
}

/* --- <= 780px --- */
@media (max-width: 780px) {
  /* hide rail buttons on mobile if href '#' (your class-based approach) */
  .news-rail__link.news-rail__link--nomobile {
    display: none;
  }

  .mega--split .mega__inner.mega-news-split {
    grid-template-columns: 1fr;
  }

  .news-rail {
    flex-direction: row;
    flex-wrap: wrap;
    border: 0;
    padding: 0;
    gap: 8px;
  }

  .mega--partners .partners-grid {
    grid-template-columns: 1fr;
  }
}

/* --- <= 540px --- */
@media (max-width: 540px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  /* (your file had 26px here; kept as-is even though it's larger than 24px @900) */
  .products-panel__title {
    font-size: 26px;
  }
}
