/* ============================================================
   menu.css — стили компонента навигации (BEM)
   Сущность: components/menu.tpl
   ============================================================ */

/* === JS-DEPENDENT: следующие классы нельзя переименовывать ===
   - .navbar на <nav>:         Bootstrap dropdown JS ищет предка .navbar чтобы
                               отключить Popper.js (static mobile / absolute desktop)
   - .navbar-collapse на div:  lib.js закрывает $(".navbar-collapse").removeClass("show")
                               — при нажатии btn-close и клавиши ESC
   - .btn-close на кнопке:     lib.js: $(".btn-close").click(...) закрывает offcanvas
   - .dropdown на <li>:        Bootstrap dropdown JS
   - .dropdown-menu на <div>:  Bootstrap dropdown JS
   ============================================================ */

.shapka {
  position: -webkit-sticky; /* Для Safari */
  position: sticky;
  top: 0; /* Точка прилипания к верху */
  z-index: 1000; /* Чтобы шапка была поверх контента */
}
.menu__list .dropdown-menu {
  position: static;
  float: none;
}

@media (max-width: 991.98px) {
  .menu__navbar .dropdown-menu {
    position: static;
    float: none;
  }
}

@media (min-width: 992px) {
  .menu__navbar .dropdown-menu {
    position: absolute;
  }
}

/* === PHP-PLUGIN: btn-login — переименование невозможно === */

/* PHP-plugin: переименование невозможно */
a.btn-login {
  background: rgba(85, 178, 253, 0.10);
  padding: 0 5px;
  color: #55b2fd;
  border-radius: 8px;
  width: 150px;
  height: 53px;
  border: 1px solid rgba(85, 178, 253, 0.28);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  display: block;
  float: left;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  line-height: 53px;
  text-align: -webkit-center;
}

a.btn-login:hover {
  background: rgba(85, 178, 253, 0.22);
  border-color: rgba(85, 178, 253, 0.65);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(85, 178, 253, 0.35), 0 4px 12px rgba(85, 178, 253, 0.20);
  transform: translateY(-2px);
}

a.btn-login:active {
  background: rgba(85, 178, 253, 0.30);
  border-color: rgba(85, 178, 253, 0.80);
  color: #fff;
  box-shadow: 0 0 8px rgba(85, 178, 253, 0.20);
  transform: translateY(0);
  text-decoration: none;
}

/* === PHP-PLUGIN: nav-link / dropdown-item в navbar (catmenu + {login}) === */

/* PHP-plugin: переименование невозможно */
.menu__navbar .nav-link {
  color: #adb7be;
  text-decoration: none;
}

.menu__navbar .nav-link:hover,
.menu__navbar .nav-link:focus {
  color: #fff;
  text-decoration: none;
}

/* PHP-plugin: переименование невозможно */
.menu__navbar .dropdown-item {
  color: #adb7be;
  text-decoration: none;
}

.menu__navbar .dropdown-item:hover,
.menu__navbar .dropdown-item:focus {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

/* === КНОПКА "НАЧАТЬ ИГРУ" === */

@-webkit-keyframes pulse {
  from, to {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }
  50% {
    -webkit-transform: scale3d(1.05, 1.05, 1.05);
    transform: scale3d(1.05, 1.05, 1.05);
  }
}

@keyframes pulse {
  from, to {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }
  50% {
    -webkit-transform: scale3d(1.05, 1.05, 1.05);
    transform: scale3d(1.05, 1.05, 1.05);
  }
}

.menu__btn-start {
  background: rgba(85, 178, 253, 0.12);
  margin-top: 15px;
  margin-right: 10px;
  padding: 5px 5px;
  color: #55b2fd;
  border-radius: 8px;
  width: 130px;
  height: 45px;
  border: 1px solid rgba(85, 178, 253, 0.38);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 35px;
  display: block;
  text-align: -webkit-center;
  float: left;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  -webkit-animation: pulse 2s infinite;
  animation: pulse 2s infinite;
}

.menu__btn-start:hover {
  background: rgba(85, 178, 253, 0.22);
  border-color: rgba(85, 178, 253, 0.65);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(85, 178, 253, 0.35), 0 4px 12px rgba(85, 178, 253, 0.20);
  transform: translateY(-2px);
  animation-play-state: paused;
}

.menu__btn-start:active {
  background: rgba(85, 178, 253, 0.30);
  border-color: rgba(85, 178, 253, 0.80);
  color: #fff;
  box-shadow: 0 0 8px rgba(85, 178, 253, 0.20);
  transform: translateY(0);
  text-decoration: none;
  animation-play-state: paused;
}

/* === NAVBAR === */

.menu__navbar {
  background-color: hsla(206, 25%, 11%, 0.7);
  box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.14);
  position: relative;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: justify;
  justify-content: space-between;
  padding: 0.25rem 1rem 0;
}

@media (min-width: 768px) {
  .menu__navbar {
    padding-bottom: 0;
  }
}

@media (min-width: 992px) {
  .menu__navbar {
    -ms-flex-flow: row nowrap;
    flex-flow: row nowrap;
    -ms-flex-pack: start;
    justify-content: flex-start;
  }
}

@media print {
  .menu__navbar {
    display: none;
  }
}

/* === CONTAINER === */

.menu__container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) {
  .menu__container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .menu__container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .menu__container {
    max-width: 960px;
    padding-top: 0;
    padding-bottom: 0;
  }
}

@media (min-width: 1200px) {
  .menu__container {
    max-width: 1328px;
  }
}

.menu__navbar .menu__container {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: justify;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

@media (max-width: 991.98px) {
  .menu__navbar .menu__container {
    padding-right: 0;
    padding-left: 0;
  }
}

@media (min-width: 992px) {
  .menu__navbar .menu__container {
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
  }
}

@media print {
  .menu__container {
    min-width: 992px !important;
  }
}

@media (min-width: 1250px) {
  .menu__container {
    max-width: 1450px;
  }
}

@media (min-width: 1400px) {
  .menu__container {
    max-width: 1600px;
  }
}

@media (min-width: 1600px) {
  .menu__container {
    max-width: 1750px;
  }
}

@media (min-width: 1800px) {
  .menu__container {
    max-width: 1900px;
  }
}

@media (min-width: 2000px) {
  .menu__container {
    max-width: 2100px;
  }
}

@media (min-width: 2200px) {
  .menu__container {
    max-width: 2400px;
  }
}

/* === BRAND === */

.menu__brand {
  display: inline-block;
  padding-top: 0.3125rem;
  padding-bottom: 0.3125rem;
  margin-right: 1rem;
  font-size: 1.25rem;
  line-height: inherit;
  white-space: nowrap;
  color: #fff;
  text-transform: uppercase;
}

.menu__brand:hover,
.menu__brand:focus {
  text-decoration: none;
  color: #fff;
}

/* === TOGGLER === */

.menu__toggler {
  padding: 0.25rem 0.75rem;
  font-size: 1.25rem;
  line-height: 1;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(90, 185, 234, 0.2);
  border-radius: 0.25rem;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.menu__toggler:hover,
.menu__toggler:focus {
  text-decoration: none;
}

@media (min-width: 992px) {
  .menu__toggler {
    display: none;
  }
}

.menu__toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  content: "";
  background: 50% / 100% 100% no-repeat;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* === COLLAPSE (мобильный offcanvas) === */

.menu__collapse {
  -ms-flex-preferred-size: 100%;
  flex-basis: 100%;
  -ms-flex-positive: 1;
  flex-grow: 1;
  -ms-flex-align: center;
  align-items: center;
}

@media (max-width: 991.98px) {
  .menu__collapse {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 100%;
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    overflow-y: auto;
    visibility: hidden;
    z-index: 99;
    background-color: hsla(240, 7%, 12%, 0.95);
    transition: visibility .2s ease-in-out, transform .2s ease-in-out;
  }

  .menu__collapse.show {
    visibility: visible;
    transform: translateX(-100%);
  }
}

@media (min-width: 992px) {
  .menu__collapse {
    display: -ms-flexbox !important;
    display: flex !important;
    -ms-flex-preferred-size: auto;
    flex-basis: auto;
  }
}

/* === OFFCANVAS HEADER === */

.menu__offcanvas {
  display: none;
  border-bottom: 1px solid #333a5a;
  margin-top: 1rem;
}

@media (max-width: 991.98px) {
  .menu__offcanvas {
    display: block;
  }
}

/* === CLOSE BUTTON === */

.menu__close {
  float: right;
  background-color: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(90, 185, 234, 0.2);
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
}

/* === OFFCANVAS TITLE === */

.menu__offcanvas-title {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  color: #fff;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
}

/* === NAV LISTS === */

.menu__list {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

@media (min-width: 992px) {
  .menu__list {
    -ms-flex-direction: row;
    flex-direction: row;
    margin-right: auto;
  }

  .menu__list--right {
    margin-right: 0;
    margin-left: auto;
  }
}

/* === NAV ITEMS === */

.menu__item--dropdown {
  position: relative;
}

/* === NAV LINKS === */

.menu__link {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  padding: 0.5rem 0.5rem;
  position: relative;
  transition: color 0.3s ease;
  color: #adb7be;
  text-decoration: none;
}

@media (min-width: 768px) {
  .menu__link {
    padding: 1.5rem;
  }
}

.menu__link:hover,
.menu__link:focus {
  color: #fff;
  text-decoration: none;
}

.menu__link::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #fe666f;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.menu__link:hover::after {
  width: calc(100% - 32px);
}

.menu__link--highlight {
  color: #fe666f;
}

.menu__link--highlight:hover,
.menu__link--highlight:focus {
  color: #fe666f;
}

/* === ICONS === */

.menu__icon {
  width: 16px;
  height: 16px;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: nowrap;
  flex-wrap: nowrap;
  -ms-flex-align: center;
  align-items: center;
  border-radius: 50%;
  margin-right: 8px;
  color: #ffc107;
}

.menu__icon svg {
  display: block;
}

/* === DROPDOWN ITEMS === */

.menu__dropdown-item {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  width: 100%;
  padding: 0.5rem 1.5rem;
  clear: both;
  font-weight: 400;
  text-align: inherit;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
  color: #adb7be;
  text-decoration: none;
}

.menu__dropdown-item:hover,
.menu__dropdown-item:focus {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.menu__dropdown-text {
  margin-right: 1.5rem;
}

/* === ADAPTIVE ITEMS (скрытые по умолчанию) === */

.menu__item--show-1250,
.menu__item--show-1400,
.menu__item--show-1600,
.menu__item--show-1800,
.menu__item--show-2000 {
  display: none !important;
}

@media (min-width: 1250px) {
  .menu__item--show-1250 {
    display: block !important;
  }

  .dropdown-hide-1250 {
    display: none !important;
  }
}

@media (min-width: 1400px) {
  .menu__item--show-1400 {
    display: block !important;
  }

  .dropdown-hide-1400 {
    display: none !important;
  }
}

@media (min-width: 1600px) {
  .menu__item--show-1600 {
    display: block !important;
  }

  .dropdown-hide-1600 {
    display: none !important;
  }
}

@media (min-width: 1800px) {
  .menu__item--show-1800 {
    display: block !important;
  }

  .dropdown-hide-1800 {
    display: none !important;
  }
}

@media (min-width: 2000px) {
  .menu__item--show-2000 {
    display: block !important;
  }

  .dropdown-hide-2000 {
    display: none !important;
  }
}

/* === START BUTTON ICON === */

.menu__icon-start {
  width: 21px;
  height: 21px;
  background: url("../../icons/ic22.png") no-repeat;
  background-size: contain;
  float: left;
  margin-top: 8px;
}

/* === OFFCANVAS ACTIVE (JS-хук: lib.js toggleClass) === */
body.offcanvas-active {
  overflow: hidden;
}
