/* ===========================
   MOBILMENY
   =========================== */
.mobile-container {
 position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
}

.topnav {
  display: flex;
  align-items: center;
  background: white;
  width: 100%;
  height: 50px;
  padding: 10px;
  box-sizing: border-box;
}

.topnav .icon {
  font-size: 24px;
  cursor: pointer;
  color: black;
}

#myLinks {
  display: none;
  flex-direction: column;
  width: 100%;
  position: fixed;
  top: 50px;
  left: 0;
  bottom: 0;
  background: white;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 10000;
  padding-bottom: 60px;
}

#myLinks.show {
  display: flex;
}

#myLinks a {
  padding: 10px 14px;
  text-decoration: none;
  color: black;
  border-top: 1px solid #ddd;
}

#myLinks a:hover {
  background-color: #f0f0f0;
}

.menu-close {
  font-size: 2rem;
  background: none;
  border: none;
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  z-index: 10001;
}

#mobile-search {
  margin: 10px 16px 16px 16px;
  order: 99;
}
.search-results {
  display: none;
}

#mobile-search.active .search-results {
  display: block;
}
.search-results {
  background: white;
  padding: 10px;
  border-radius: 6px;
  margin-top: 8px;
}

.search-results a {
  display: block;
  padding: 10px;
  font-size: 16px;
}

/* Små skärmar: mobilmeny syns, desktopmeny göms */
@media screen and (max-width: 767px) {
  .mobile-container {
    display: block;
  }
  .navbar {
    display: none;
  }
}

/* Stora skärmar: desktopmeny syns, mobilmeny göms */
@media screen and (min-width: 768px) {
  .mobile-container {
    display: none;
  }
  .navbar {
    display: block;
  }
}
/* =========================
   FIX FÖR GAME SUPPORT PÅ MOBIL
   ========================= */
@media (max-width: 768px) {

  /* Se till att containern visas */
  .main {
    display: block !important;
  }

  /* Grid för ikoner */
  #gamesupportframe {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 90% !important;
    margin: 0 auto !important;
    text-align: center !important;
  }

  #gamesupportframe figure {
    margin: 0 !important;
  }

  #gamesupportframe img {
    width: 60px !important;
    height: 60px !important;
    display: block !important;
    margin: 0 auto !important;
  }

  #gamesupportframe figcaption {
    font-size: 0.8rem !important;
    margin-top: 4px !important;
    color: black !important;
    text-align: center !important;
  }
}
/* =========================
   FIX FÖR GAME SUPPORT PÅ MOBIL
   ========================= */
@media (max-width: 768px) {

  /* Se till att containern visas */
  .main {
    display: block !important;
  }

  /* Grid för ikoner */
  #gamesupportframe {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 90% !important;
    margin: 0 auto !important;
    justify-items: center; /* viktig för Safari */
  }

  #gamesupportframe figure {
    margin: 0 !important;
    display: flex;             /* se till att figcaption hamnar under bilden */
    flex-direction: column;
    align-items: center;
  }

  #gamesupportframe img {
    width: 60px !important;
    height: 60px !important;
    display: block !important;
    margin: 0 auto !important;
  }

  #gamesupportframe figcaption {
    font-size: 0.8rem !important;
    margin-top: 4px !important;
    color: black !important;
    text-align: center !important;
  }
}