/*
 * Site-specific presentation rules kept outside the InstantCMS layout so that
 * CMS updates do not overwrite them.
 */

.pt-2,
.py-2 {
    padding-top: 1.2rem !important;
}
.text-muted {
    margin-bottom: 14px !important;
}

@font-face {
    font-family: 'GRIND';
    src: url('/upload/grind.ttf') format('truetype');
    font-display: swap;
}

.tournament-schedule-meta a {
    display: block;
    font-size: 15px !important;
    text-transform: uppercase;
    font-weight: 800;
    padding: 5px !important;
    line-height: 1;
    margin-left: 10px;
}

.icms-body-toolbox h1 {
    font-size: 2.34375rem;
    font-weight: 500;
    line-height: 1.2;
}

/* The language control belongs to the dark site header, not to Bootstrap's
 * generic yellow "warning" palette. */
.maxdps-language-toggle {
    color: #ff5008 !important;
}

.maxdps-language-toggle:hover,
.maxdps-language-toggle:focus {
    color: #ffffff !important;
}

/* Keep expansion titles legible over both bright and dark tile artwork without
 * interfering with the distressed edges of the display font. */
.edgt-frame-banner .edgt-frame-banner-inner .edgt-iwt-text {
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.95),
        0 0 7px rgba(0, 0, 0, 0.78);
}

/* Homepage header. Internal pages retain their original InstantCMS header. */
.third-header-bg {
    position: relative;
    z-index: 9;
    color: #edeaea;
}

.third-header-bg .bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url('/upload/newstyle/header2.jpg') center / cover no-repeat;
}

.third-header-bg .custom-container {
    width: 100%;
    max-width: 1330px;
    margin: 0 auto;
    padding-right: 15px;
    padding-left: 15px;
}

.third-header-bg .t-header-top-area {
    padding: 14px 0;
    border-bottom: 1px solid rgba(50, 49, 49, 0.7);
}

.third-header-bg .header-top-social ul,
.third-header-bg .header-top-login ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.third-header-bg .header-top-social li,
.third-header-bg .header-top-login li {
    margin: 0;
    color: #a5a5a5;
    font-size: 12px;
}

.third-header-bg .header-top-social li + li,
.third-header-bg .header-top-login li + li {
    margin-left: 12px;
}

.third-header-bg .header-top-social a,
.third-header-bg .header-top-login a {
    color: #d4d4d4;
    text-decoration: none;
}

.third-header-bg .header-top-login ul {
    justify-content: flex-end;
}

.third-header-bg .main-menu nav,
.third-header-bg .navbar-wrap,
.third-header-bg .navbar-wrap ul {
    display: flex;
    align-items: center;
}

.third-header-bg .navbar-wrap {
    flex-grow: 1;
}

.third-header-bg .navbar-wrap ul {
    flex-wrap: wrap;
    margin: 0 0 0 auto;
    padding: 0;
    list-style: none;
}

.third-header-bg .navbar-wrap ul.left {
    margin-right: auto;
}

.third-header-bg .navbar-wrap ul li {
    position: relative;
}

.third-header-bg .navbar-wrap > ul > li > a {
    display: block;
    padding: 35px 0;
    color: #edeaea;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
}

.third-header-bg .navbar-wrap > ul > li + li {
    margin-left: 42px;
}

.third-header-bg .navbar-wrap > ul > li > a:hover,
.third-header-bg .navbar-wrap .submenu li > a:hover {
    color: #ee5519;
}

.third-header-bg .navbar-wrap .logo {
    position: absolute;
    top: -62px;
    left: 50%;
    z-index: 9;
    transform: translateX(-50%);
}

.third-header-bg .navbar-wrap .submenu {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: -25px;
    display: block;
    min-width: 230px;
    margin: 0;
    padding: 18px 0;
    visibility: hidden;
    border: 1px solid rgba(238, 85, 25, 0.27);
    background: #1c1f26;
    opacity: 0;
    transform: scale(1, 0);
    transform-origin: top;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.third-header-bg .navbar-wrap li:hover > .submenu {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
}

.third-header-bg .navbar-wrap .submenu a {
    display: block;
    padding: 0 25px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 40px;
    text-decoration: none;
    text-transform: uppercase;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .third-header-bg .navbar-wrap > ul > li + li {
        margin-left: 22px;
    }

    .third-header-bg .navbar-wrap > ul > li > a {
        font-size: 12px;
    }
}

.maxdps-mobile-navigation {
    position: relative;
}

.maxdps-mobile-toggle {
    display: none;
}

@media (max-width: 991.98px) {
    .third-header-bg {
        padding: 8px 0;
        background: #1c1f26;
    }

    .third-header-bg .bg {
        display: none;
    }

    .third-header-bg .main-menu nav {
        position: relative;
        min-height: 46px;
    }

    .third-header-bg .main-menu .logo {
        position: relative;
        top: 0;
        left: 0;
        display: block !important;
        width: auto !important;
        margin: 0;
        transform: none;
    }

    .third-header-bg .main-menu .logo img {
        display: block;
        width: 46px;
        height: 46px;
        object-fit: contain;
    }

    .third-header-bg .main-menu .logo + .logo {
        position: absolute;
        top: 50%;
        right: 58px;
        left: auto;
        width: auto !important;
        float: none !important;
        margin: 0;
        transform: translateY(-50%);
    }

    .third-header-bg .main-menu .logo + .logo ul {
        position: static !important;
        float: none !important;
        display: flex;
        align-items: center;
        height: 34px;
    }

    .third-header-bg .main-menu .logo + .logo .nav-link {
        display: flex;
        height: 34px;
        padding: 0 !important;
        align-items: center;
        line-height: 1;
    }

    .maxdps-mobile-toggle {
        position: absolute;
        top: -43px;
        right: 0;
        display: flex;
        width: 40px;
        height: 40px;
        padding: 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: 1px solid rgba(255, 255, 255, 0.62);
        border-radius: 5px;
        background: rgba(0, 0, 0, 0.15);
        cursor: pointer;
        appearance: none;
    }

    .maxdps-mobile-toggle span {
        display: block;
        width: 22px;
        min-height: 2px;
        max-height: 2px;
        flex: 0 0 2px;
        border-radius: 2px;
        background: #fff;
    }

    .maxdps-mobile-toggle:hover,
    .maxdps-mobile-toggle:focus {
        border-color: #ff5008;
        outline: none;
    }

    .maxdps-mobile-toggle:hover span,
    .maxdps-mobile-toggle:focus span {
        background: #ff5008;
    }

    .maxdps-mobile-menu-content {
        display: none;
        margin-top: 0;
        border: 1px solid rgba(255, 255, 255, 0.15);
        background: #1d1e20;
    }

    .maxdps-mobile-menu-content.is-open {
        display: block;
    }

    .maxdps-mobile-menu-content ul {
        display: block;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .maxdps-mobile-menu-content li + li {
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .maxdps-mobile-menu-content a {
        display: block;
        padding: 11px 5%;
        color: #fff;
        font-size: 16px;
        text-decoration: none;
    }

    .maxdps-mobile-menu-content a:hover,
    .maxdps-mobile-menu-content a:focus {
        background: rgba(255, 255, 255, 0.1);
        color: #ff5008;
        outline: none;
    }
}

/* Compact version of the original internal-page header. The supplied logo is
 * deliberately shown as a small icon, never at its 977px source size. */
.icms-header__middle .navbar-brand {
    display: flex;
    align-items: center;
}

.icms-header__middle .maxdps-compact-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.icms-header__middle .nav-lang-select,
.icms-header__middle .nav-lang-select .nav-item {
    display: flex;
    align-items: center;
}

.icms-header__middle .nav-lang-select .nav-link {
    display: flex;
    min-height: 34px;
    padding-top: 0;
    padding-bottom: 0;
    align-items: center;
    line-height: 1;
}

.icms-header__middle .navbar-toggler {
    display: inline-flex;
    width: 40px;
    height: 34px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border-color: rgba(255, 255, 255, 0.62);
}

.icms-header__middle .navbar-toggler-icon {
    width: 22px;
    height: 14px;
    background-image:
        linear-gradient(#fff, #fff),
        linear-gradient(#fff, #fff),
        linear-gradient(#fff, #fff) !important;
    background-repeat: no-repeat;
    background-position: center 0, center 6px, center 12px;
    background-size: 22px 2px, 22px 2px, 22px 2px;
}

/* The homepage uses the same compact menu-icon geometry as the inner pages. */
@media (max-width: 991.98px) {
    .maxdps-mobile-toggle {
        width: 40px;
        height: 40px;
        border-radius: 4px;
    }

    .maxdps-mobile-toggle .maxdps-mobile-toggle-icon {
        display: block;
        width: 22px;
        height: 14px;
        min-height: 14px;
        max-height: 14px;
        flex: 0 0 14px;
        border-radius: 0;
        background-image:
            linear-gradient(#fff, #fff),
            linear-gradient(#fff, #fff),
            linear-gradient(#fff, #fff);
        background-repeat: no-repeat;
        background-position: center 0, center 6px, center 12px;
        background-size: 22px 2px, 22px 2px, 22px 2px;
    }

    .maxdps-mobile-toggle:hover .maxdps-mobile-toggle-icon,
    .maxdps-mobile-toggle:focus .maxdps-mobile-toggle-icon {
        background-image:
            linear-gradient(#ff5008, #ff5008),
            linear-gradient(#ff5008, #ff5008),
            linear-gradient(#ff5008, #ff5008);
    }
}

/* The inner-page menu must be at the top right even when a desktop browser is
 * narrowed. It opens below the header without moving the logo or language UI. */
@media (max-width: 991.98px) {
    #desktop_device_type > header,
    #mobile_device_type > header {
        position: relative;
        z-index: 10;
    }

    #desktop_device_type > header .icms-header__middle .container,
    #mobile_device_type > header .icms-header__middle .container {
        min-height: 56px;
    }

    #desktop_device_type > header .icms-header__middle .nav-lang-select,
    #mobile_device_type > header .icms-header__middle .nav-lang-select {
        margin-right: 52px;
    }

    #desktop_device_type > header > .icms-header__bottom.icms-navbar,
    #mobile_device_type > header > .icms-header__bottom.icms-navbar {
        position: absolute;
        inset: 0;
        z-index: 2;
        border: 0 !important;
        background: transparent;
        pointer-events: none;
    }

    #desktop_device_type > header > .icms-header__bottom.icms-navbar > .container,
    #mobile_device_type > header > .icms-header__bottom.icms-navbar > .container {
        position: relative;
        height: 56px;
        pointer-events: none;
    }

    #desktop_device_type > header > .icms-header__bottom .navbar,
    #mobile_device_type > header > .icms-header__bottom .navbar {
        position: static;
    }

    #desktop_device_type > header > .icms-header__bottom .navbar-toggler,
    #mobile_device_type > header > .icms-header__bottom .navbar-toggler {
        position: absolute;
        top: 8px;
        right: 15px;
        pointer-events: auto;
    }

    #desktop_device_type > header > .icms-header__bottom .navbar-collapse,
    #mobile_device_type > header > .icms-header__bottom .navbar-collapse {
        position: absolute;
        top: 56px;
        right: 15px;
        width: min(320px, calc(100vw - 30px));
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        border: 1px solid rgba(255, 255, 255, 0.18);
        background: #242424;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
        pointer-events: auto;
    }

    #desktop_device_type > header > .icms-header__bottom .navbar-collapse .nav-link,
    #mobile_device_type > header > .icms-header__bottom .navbar-collapse .nav-link {
        padding-right: 1rem;
        padding-left: 1rem;
    }
}

/* Keep the expansion grid centred at every responsive column count. */
.row.justify-content-center[style*="margin-top: 35px"] > .col-lg-4 {
    display: flex;
    justify-content: center;
}

.row.justify-content-center[style*="margin-top: 35px"] .trending-gameplay-item {
    width: 100%;
    max-width: 418px;
}

/* Footer content is one compact line: copyright on the left, Elite PvPers on
 * the right. The image scales down instead of forcing a second row. */
.icms-footer__bottom .row {
    flex-wrap: nowrap !important;
}

.icms-footer__bottom .row > .col-md-4,
.icms-footer__bottom .row > .col-md-8 {
    width: auto;
    max-width: none;
    margin: 0 !important;
}

.icms-footer__bottom .row > .col-md-4 {
    flex: 0 1 auto;
    min-width: 0;
}

.icms-footer__bottom .row > .col-md-8 {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
}

.icms-footer__bottom .icms-links-inherit-color {
    flex-wrap: nowrap;
    margin-bottom: 0 !important;
    white-space: nowrap;
}

.icms-footer__bottom .col-md-8 > a {
    display: block;
}

.icms-footer__bottom .col-md-8 img {
    display: block;
    float: none !important;
    width: auto;
    height: clamp(30px, 9vw, 54px) !important;
    max-width: 28vw;
    object-fit: contain;
    transform: translateY(2px);
}

@media (max-width: 420px) {
    .icms-footer__bottom .icms-links-inherit-color {
        font-size: 12px;
    }

    .icms-footer__bottom .icms-links-inherit-color .mx-2 {
        margin-right: 0.35rem !important;
        margin-left: 0.35rem !important;
    }
}

/* On internal pages, separate account-related links from the main navigation.
 * The homepage renders its own header, so its layout remains unchanged. */
@media (min-width: 992px) {
    body:not(.icms-frontpage) .icms-header__bottom .navbar-nav.menu-main {
        width: 100%;
    }

    body:not(.icms-frontpage) .icms-header__bottom .menu-main > .maxdps-menu-right-start {
        margin-left: auto;
    }
}
