/* ==========================================================
   responsive.css
   Makes the site adapt to phone / tablet / desktop screens.
   Loaded AFTER style.css so these rules override it.
   ========================================================== */

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

/* Wide tables scroll inside their block instead of breaking the page */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.content-page {
    word-wrap: break-word;
}

/* ================= Small desktops (<=1250px) ================= */
@media (max-width: 1250px) {
    .wrapper,
    .topPanel-wrapper {
        width: 100%;
        max-width: 1200px;
    }
    .nav li a {
        padding: 0 18px;
    }
    .nav .sub-menu a {
        padding: 0 30px 0 18px;
    }
    .sub-menu:before {
        right: 12px;
    }
    .sign-in {
        padding-right: 40px;
    }
    .sign-in:after {
        right: -8px;
    }
}

/* ================= Tablets (<=1024px) ================= */
@media (max-width: 1024px) {
    .main {
        display: block;
        margin-bottom: 80px;
    }
    aside {
        max-width: 100%;
        margin-bottom: 25px;
    }
    .content {
        width: 100%;
    }
    .blockHome,
    .blockHome2,
    .socHome,
    .socButton,
    .socBlock {
        width: 100%;
    }
    .blockHome2 {
        margin-right: 0;
    }
    .mainHomeBlock > div {
        height: auto;
        min-height: 0;
        margin-bottom: 20px;
    }
    .tableBlock-content {
        width: calc(100% + 70px);
        margin-left: -35px;
    }
    .socBlock {
        background-size: cover;
    }
}

/* ================= Mobile navigation (<=991px) =================
   The menu sits under the logo and wraps into rows automatically.
   Tapping "Rank" opens its options in a dropdown BELOW it,
   exactly like the desktop behaviour. */
@media (max-width: 991px) {
    .topPanel-wrapper {
        padding: 10px 15px;
    }
    .topPanel-left {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
    }
    .topPanel-right {
        flex: 0 0 auto;
        align-self: flex-start;
        padding-left: 10px;
    }
    .sign-in {
        padding-right: 0;
        font-size: 16px;
    }
    .sign-in:after {
        display: none;
    }
    .nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        margin-top: 6px;
        padding: 4px 10px !important;
        position: relative;
        z-index: 25;
    }
    .nav li {
        display: inline-block;
        width: auto;
        flex: 0 0 auto;
    }
    .nav li a {
        display: block;
        height: auto;
        line-height: 38px;
        padding: 0 14px !important;
        font-size: 14px;
        white-space: nowrap;
    }
    .nav li.sub-menu > a {
        position: relative;
    }
    /* Leave room for the little arrow on the Rank item */
    .nav .sub-menu > a {
        padding: 0 28px 0 14px !important;
    }
    /* Rank dropdown - slides in BELOW the menu bar when tapped,
       exactly like the desktop dropdown but full-width so it can
       never go off-screen on small phones. */
    .nav li.sub-menu {
        position: static;
    }
    .nav li ul {
        left: 0;
        right: 0;
        top: 100%;
        min-width: 0;
        padding: 6px 0;
        background: rgba(7, 10, 17, 0.98);
        border-radius: 0 0 10px 10px;
        box-shadow: 0 12px 22px rgba(0, 0, 0, 0.55);
        z-index: 30;
    }
    .nav li ul li a,
    .nav li ul li:hover a {
        height: auto;
        line-height: 1.3;
        padding: 12px 18px 12px 36px !important;
        font-size: 14px;
        background-position: left 12px center !important;
    }
    .nav li ul li:after {
        display: none;
    }
    /* Arrow indicator drawn on the Rank link itself
       (the li is static so the dropdown can span the whole bar) */
    .sub-menu:before {
        display: none;
    }
    .sub-menu > a:after {
        content: "";
        position: absolute;
        background: url(../images/drop-icon.png) no-repeat;
        width: 12px;
        height: 8px;
        right: 8px;
        top: 50%;
        margin-top: -4px;
        transition: transform 0.25s ease;
    }
    .sub-menu.active > a:after {
        transform: rotate(180deg);
    }
    .sub-menu.active > a {
        color: #cc7954 !important;
    }
    header {
        padding-top: 150px;
    }
}

/* ================= Phones (<=768px) ================= */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }

    /* Header / hero */
    header {
        height: auto;
        padding: 150px 0 40px;
    }
    .register header {
        height: auto;
        padding: 150px 0 30px;
    }
    .hand-animation {
        top: 110px;
        margin-left: -125px;
        transform: scale(0.7);
        transform-origin: top center;
    }
    .sparks {
        display: none;
    }
    .online {
        position: relative;
        bottom: auto;
        margin-top: 100px;
    }
    .online > .onlineBlock {
        width: 240px;
        height: 190px;
        padding-top: 10px;
        background-size: contain;
        background-position: bottom center;
    }
    .online .onlineBlock span {
        font-size: 28px;
        letter-spacing: 4px;
    }
    .download {
        position: static;
        margin-top: 30px;
        text-align: center;
    }
    .download-button {
        display: inline-block;
        width: 320px;
        max-width: 100%;
        height: 238px;
        background-size: contain;
        background-position: center top;
        padding: 83px 0 0 130px;
        margin: 0 auto !important;
        font-size: 16px;
        letter-spacing: 2px;
    }
    .more-downloads {
        position: static;
        top: 0;
        margin-top: 12px;
    }
    .more-downloads a {
        display: inline-block;
        margin: 0 10px;
    }

    /* Home top blocks */
    .block-50 {
        width: 100%;
        height: auto;
        min-height: 0;
        margin-bottom: 15px;
    }
    .newsSlider.block-50 {
        height: 300px;
        min-height: 300px;
    }
    .newsBlock {
        padding: 25px 18px;
    }
    .swiper-news_info {
        width: 100%;
        padding: 0 15px 20px;
        background: none;
    }
    .swiper-news_info span {
        width: 100%;
        font-size: 30px;
    }
    .swiper-news_info p {
        width: 100%;
        font-size: 15px;
    }
    .swiper-news-pagination {
        right: 12px;
        bottom: 12px;
    }
    .newsLink {
        padding-left: 35px;
    }
    .newsLink:after {
        display: none;
    }
    .newsLink-info a {
        width: auto;
        max-width: calc(100% - 50px);
    }

    /* Home blocks / aside */
    .blockHome {
        padding: 25px 18px;
    }
    .mainHomeBlock > div {
        margin-bottom: 20px;
    }
    .tableBlock-content {
        width: calc(100% + 36px);
        margin-left: -18px;
    }

    /* Social buttons */
    .socButton {
        padding-left: 85px;
        font-size: 24px;
    }
    .socButton:hover {
        padding-left: 95px;
    }

    /* Inner pages */
    .content {
        padding: 22px 15px;
    }
    .table-row {
        margin-right: -15px;
        margin-left: -15px;
    }
    table td {
        padding: 12px 10px;
        font-size: 13px;
    }
    .rankingTable td:first-child {
        padding-left: 15px;
    }
    .rankingTable td:last-child {
        padding-right: 15px;
    }
    .downloadBlock {
        padding: 30px 22px 40px;
    }

    /* Profile / hero */
    .block-6 {
        width: 100%;
        margin-bottom: 15px;
    }
    .heroLeft-img {
        height: 230px;
    }
    .heroName {
        height: 62px;
        font-size: 20px;
    }
    .flexBlock {
        height: 62px;
        font-size: 20px;
    }
    .content .heroLeft-button {
        width: 100% !important;
        max-width: 346px;
    }
    .supportButtons {
        flex-wrap: wrap !important;
    }
    .supportButtons .button {
        margin-bottom: 10px;
    }

    /* Forms & modal */
    .accBlock.flex-s {
        display: block;
    }
    .accBlock-content {
        width: 100%;
    }
    .big-button-blue {
        width: 100%;
        max-width: 346px;
    }
    .modal_div {
        left: 12px;
        right: 12px;
        width: auto;
        margin-left: 0;
        padding: 40px 22px;
    }
    .modal_div .modal_close {
        width: 40px;
        height: 40px;
        top: -20px;
        right: -6px;
        background-size: contain;
    }
    .enterButtons a {
        width: 100%;
        max-width: 346px;
    }

    /* Register page */
    .mainRegister {
        display: block;
    }
    .blockR {
        margin: 13px 0;
    }
    .regBlock {
        padding: 40px 25px;
    }
    .s-acc {
        padding: 25px 20px;
    }

    /* Misc */
    .toTop {
        display: none;
    }
    .r-wiki,
    .r-shop,
    .r-forum {
        display: none;
    }
}

/* ================= Small phones (<=480px) ================= */
@media (max-width: 480px) {
    .wrapper {
        padding: 0 10px;
    }
    .topPanel-wrapper {
        padding: 8px 10px;
    }
    .content {
        padding: 18px 12px;
    }
    .newsBlock {
        padding: 20px 12px;
    }
    .blockHome,
    .regBlock {
        padding: 20px 12px;
    }
    .tableBlock-content {
        width: calc(100% + 24px);
        margin-left: -12px;
    }
    .download-button {
        width: 250px;
        height: 186px;
        padding: 65px 0 0 102px;
        font-size: 14px;
        letter-spacing: 1px;
    }
    .download-button span {
        font-size: 12px;
    }
    .online > .onlineBlock {
        width: 210px;
        height: 168px;
    }
    .online .onlineBlock span {
        font-size: 24px;
    }
    .swiper-news_info span {
        font-size: 26px;
    }
    .modal_div {
        padding: 30px 15px;
    }
    h1 {
        font-size: 18px;
    }
    .topTitle {
        font-size: 15px;
    }
}
