/*
 * Responsive hardening for public/template/default.
 * This file is loaded after public.css + home.css and only overrides layout behaviour.
 */

html {
    overflow-x: hidden;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    min-width: 320px;
}

.wrapper,
main,
.header,
.footer,
#main,
#content,
#social-network,
.news_block,
#server-status,
.server-block,
.swiper-container,
.swiper-main {
    min-width: 0;
}

img,
svg,
video,
iframe {
    max-width: 100%;
}

.wrap {
    width: min(1320px, 100%) !important;
    max-width: 1320px;
    box-sizing: border-box;
    padding-left: clamp(14px, 2.2vw, 30px) !important;
    padding-right: clamp(14px, 2.2vw, 30px) !important;
}

.top_line {
    gap: clamp(10px, 2vw, 25px);
    min-width: 0;
}

.top_menu,
.top_right,
.top--right-menu,
.acp-panel-top,
.nav__langs {
    min-width: 0;
}

.nav-link,
.btn-red,
.btn-golden,
.nav__langs-item {
    white-space: nowrap;
}

.nav__langs-stroke {
    z-index: 10020;
}

.main_content_all {
    align-items: stretch;
    min-width: 0;
}

.news_block,
#server-status {
    min-width: 0;
}

#server-status {
    display: block;
}

.server-block {
    width: 100%;
    overflow: hidden;
}

.server_item,
.server-i-top,
.server_t {
    min-width: 0;
}

.server_title,
.server_t a,
.sisic__title,
.sisic__text {
    overflow-wrap: anywhere;
}

.swiper-main {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
}

.swiper-slide img {
    object-fit: cover;
}

.subs-all,
.footer_all,
.banners_rating,
.news_all,
.server_about_all,
.main-lore__item-buttons {
    min-width: 0;
}

@media only screen and (max-width: 1360px) {
    .top_menu {
        gap: 16px;
    }

    .nav-link {
        font-size: 16px;
    }

    .nav-link svg {
        width: 19px;
        height: 19px;
        flex: 0 0 auto;
    }

    .top_right,
    .top--right-menu {
        gap: 14px;
    }

    .logo img {
        height: 260px;
    }

    .logo1 img {
        height: 400px;
        margin-top: -285px;
    }
}

@media only screen and (max-width: 1180px) {
    .top_menu {
        gap: 12px;
    }

    .nav-link {
        font-size: 14px;
        gap: 5px;
    }

    .nav-link svg {
        width: 17px;
        height: 17px;
    }

    .btn-red,
    .btn-golden,
    .dropdown-toggle,
    .nav__langs-item {
        height: 32px;
        font-size: 12px;
    }

    .btn-red,
    .btn-golden,
    .dropdown-toggle {
        padding-left: 14px;
        padding-right: 14px;
    }

    .nav__langs-item {
        gap: 6px;
    }

    .nav__langs-item img {
        width: 20px;
    }

    .logo img {
        height: 235px;
    }

    .logo1 img {
        height: 350px;
        margin-top: -250px;
    }

    .main_content_all {
        gap: 16px;
    }

    .server_title {
        font-size: 13px;
    }

    .server_t a {
        font-size: 12px;
    }

    .server_brand {
        left: 8px;
        right: 8px;
        gap: 6px;
    }
}

@media only screen and (max-width: 1024px) {
    header.header {
        position: sticky;
        top: 0;
        z-index: 10000;
    }

    .top_line {
        min-height: 52px;
    }

    .gw-burger,
    .navigation__burger {
        display: block !important;
        flex: 0 0 40px;
    }

    .top_menu {
        max-width: calc(100vw - 34px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-bottom: 28px;
    }

    .top_menu .nav-item {
        width: 100%;
    }

    .top_menu .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 0;
        font-size: 17px;
    }

    .top_menu .nav-link svg {
        width: 20px;
        height: 20px;
    }

    .top_right {
        margin-left: auto;
        gap: 12px;
    }

    .main_content_all {
        flex-direction: column !important;
        gap: 20px;
        margin-top: 0 !important;
    }

    #server-status {
        order: 1;
    }

    .news_block {
        order: 2;
    }

    .news_block,
    #server-status {
        width: 100% !important;
    }

    .swiper-main {
        height: clamp(230px, 38vw, 340px) !important;
    }

    .server-block {
        height: auto !important;
        min-height: 0;
    }

    .server_item {
        width: 50% !important;
        min-height: 140px;
    }

    .server-i-top {
        padding-top: 50px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .logo1 {
        position: static !important;
        text-align: center !important;
        margin-top: 0 !important;
    }

    .logo1 img {
        height: min(330px, 45vw) !important;
        margin-top: 0 !important;
    }

    .main-start {
        margin-top: -20px !important;
    }

    .main-text p {
        margin-top: 0 !important;
    }

    .footer_all {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 30px;
    }

    .menu-footer {
        width: auto !important;
        margin-bottom: 0 !important;
    }
}

@media only screen and (max-width: 820px) {
    .wrap {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .top--right-menu .nav-item {
        display: none;
    }

    .btn-red {
        height: 32px;
        padding-left: 12px;
        padding-right: 12px;
        font-size: 12px;
    }

    .nav__langs-item {
        height: 32px;
    }

    .logo img {
        height: clamp(160px, 31vw, 220px) !important;
    }

    .logo1 img {
        height: min(285px, 43vw) !important;
    }

    .btn-wrapper {
        margin-top: 26px;
        margin-bottom: 36px;
    }

    .btn-main {
        padding: 18px 34px;
    }

    .swiper-info {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .sisic__title {
        font-size: 20px;
        line-height: 1.15;
    }

    .sisic__text {
        font-size: 14px;
        line-height: 1.35;
        margin-bottom: 18px;
    }

    .subscribers {
        margin: 34px 0;
    }

    .sub_item {
        height: 154px;
        padding-left: 20px;
    }

    .sub_item > img {
        max-width: 46px;
    }

    .sub-title p {
        font-size: 15px;
    }

    .video-panel {
        width: 82%;
        max-width: none;
        top: 58px;
        padding: 14px;
    }
}

@media only screen and (max-width: 675px) {
    .wrap {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .top_line {
        gap: 8px;
    }

    .top_right {
        gap: 8px;
    }

    .btn-red {
        min-width: 0;
        padding-left: 10px;
        padding-right: 10px;
    }

    .server_item {
        width: 100% !important;
        min-height: 126px;
        border-right: 0 !important;
        border-bottom: 1px solid rgb(255 255 255 / 20%) !important;
    }

    .server_item:last-child {
        border-bottom: 0 !important;
    }

    .server-i-top {
        padding-top: 48px;
        padding-left: 12px;
        padding-right: 12px;
        gap: 8px;
    }

    .server_img {
        width: 72px;
        height: 72px;
        flex: 0 0 72px;
    }

    .server_img img {
        max-width: 44px;
    }

    .server_brand {
        align-items: flex-start;
    }

    .server-status-switch {
        right: 12px;
    }

    .swiper-main {
        height: auto !important;
        aspect-ratio: 16 / 10;
        min-height: 230px;
        max-height: 310px;
    }

    .swiper-info {
        position: absolute !important;
        left: 14px !important;
        right: 14px !important;
        bottom: 14px !important;
        padding: 0 !important;
        text-align: left !important;
        align-items: flex-start !important;
    }

    .sisic__title {
        font-size: 18px;
    }

    .sisic__text {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 14px;
    }

    .swiper-pagination {
        bottom: 12px !important;
        right: 12px !important;
        left: auto !important;
        width: auto !important;
        text-align: right !important;
    }

    .swiper-pagination-bullet {
        width: 9px !important;
        height: 9px !important;
        margin: 0 4px !important;
    }

    .btn-golden {
        height: 32px;
        padding-left: 14px;
        padding-right: 14px;
        font-size: 12px;
    }

    #content {
        padding: 30px 0 46px !important;
    }

    .logo1 {
        display: none !important;
    }

    .main-start {
        margin-top: 0 !important;
    }

    .main-text p {
        font-size: 20px;
    }

    .subs-all {
        gap: 16px;
    }

    .sub_item {
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .footer {
        padding-top: 24px;
    }
}

@media only screen and (max-width: 520px) {
    .top--right-menu {
        gap: 0;
    }

    .top--right-menu .btn-red {
        display: none;
    }

    .nav__langs-item {
        font-size: 11px;
        padding-left: 5px;
        padding-right: 5px;
    }

    .nav__langs-item img {
        width: 18px;
    }

    .nav__langs-stroke {
        right: 0;
    }

    .logo img {
        height: clamp(124px, 33vw, 160px) !important;
    }

    .btn-wrapper {
        margin-top: 18px;
        margin-bottom: 28px;
    }

    .btn-main {
        padding: 15px 25px;
        border-radius: 14px;
    }

    .btn-main .text {
        font-size: 14px;
    }

    .server_title {
        font-size: 12px;
    }

    .server_t a {
        font-size: 11px;
    }

    .server-brand-i {
        font-size: 9px;
    }

    .swiper-main {
        aspect-ratio: 4 / 3;
        min-height: 224px;
    }

    .sisic__title {
        font-size: 16px;
    }

    .sisic__text {
        font-size: 12px;
    }

    .sub_item {
        height: 142px;
        padding: 16px;
    }

    .footer_all {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }

    .menu-footer {
        align-items: center;
    }

    .banners_rating {
        grid-template-columns: repeat(2, minmax(0, auto));
        justify-content: center;
    }

    .copyright {
        padding-bottom: 0 !important;
    }

    .video-toggle-btn {
        left: 8px;
        transform: translateX(-30%);
    }

    .video-toggle-btn img {
        width: 48px;
    }

    .video-panel {
        width: 100% !important;
        top: 56px !important;
        padding: 12px !important;
    }
}

@media only screen and (max-width: 380px) {
    .wrap {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .top_line {
        gap: 6px;
    }

    .gw-burger {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .server_img {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }

    .server_img img {
        max-width: 38px;
    }

    .server_online_count span {
        font-size: 13px;
    }

    .server_online_count p {
        font-size: 10px;
    }

    .sisic__title {
        font-size: 15px;
    }

    .btn-golden {
        height: 30px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .main-text p {
        font-size: 18px;
    }
}

@media only screen and (orientation: landscape) and (max-height: 520px) {
    .top_menu {
        padding-top: 56px;
    }

    .logo img {
        height: 120px !important;
    }

    .btn-wrapper {
        margin-top: 14px;
        margin-bottom: 22px;
    }

    .swiper-main {
        min-height: 210px;
        max-height: 260px;
    }

    .video-panel {
        top: 0 !important;
        height: 100% !important;
    }
}

/* Inner pages */
.news_all {
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.news_img {
    height: clamp(170px, 22vw, 220px);
}

.text-block,
.startgame_container,
.about_block {
    max-width: 100%;
}

.startgame_container p {
    max-width: min(800px, 100%);
}
