/* =========================================================
 * Sigma World Online — responsive fixes
 * Loaded AFTER blk-design-system.css + demo.css to override
 * the fixed/zoomed customisations of the template.
 * ========================================================= */

/* --- never allow a horizontal scrollbar --------------------------------- */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* --- kill the zoom hack (index hero, pay.php form/button) --------------- */
[style*="zoom"] {
  zoom: 1 !important;
}

/* --- media must stay inside its container ------------------------------- */
img,
video,
iframe {
  max-width: 100%;
  height: auto;
}
.mySlides img,
.slideshow-container img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- hero / page-header: let content flow instead of being absolutely
       centred inside a clipped 60vh box ------------------------------------ */
.landing-page .page-header {
  min-height: auto;   /* was 100vh -> left a huge empty band once un-zoomed */
  height: auto;
  display: block;
}
.landing-page .page-header .content-center,
.landing-page .page-header > .container {
  position: relative;
  top: auto;
  left: auto;
  -webkit-transform: none;
  transform: none;
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 120px;   /* clear the fixed navbar */
  padding-bottom: 50px;
}

/* news.php / wiki.php already pad with <br>'s — don't double it there */
.landing-page .page-header > .container {
  padding-top: 40px;
}

/* --- stat cards: keep them visible & readable on phones ---------------- */
.card-stats .card-body .row {
  align-items: center;
}
.card-stats .numbers,
.card-stats .numbers p,
.card-stats .card-title,
.card-stats .card-category {
  text-align: left !important;
}
@media (max-width: 575.98px) {
  .card-stats .card-title {
    font-size: 1.4rem;
    line-height: 1.2;
  }
  .card-stats .card-category {
    font-size: .8rem;
  }
  .card-stats .card-body {
    padding: 12px;
  }
}

/* the desktop "big" look the old zoom:1.5 was faking */
@media (min-width: 992px) {
  .page-header .content-center .card-title {
    font-size: 2.2rem;
  }
}

/* --- navbar -------------------------------------------------------------- */
/* mobile: neutralise the desktop vertical nudges in the stacked menu */
@media (max-width: 991.98px) {
  .navbar .navbar-nav [style*="top"] {
    top: 0 !important;
  }
  .navbar .navbar-nav .nav-item {
    padding: 4px 0;
  }
}
/* desktop: the whole right-hand group (flag, socials, "Меню", "Играть")
   used inconsistent inline top:-16 / top:8 / top:16 nudges, so the items
   sat at 3 different heights. Neutralise them all and let flexbox put
   everything on one vertically-centred line. */
@media (min-width: 992px) {
  .navbar .navbar-nav {
    align-items: center;
  }
  .navbar .navbar-nav .nav-link[style*="top"] {
    top: 0 !important;
  }
  /* flag + Discord/Telegram/VK live inside one <li>; center them as a row */
  .navbar .navbar-nav .nav-item.p-0 {
    display: flex;
    align-items: center;
  }
  .navbar .navbar-nav .nav-item.p-0 > a.nav-link {
    top: 0 !important;
    display: inline-flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
  }
  .navbar .navbar-nav .nav-item.p-0 > a.nav-link img {
    width: 34px !important;
    vertical-align: middle;
  }
  /* standalone "Играть" button */
  .navbar .navbar-nav > .nav-item > a.nav-link.btn {
    top: 0 !important;
    margin: 0 0 0 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
  }
}

/* --- dropdown "Меню": give every item the same icon column so the
       Steam item's text no longer sits further left / looks washed out --- */
.dropdown-menu .dropdown-item > i {
  display: inline-block;
  width: 30px;
  margin-right: 8px;
  text-align: center;
  vertical-align: middle;
  color: inherit;
}
.dropdown-menu .dropdown-item > i > img {
  max-width: 24px;
  max-height: 24px;
  vertical-align: middle;
}
.dropdown-menu .dropdown-item > i.fab,
.dropdown-menu .dropdown-item > i.fas,
.dropdown-menu .dropdown-item > i.fa {
  font-size: 22px;
  line-height: 1;
  color: #1b2838;   /* solid, so it doesn't look washed-out next to the image icons */
}
.dropdown-menu .dropdown-item:hover > i.fab,
.dropdown-menu .dropdown-item:focus > i.fab {
  color: #0b0f14;
}

/* very narrow phones: keep logo + brand + burger on one line */
@media (max-width: 400px) {
  .navbar .navbar-brand {
    font-size: .85rem;
    line-height: 1.1;
    max-width: calc(100% - 60px);
  }
  .navbar .navbar-brand img {
    width: 40px !important;
    height: auto;
  }
}

/* --- news / wiki two-column rows: drop the stray <br>, stack cleanly --- */
.row > br {
  display: none;
}
@media (max-width: 767.98px) {
  .row > [class*="col-md-2"],
  .row > [class*="col-md-10"] {
    margin-bottom: .75rem;
  }
}

/* --- wide tables (wiki) scroll instead of blowing out the layout ------- */
.table-responsive {
  display: block;
  width: 100% !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- footer: centre the columns on small screens --------------------- */
@media (max-width: 767.98px) {
  .footer .row > [class*="col-"] {
    text-align: center;
    margin-bottom: 1rem;
  }
  .footer .btn-wrapper.profile {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* --- generic guard: long words / URLs don't force the page wider ------ */
p,
h1, h2, h3, h4, h5,
.card-title,
.list-group-item {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
