/**
 * Mobile Fixes for fortuna-international.com
 * Date: 2026-04-03, revised 2026-04-04
 * Viewports: 320px - 767px
 */

/* Restore EN scroll widget styling when translated sites changed the CSS class. */
.scroll-to-section span.elementor-heading-title,
[class*="défilement-to-section"] span.elementor-heading-title,
[class*="derulare-to-section"] span.elementor-heading-title,
[class*="scroll-naar-sectie"] span.elementor-heading-title,
[class*="rul-til-sektion"] span.elementor-heading-title,
[class*="przewiń-do-sekcji"] span.elementor-heading-title,
[class*="scroll-zum-abschnitt"] span.elementor-heading-title {
  right: 50px;
  bottom: 0;
  transform: rotate(90deg);
  position: absolute;
  overflow: inherit;
  display: block;
}

.scroll-to-section span.elementor-heading-title::before,
[class*="défilement-to-section"] span.elementor-heading-title::before,
[class*="derulare-to-section"] span.elementor-heading-title::before,
[class*="scroll-naar-sectie"] span.elementor-heading-title::before,
[class*="rul-til-sektion"] span.elementor-heading-title::before,
[class*="przewiń-do-sekcji"] span.elementor-heading-title::before,
[class*="scroll-zum-abschnitt"] span.elementor-heading-title::before {
  content: "";
  position: absolute;
  width: 56px;
  height: 1px;
  background: #fff;
  left: -80px;
  top: 7px;
}

@media (max-width: 767px) {

  /* FIX #1: JetMenu Mobile Submenu - Invisible Template Content */
  .jet-mobile-menu__template-content .elementor-invisible {
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* FIX #2: Desktop menu at narrow viewports (desktop UA) */

  body.jet-desktop-menu-active .elementor-element-f98035f .elementor-inner-section {
    display: none !important;
  }

  body.jet-desktop-menu-active .elementor-element-a1e4e8f > .elementor-container {
    min-height: auto !important;
  }

  body.jet-desktop-menu-active .elementor-element-f98035f {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    flex: 0 0 0px !important;
  }

  body.jet-desktop-menu-active .elementor-element.elementor-element-533526b .jet-menu {
    position: fixed !important;
    top: 0 !important;
    left: -100% !important;
    width: 80vw !important;
    max-width: 300px !important;
    height: 100vh !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    background: #fff !important;
    z-index: 99999 !important;
    padding: 20px !important;
    transition: left 0.3s ease !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.15) !important;
    overflow-y: auto !important;
  }

  body.jet-desktop-menu-active.mobile-menu-open .elementor-element.elementor-element-533526b .jet-menu {
    left: 0 !important;
  }

  body.jet-desktop-menu-active .elementor-element.elementor-element-533526b .jet-menu .jet-menu-item {
    width: 100% !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #eee !important;
  }

  body.jet-desktop-menu-active .elementor-element.elementor-element-533526b .jet-menu .jet-menu-item a {
    color: #2F314A !important;
    text-decoration: none !important;
    font-size: 16px !important;
  }

  body.jet-desktop-menu-active .elementor-element.elementor-element-533526b .jet-menu .jet-sub-mega-menu {
    display: none !important;
  }

  .fortuna-mobile-hamburger {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    cursor: pointer !important;
    background: transparent !important;
    border: none !important;
    padding: 8px !important;
    position: relative !important;
    z-index: 10 !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .fortuna-mobile-hamburger svg {
    width: 28px !important;
    height: 28px !important;
    stroke-width: 1.5 !important;
  }

  .fortuna-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 99998;
  }

  body.jet-desktop-menu-active.mobile-menu-open .fortuna-menu-overlay {
    display: block !important;
  }

  .fortuna-menu-close {
    position: fixed !important;
    top: 12px !important;
    left: 240px !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 24px !important;
    line-height: 36px !important;
    text-align: center !important;
    cursor: pointer !important;
    color: #2F314A !important;
    background: transparent !important;
    border: none !important;
    z-index: 100000 !important;
    display: none !important;
  }

  body.jet-desktop-menu-active.mobile-menu-open .fortuna-menu-close {
    display: block !important;
  }

  /* FIX #3: Services dropdown arrow */
  .jet-dropdown-arrow {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 30px !important;
    min-height: 30px !important;
  }

  /* FIX #4: Keep translated hero H1/H5 inside the first mobile hero image area. */
  .elementor .elementor-top-section.elementor-section-height-full:first-of-type .elementor-widget-heading.elementor-hidden-mobile {
    display: block !important;
  }

  .elementor .elementor-top-section.elementor-section-height-full:first-of-type .elementor-widget-heading.elementor-hidden-mobile .elementor-widget-container,
  .elementor .elementor-top-section.elementor-section-height-full:first-of-type .elementor-widget-heading.elementor-hidden-mobile .elementor-heading-title {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    overflow: visible !important;
  }

  .elementor .elementor-top-section.elementor-section-height-full:first-of-type .elementor-widget-heading h1.elementor-heading-title {
    font-size: clamp(30px, 9.5vw, 38px) !important;
    line-height: 0.98 !important;
    letter-spacing: -0.04em !important;
    overflow: visible !important;
  }

  .elementor .elementor-top-section.elementor-section-height-full:first-of-type .elementor-widget-heading h5.elementor-heading-title {
    font-size: 11px !important;
    line-height: 1.45 !important;
    letter-spacing: 0.12em !important;
    white-space: normal !important;
    overflow: visible !important;
    max-width: 100% !important;
  }

}
