/**
 * Neskici — mobile override for the homepage only.
 * Theme: temalar/default4/
 *
 * Hooked from ust.tpl when $is_main == 1 (not /oyna/, not /{slug}.html).
 * Header matches mobile-bilgi.css (compact login chips + one row of shortcuts).
 * Game covers: 3-column cards. Do not collapse .adv300x250 height.
 * CF caches CSS 7d — bump ?v= in ust.tpl when this file changes.
 */

@media only screen and (max-width: 768px) {

  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body .wrapper,
  body .footer,
  body .footerwrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* ---- Header (same chips as bilgi / oyna) ---- */

  body .headerbg,
  body div.headerbg {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    border-bottom: 1px solid #313131 !important;
    background: #eeeeee !important;
    background-image: none !important;
  }

  body .headerwrapper,
  body div.headerwrapper {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  body .topblackwrapper,
  body div.topblackwrapper {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 8px 10px 10px 10px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-align: center !important;
    background: #444444 !important;
    background-image: none !important;
  }

  body .login,
  body .topblackwrapper .login {
    float: none !important;
    clear: both !important;
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-box-orient: horizontal !important;
    -webkit-box-direction: normal !important;
    -webkit-flex-direction: row !important;
    flex-direction: row !important;
    -webkit-flex-wrap: wrap !important;
    flex-wrap: wrap !important;
    -webkit-box-pack: center !important;
    -webkit-justify-content: center !important;
    justify-content: center !important;
    -webkit-box-align: center !important;
    -webkit-align-items: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  body .login a,
  body .login a.main,
  body .login a.lgn,
  body .login a.rgst,
  body .login a.lbtn,
  body .login a.fcbk,
  body .login a.exit,
  body .login a.dashboard,
  body .login a.admn {
    float: none !important;
    clear: none !important;
    display: block !important;
    -webkit-box-flex: 0 !important;
    -webkit-flex: 0 0 auto !important;
    flex: 0 0 auto !important;
    -webkit-align-self: center !important;
    align-self: center !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 3px !important;
    padding: 8px 12px 8px 28px !important;
    min-height: 36px !important;
    font-size: 11px !important;
    line-height: 20px !important;
    white-space: nowrap !important;
    text-align: left !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
  }

  body #search,
  body .topblackwrapper #search {
    float: none !important;
    clear: both !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  body #search form {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  body #search input[type="text"],
  body #search input.query,
  body #search #ara {
    width: 100% !important;
    max-width: 100% !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 36px 0 12px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
  }

  body #search .search-button,
  body #search button.search-button {
    top: 8px !important;
    right: 8px !important;
  }

  body .header,
  body div.header {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-flex-wrap: wrap !important;
    flex-wrap: wrap !important;
    -webkit-box-pack: center !important;
    -webkit-justify-content: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 8px 6px 6px 6px !important;
    text-align: center !important;
    overflow: hidden !important;
    clear: both !important;
    box-sizing: border-box !important;
    background: #eeeeee !important;
    background-image: none !important;
  }

  body .header > .clearfix {
    display: none !important;
  }

  body .logo,
  body .header .logo {
    float: none !important;
    clear: both !important;
    display: block !important;
    -webkit-box-flex: 1 !important;
    -webkit-flex: 1 0 100% !important;
    flex: 1 0 100% !important;
    width: 100% !important;
    margin: 0 auto 2px auto !important;
    text-align: center !important;
  }

  body .logo img,
  body .header .logo img {
    max-width: 168px !important;
    width: auto !important;
    height: auto !important;
  }

  body a.headeritem,
  body .header a.headeritem {
    float: none !important;
    display: block !important;
    -webkit-box-flex: 1 !important;
    -webkit-flex: 1 1 0 !important;
    flex: 1 1 0 !important;
    vertical-align: top !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 92px !important;
    margin: 2px 2px 4px 2px !important;
    padding: 4px 2px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    color: #414141 !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  body a.headeritem img {
    width: 28px !important;
    height: 28px !important;
    display: block !important;
    margin: 0 auto 2px auto !important;
  }

  body a.headeritem .clearfix {
    display: none !important;
  }

  /* ---- Category strip ---- */

  body .catarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 6px !important;
  }

  body .cats li {
    width: 46% !important;
    height: auto !important;
    margin: 2px 2% 2px 0 !important;
    box-sizing: border-box !important;
  }

  /* ---- Page column: stack the 960px floats ---- */

  body .container {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-box-orient: vertical !important;
    -webkit-flex-direction: column !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 6px !important;
    padding: 8px !important;
    box-sizing: border-box !important;
  }

  body .container > * {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Category game blocks stay above the sidebar list */
  body .windowarea {
    -webkit-box-ordinal-group: 3 !important;
    -webkit-order: 2 !important;
    order: 2 !important;
  }

  body .sidebar {
    -webkit-box-ordinal-group: 4 !important;
    -webkit-order: 3 !important;
    order: 3 !important;
  }

  body .editorgames,
  body .newgames,
  body .windowarea,
  body .sidebar,
  body .block {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  body .block {
    margin: 0 0 12px 0 !important;
  }

  body h1.blocktitleredbige,
  body h2.blocktitlebluebig,
  body h2.blocktitleturquoise,
  body .windowarea h2,
  body .newgames h2 {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /*
   * Homepage ad beside the editor grid. Fit the width only.
   * Leave height alone so an empty or filled unit is not collapsed.
   */
  body .adv300x250 {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 10px 0 !important;
    box-sizing: border-box !important;
  }

  body .adv300x250 ins,
  body ins.adsbygoogle,
  body .fb-like-box,
  body .fb-like-box iframe {
    max-width: 100% !important;
  }

  /* Editor picks + new games: 3 covers per row */
  body .editorgames,
  body .newgames,
  body .blockcontent {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px 6px !important;
    width: 100% !important;
  }

  body .newgames > h2,
  body .editorgames > h2,
  body .newgames > div,
  body .editorgames > div {
    grid-column: 1 / -1 !important;
  }

  body .editorgames > .clearfix,
  body .newgames > .clearfix,
  body .blockcontent > .clearfix {
    display: none !important;
  }

  /* Name list under the two covers — full row, not a third grid cell */
  body .blockcontent > ul,
  body .blockcontent > .minilist {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin: 4px 0 0 0 !important;
    box-sizing: border-box !important;
  }

  body ul.minilist li {
    margin-left: 0 !important;
    padding: 8px 8px 8px 24px !important;
    box-sizing: border-box !important;
  }

  body .editorgames > a,
  body .newgames > a,
  body .blockcontent > a {
    display: block !important;
    min-width: 0 !important;
    width: auto !important;
  }

  body .blockcontent {
    padding: 8px 0 !important;
    border: none !important;
    box-sizing: border-box !important;
  }

  body span.item,
  body span.item2 {
    float: none !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 4px 4px 6px 4px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
  }

  body .qtitem {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  body .itembg {
    display: none !important;
  }

  body .item img,
  body .item2 img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 4px !important;
  }

  body .item h2,
  body .item2 h2 {
    width: 100% !important;
    height: 2.4em !important;
    margin: 4px 0 0 0 !important;
    padding: 0 2px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body .sidebar .categories li a {
    height: auto !important;
    padding: 10px 8px !important;
    box-sizing: border-box !important;
  }

  body .footerblock {
    width: 100% !important;
    float: none !important;
    box-sizing: border-box !important;
  }
}

@media screen and (min-width: 769px) and (max-width: 980px) {
  body .headerbg,
  body .headerwrapper,
  body .wrapper,
  body .footer,
  body .container,
  body .catarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body .headerbg,
  body .headerwrapper {
    height: auto !important;
  }

  body .editorgames,
  body .windowarea,
  body .sidebar,
  body .adv300x250,
  body .block {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }
}
