/* =========================================================
   Mega Menu (ported from Glamiva reference, adapted to Allianz)
   Opens on hover of a .has-mega menu item in the main navigation.
   ========================================================= */

/* Let the mega panel span the full header width */
.rr-header__wrapper:has(.rr-mega-menu) {
  position: relative;
}
.rr-header-2 .rr-header__menu__wrapper .main-menu ul li.has-mega {
  position: static;
}

/* Hide the dropdown caret's default sub-menu behaviour for the mega item */
.rr-header-2 .rr-header__menu__wrapper .main-menu ul li.has-mega > .rr-mega-menu {
  display: block;
  list-style: none;
  position: absolute;
  top: 100%;
  left: 50%;
  width: calc(100% - 30px);
  max-width: 1320px;
  z-index: 99;
  padding: 0;
  margin: 0 auto;
  text-align: left;
  background-color: var(--rr-common-white);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(1, 15, 28, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scaleY(0) translateX(-50%);
  transform-origin: top;
  transition: all 0.4s ease;
}

.rr-header-2 .rr-header__menu__wrapper .main-menu ul li.has-mega:hover > .rr-mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scaleY(1) translateX(-50%);
  transition: all 0.5s ease;
}

/* Neutralise the nav's default li styling on the single wrapper li */
.rr-header-2 .rr-header__menu__wrapper .main-menu ul li.has-mega > .rr-mega-menu > li {
  margin: 0;
  display: block;
  width: 100%;
}

/* Layout: columns side by side */
.rr-mega-menu .mega-menu-wrapper {
  display: flex;
  flex-wrap: nowrap;
}

.rr-mega-menu .mega-menu-col {
  width: 320px;
  padding: 26px 30px 24px;
  border-left: 1px solid var(--rr-color-white_smoke-5);
}
.rr-mega-menu .mega-menu-col:first-child {
  border-left: 0;
}
/* Wide column — holds a category whose links run in two sub-columns */
.rr-mega-menu .mega-menu-col.mega-menu-col-wide {
  width: 630px;
}

/* Column titles */
.rr-mega-menu .mega-menu-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--rr-heading-primary);
  padding-bottom: 4px;
margin-bottom: 15px;
  position: relative;
  font-family: var(--rr-ff-heading2);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.rr-mega-menu .mega-menu-title::before {
  position: absolute;
  content: "";
  width: 32px;
  height: 3px;
  background: var(--rr-theme-primary-3);
  bottom: 0;
  left: 0;
}
.rr-mega-menu .mega-menu-title a {
  color: inherit;
  transition: all 0.3s ease-in-out;
}
.rr-mega-menu .mega-menu-title a:hover {
  color: var(--rr-theme-primary);
}

/* Column link lists */
.rr-mega-menu .mega-menu-list {
  display: flex;
  flex-direction: column;
}
.rr-mega-menu .mega-menu-list.mega-menu-list-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 20px;
}
.rr-mega-menu .mega-menu-list a {
  font-weight: 500;
  font-size: 15px;
  color: var(--rr-text-body);
  padding: 7px 0;
  line-height: 1.3;
  position: relative;
  transition: all 0.3s ease-in-out;
  font-family: var(--rr-ff-heading2);
  letter-spacing: 1px;
}
.rr-mega-menu .mega-menu-list a:hover,
.rr-mega-menu .mega-menu-list a.active {
  color: var(--rr-theme-primary);
  padding-left: 6px;
}

/* Feature / promo box (last column — sits under the "Other Products" list) */
.rr-mega-menu .mega-menu-col.mega-menu-feature {
  width: 360px;
  display: flex;
  flex-direction: column;
}
.rr-mega-menu .mega-menu-feature .mega-menu-list {
  margin-bottom: 20px;
}
.rr-mega-menu .feature-box {
  position: relative;
  background: var(--rr-heading-primary);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
}
/* In the feature column the box fills whatever height the list leaves */
.rr-mega-menu .mega-menu-feature .feature-box {
  flex: 1 1 auto;
  height: auto;
  min-height: 180px;
}
.rr-mega-menu .feature-box .feature-content {
  padding: 30px 26px 40px;
}
.rr-mega-menu .feature-box .feature-content .title {
  font-size: 40px;
  line-height: 1;
  color: var(--rr-common-white);
  margin-bottom: 12px;
  font-family: var(--rr-ff-heading2);
}
.rr-mega-menu .feature-box .feature-content > span {
  display: block;
  font-size: 18px;
  font-weight: 500;
  color: var(--rr-common-white);
  line-height: 1;
  margin-bottom: 22px;
}
.rr-mega-menu .feature-box .feature-content .feature-contact {
  background-color: var(--rr-theme-primary);
  padding: 9px 16px;
  border-radius: 50px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rr-mega-menu .feature-box .feature-content .feature-contact i {
  color: var(--rr-common-white);
  font-size: 18px;
}
.rr-mega-menu .feature-box .feature-content .feature-contact span {
  color: var(--rr-common-white);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}
.rr-mega-menu .feature-box .feature-images {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.rr-mega-menu .feature-box .feature-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tablet/desktop: tighten columns between 992px and 1199px */
@media only screen and (min-width: 992px) and (max-width: 1199px) {
  .rr-header-2 .rr-header__menu__wrapper .main-menu ul li.has-mega > .rr-mega-menu {
    width: calc(100% - 20px);
  }
  .rr-mega-menu .mega-menu-col {
    width: 25%;
    padding: 20px 16px;
  }
  .rr-mega-menu .mega-menu-col.mega-menu-col-wide {
    width: 50%;
  }
  .rr-mega-menu .mega-menu-col.mega-menu-feature {
    width: 25%;
  }
}

/* =========================================================
   Mobile / small tablet (< 992px): the nav is cloned into the
   dark offcanvas panel by meanmenu. Stack columns full width,
   reset desktop layout, and use light text on the dark panel.
   ========================================================= */
@media only screen and (max-width: 991px) {
  /* meanmenu controls show/hide via inline display — do NOT override it here */
  .rr-mega-menu > li {
    width: 100%;
    display: block;
  }
  .rr-mega-menu .mega-menu-wrapper {
    display: block;
  }
  /* meanmenu's global "ul li a { float:left }" rule collapses the
     height of every wrapper below (mega-menu-wrapper/col/list), so
     following rows render on top of the links and swallow the click.
     Cancel the float on mega-menu links and clear the wrappers so
     each row keeps real height and stays tappable. */
  .rr-mega-menu .mega-menu-wrapper,
  .rr-mega-menu .mega-menu-col,
  .rr-mega-menu .mega-menu-list,
  .rr-mega-menu .mega-menu-title {
    float: none;
    overflow: hidden;
  }
  .rr-mega-menu .mega-menu-title a,
  .rr-mega-menu .mega-menu-list a {
    float: none !important;
    width: 100% !important;
  }
  .rr-mega-menu .mega-menu-col,
  .rr-mega-menu .mega-menu-col.mega-menu-col-wide,
  .rr-mega-menu .mega-menu-col.mega-menu-feature {
    display: block;
    width: 100%;
    border-left: 0;
    padding: 8px 0 12px;
  }
  .rr-mega-menu .mega-menu-list.mega-menu-list-2col {
    display: block;
  }
  .rr-mega-menu .mega-menu-title a,
  .rr-mega-menu .mega-menu-title {
      color: var(--rr-common-white);
      font-size: 20px !important;
      text-transform: uppercase !important;
      padding: 12px 0 8px;
      margin-bottom: 0;
      opacity: 0.7;
    }
  .rr-mega-menu .mega-menu-title::before {
    display: none;
  }
  .rr-mega-menu .mega-menu-list a {
    color: var(--rr-common-white);
    font-size: 15px;
    padding: 8px 0;
  }
  .rr-mega-menu .mega-menu-list a:hover,
  .rr-mega-menu .mega-menu-list a.active {
    color: var(--rr-theme-primary-3);
    padding-left: 0;
  }
  /* Keep the mobile menu compact — hide the promo card, but keep the
     "Other Products" links that now share its column */
  .rr-mega-menu .mega-menu-feature .feature-box {
    display: none;
  }
  .rr-mega-menu .mega-menu-feature .mega-menu-list {
    margin-bottom: 0;
  }
}
