/* ================================================
   1. Mobiele elementen op desktop verbergen
   ================================================ */
@media (min-width: 981px) {
  #custom-mobile-toggle,
  #custom-mobile-overlay {
    display: none !important;
  }
}

/* ================================================
   2. Mobiele menu styling (actief op mobiel)
   ================================================ */
@media (max-width: 980px) {
  /* Verberg Divi's standaard hamburger */
  .mobile_menu_bar,
  .mobile_nav {
    display: none !important;
  }
    
  #main-header .logo_container {
    display: block !important;
    z-index: 10003;
  }

  /* Toggle button */
  .custom-mobile-toggle {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  /* --- SVG STYLING --- */
  .hamburger-svg {
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .hamburger-line {
    transform-origin: center;
    transition: transform 0.3s ease-in-out, opacity 0.2s ease-in-out;
  }
  
  /* Open-state: animatie naar 'X' */
  .custom-mobile-toggle.open .hamburger-line.top {
    transform: translateY(4px) rotate(45deg);
  }
  
  .custom-mobile-toggle.open .hamburger-line.middle {
    opacity: 0;
  }
  
  .custom-mobile-toggle.open .hamburger-line.bottom {
    transform: translateY(-8px) rotate(-45deg);
  }
  /* --- EINDE DEFINITIEVE SVG STYLING --- */

  /* Overlay (volledig scherm) */
  #custom-mobile-overlay {
      position: fixed;
      inset: 0;
      background: #1A6268;
      z-index: 10001;
      opacity: 0;
      visibility: hidden;
      transition: opacity .35s ease-in-out, visibility 0s linear .35s;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0px 34px;
      -webkit-overflow-scrolling: touch;
  }
  #custom-mobile-overlay.open {
      opacity: 1;
      visibility: visible;
      transition-delay: 0s;
  }

  /* Menu styling */
  .custom-mobile-nav { width: 100%; max-width: 900px; }
  .custom-mobile-menu { list-style: none; margin: 0; padding: 0; }
  .custom-mobile-menu li { margin: 18px 0; }
  .custom-mobile-menu li a {
    font-family: "Marcellus";
    display: block;
    text-decoration: none;
    color: #ffffff;
    font-size: 28px;
    line-height: 1.15;
    text-align: center;
    padding: 12px 0;
  }

  /* Voorkom body scroll als menu open is */
  body.custom-mobile-open { overflow: hidden; height: 100%; }
}