/* =================================================================================
   MOBILE OPTIMIZATION - STICKY HEADER VERSION
   Project: Gartenglück
   Version: 2.0-BRUTEFORCE
   Cache-Buster: 202504081900
   ================================================================================= */

/* BRUTE FORCE: Global mobile header enforcement - MUST override everything */
@media (max-width: 768px) {
  /* Force body padding for header */
  body {
    padding-top: 60px !important;
    padding-top: 60px !important;
  }
  
  /* Kill original header visibility */
  .art-header {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
  }
}

/* BRUTE FORCE STICKY HEADER - Triple redundancy */
@media (max-width: 768px) {
  .mobile-sticky-header,
  header.mobile-sticky-header,
  div.mobile-sticky-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    background: #000000 !important;
    background-color: #000000 !important;
    background-image: none !important;
    display: flex !important;
    display: -webkit-flex !important;
    justify-content: space-between !important;
    -webkit-justify-content: space-between !important;
    align-items: center !important;
    -webkit-align-items: center !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
    z-index: 9999999 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5) !important;
    visibility: visible !important;
    opacity: 1 !important;
    border: none !important;
    margin: 0 !important;
  }
  
  /* Logo - force visibility */
  .mobile-sticky-header .sticky-logo,
  .mobile-sticky-header img.sticky-logo,
  img.sticky-logo {
    height: 40px !important;
    max-height: 40px !important;
    width: auto !important;
    max-width: 200px !important;
    display: block !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    border: none !important;
    background: transparent !important;
    object-fit: contain !important;
  }
  
  /* Menu Toggle Button */
  .mobile-menu-toggle,
  button.mobile-menu-toggle {
    display: flex !important;
    display: -webkit-flex !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    background: #4a7c3f !important;
    background-color: #4a7c3f !important;
    border: none !important;
    border-radius: 4px !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    -webkit-flex-shrink: 0 !important;
  }
  
  .mobile-menu-toggle .hamburger-line {
    width: 22px !important;
    height: 3px !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    margin: 2px 0 !important;
    display: block !important;
  }
}

/* =================================================================================

/* 1. GLOBAL MOBILE RESET */
@media (max-width: 768px) {
  body {
    font-size: 16px !important;
    line-height: 1.6 !important;
    padding-top: 60px !important; /* Space for the sticky header */
  }

  /* COMPLETELY HIDE THE ORIGINAL ART-HEADER ON MOBILE */
  .art-header {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* 2. THE NEW STICKY HEADER BAR */
@media (max-width: 768px) {
  .mobile-sticky-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 60px !important;
    background-color: #000000 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
    z-index: 999999 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .sticky-logo {
    height: 40px !important; 
    width: auto !important;
    max-width: 180px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
    width: 40px !important;
    height: 40px !important;
    background: #4a7c3f !important; /* Company Green */
    border: none !important;
    border-radius: 4px !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 1000000 !important;
  }

  .mobile-menu-toggle .hamburger-line {
    width: 22px !important;
    height: 3px !important;
    background: #fff !important;
    margin: 2px 0 !important;
    display: block !important;
    border-radius: 2px !important;
  }
}

/* 3. MENU OVERLAY */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.98);
  z-index: 1000001;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.mobile-menu-overlay.open {
  display: block;
}

.mobile-menu-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding-top: 60px;
}

.mobile-menu-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  z-index: 1000002;
}

.mobile-nav {
  color: #fff;
}

.mobile-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu > li {
  border-bottom: 1px solid #333;
}

.mobile-menu a {
  display: block;
  padding: 18px 20px;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  transition: background 0.2s;
}

.mobile-menu a:hover {
  background: #222;
}

.mobile-menu .has-submenu > a::after {
  content: " ›";
  float: right;
  font-size: 20px;
}

.mobile-menu .submenu {
  background: #111;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu .submenu a {
  padding-left: 40px;
  font-size: 16px;
}

/* 4. GENERAL MOBILE FIXES */
@media (max-width: 768px) {
  img {
    float: none !important;
    display: block !important;
    margin: 0 auto 1em auto !important;
  }
  
  .art-article .art-content-layout,
  .itemContent,
  .k2-item-content {
    overflow: auto !important;
    clear: both !important;
  }
}
