/* v15 - focused repairs, loaded AFTER the existing v14 style sheets. */

/* Make every desktop dropdown reachable by the mouse: no 10px dead zone
   between its parent menu item and the submenu. */
@media (min-width: 981px) {
  #primary-nav .nav-item > .sub-menu {
    top: 100% !important;
    margin-top: 0 !important;
    z-index: 150;
  }
  #primary-nav .nav-item:hover > .sub-menu,
  #primary-nav .nav-item:focus-within > .sub-menu,
  #primary-nav .nav-item.is-open > .sub-menu {
    display: block;
  }
}
@media (max-width: 980px) {
  #primary-nav .nav-item > .sub-menu {
    position: static !important;
    margin-top: 0 !important;
    display: none !important;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  #primary-nav .nav-item.is-open > .sub-menu {
    display: block !important;
  }
}

/* Recovered Joomla page: the duplicate positioned TinyMCE text was removed
   from the two static pages. Limit the original sponsorship illustration to
   the content column and retain its original aspect ratio. */
.mentor-project-article .content-body {
  position: relative;
  overflow-wrap: anywhere;
  min-width: 0;
}
.mentor-project-article .content-body [data-mce-bogus="1"] {
  display: none !important;
}
.mentor-project-article .content-body img[src$="/sz2020.jpg"] {
  display: inline-block;
  width: auto;
  height: auto;
  max-width: min(100%, 420px) !important;
  max-height: 280px;
  object-fit: contain;
}
.mentor-project-article .content-body > p[style*="text-align: right"] {
  clear: both;
  text-align: right;
  margin: 0 0 1.6rem;
}

/* Both footer sections are dark purple, with legible light text. This
   overrides the pale v9 footer rule that was loaded after site.css. */
.footer {
  background: linear-gradient(115deg, #290943 0%, #42136b 58%, #5b2186 100%) !important;
  color: #fff !important;
  border-top: 3px solid #9b62d9 !important;
}
.footer .footer-grid h2,
.footer .footer-grid p,
.footer .footer-grid span,
.footer .footer-bottom,
.footer .footer-bottom .container,
.footer .footer-bottom span {
  color: #fff !important;
}
.footer .footer-grid a,
.footer .footer-bottom a,
.footer .footer-grid a:visited,
.footer .footer-bottom a:visited {
  color: #f8f1ff !important;
}
.footer .footer-grid a:hover,
.footer .footer-grid a:focus-visible,
.footer .footer-bottom a:hover,
.footer .footer-bottom a:focus-visible {
  color: #e1bcff !important;
}
.footer .footer-bottom {
  background: linear-gradient(90deg, #220638 0%, #38105c 55%, #481673 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
}
.footer .footer-bottom .container {
  color: #fff !important;
}

/* Mobile navigation: visible hamburger and search controls on the deep
   purple header, without overlapping the label. */
@media (max-width: 980px) {
  .menu-toggle {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border: 1px solid rgba(255,255,255,.35) !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,.12) !important;
    color: #fff !important;
    flex-shrink: 0;
  }
  .menu-toggle .mobile-only { display: none !important; }
  .menu-toggle span[aria-hidden="true"] {
    color: #fff !important;
    font-size: 1.35rem;
  }
}
.header-actions #search-toggle {
  background: rgba(255,255,255,.12) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.3) !important;
}
.header-actions #search-toggle:hover,
.menu-toggle:hover {
  background: rgba(255,255,255,.22) !important;
}

/* On small screens the fixed EU/ESZA corner mark should not hide paragraphs. */
@media (max-width: 690px) {
  .eu-fixed-bubble {
    left: auto !important;
    right: 8px !important;
    bottom: 8px !important;
    width: min(156px, 40vw) !important;
    max-width: 40vw !important;
  }
  .eu-fixed-bubble .eu-dismiss {
    top: -5px;
    right: -5px;
  }
}

/* At laptop widths the full six-item navigation does not physically fit.
   Use the same collapsible pattern as mobile rather than clipping links. */
@media (min-width: 981px) and (max-width: 1380px) {
  .header-inner { position: relative; min-height: 84px; gap: 12px; }
  .menu-toggle {
    display: inline-flex !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    margin-left: auto;
    padding: 0 !important;
    justify-content: center;
    align-items: center;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.35) !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,.12) !important;
  }
  .menu-toggle .mobile-only { display: none !important; }
  .menu-toggle span[aria-hidden="true"] { color: #fff !important; font-size: 1.35rem; }
  #primary-nav {
    display: none;
    position: absolute;
    top: calc(100% + 7px);
    left: 16px;
    right: 16px;
    margin: 0;
    padding: 12px 16px;
    max-height: calc(100vh - 125px);
    overflow-y: auto;
    background: linear-gradient(135deg, #350d5a 0%, #5c1d93 100%);
    box-shadow: 0 22px 50px rgba(35,7,65,.26);
    border: 1px solid rgba(230,207,251,.3);
    border-radius: 16px;
  }
  #primary-nav.is-open { display: block; }
  #primary-nav .nav-menu { display: block !important; height: auto; }
  #primary-nav .nav-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.18);
  }
  #primary-nav .nav-parent {
    color: #fff !important;
    font-size: .94rem;
    padding: 12px 10px;
  }
  #primary-nav .nav-item > .sub-menu {
    position: static !important;
    display: none !important;
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 0 0 10px !important;
    padding: 7px;
    background: rgba(255,255,255,.08) !important;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
  }
  #primary-nav .nav-item.is-open > .sub-menu { display: block !important; }
  #primary-nav .sub-menu a { color: #fff !important; }
  #primary-nav .sub-menu a:hover { color: #fff !important; background: rgba(255,255,255,.12) !important; }
  .header-actions .contact-link { display: none !important; }
}
