/* =========================================================
   METROCRAFT WIKI
   ОСНОВНОЙ СТИЛЬ
========================================================= */


/* =========================================================
   FONT
========================================================= */

@font-face {
    font-family: 'namupro';
    src: url('../fonts/namu-pro-webfont.woff2') format('woff2');
}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;

    font-family: 'namupro', sans-serif;

    background: #080808;
    color: #e5e5e5;

    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
textarea,
select {
    font-family: 'namupro', sans-serif;
}

a {
    color: rgba(255, 255, 255, 0.7);

    text-decoration: none;

    transition: 0.2s ease;
}

a:hover {
    color: #d93030;
}


/* =========================================================
   SELECTION
========================================================= */

::selection {
    color: #fff;
    background: #d93030;
}


/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: #080808;
}

::-webkit-scrollbar-thumb {
    background: #7d2828;
}

::-webkit-scrollbar-thumb:hover {
    background: #d93030;
}

html {
    scrollbar-color: #7d2828 #080808;
    scrollbar-width: thin;
}


/* =========================================================
   CONTAINER
========================================================= */

.wiki-container {
    width: min(1400px, calc(100% - 40px));

    margin: 0 auto;
}


/* =========================================================
   HEADER
========================================================= */

.wiki-header {
    position: sticky;

    top: 0;

    z-index: 1000;

    height: 76px;

    flex-shrink: 0;

    background: rgba(15, 15, 15, 0.55);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border-bottom: 1px solid rgba(217, 48, 48, 0.4);
}

.wiki-header-inner {
    height: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;
}


/* =========================================================
   LOGO
========================================================= */

.wiki-logo {
    display: flex;

    align-items: center;

    flex-shrink: 0;

    color: #fff;

    font-family: 'namupro', sans-serif;

    font-size: 24px;

    font-weight: 900;

    letter-spacing: 2px;

    white-space: nowrap;

    transition: 0.2s ease;
}

.wiki-logo span {
    color: #d93030;
}

.wiki-logo:hover {
    color: #fff;
}


/* =========================================================
   NAVIGATION
========================================================= */

.wiki-nav {
    display: flex;

    align-items: center;

    gap: 28px;
}

.wiki-nav a {
    position: relative;

    color: rgba(255, 255, 255, 0.7);

    font-family: 'namupro', sans-serif;

    font-size: 14px;

    font-weight: 400;

    letter-spacing: 0;

    text-decoration: none;

    transition: 0.25s ease;
}

.wiki-nav a:hover {
    color: #d93030;
}

.wiki-nav a::after {
    display: none;
}


/* =========================================================
   MAIN
========================================================= */

.wiki-main {
    position: relative;

    flex: 1 1 auto;

    min-height: 0;
}


/* =========================================================
   HERO
========================================================= */

.wiki-hero {
    position: relative;

    padding: 55px 0 50px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 80% 30%,
            rgba(183, 43, 43, 0.08),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #0d0d0d 0%,
            #080808 100%
        );

    border-bottom: 1px solid rgba(183, 43, 43, 0.35);
}


/* =========================================================
   HERO GRID
========================================================= */

.wiki-hero-grid {
    position: absolute;

    inset: 0;

    pointer-events: none;

    opacity: 0.16;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );

    background-size: 70px 70px;
}


/* =========================================================
   HERO CONTAINER
========================================================= */

.wiki-hero > .wiki-container {
    position: relative;

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 40px;

    z-index: 2;
}


/* =========================================================
   HERO CONTENT
========================================================= */

.wiki-hero-content {
    max-width: 760px;
}

.wiki-hero-content h1 {
    margin: 0 0 17px;

    color: #eee;

    font-family: 'namupro', sans-serif;

    font-size: 72px;

    line-height: 0.9;

    font-weight: 900;

    letter-spacing: 4px;
}

.wiki-hero-content p {
    max-width: 690px;

    margin: 0;

    color: #888;

    font-family: 'namupro', sans-serif;

    font-size: 15px;

    line-height: 1.5;
}


/* =========================================================
   HERO INFO
   СКРЫВАЕМ 04 РАЗДЕЛА
========================================================= */

.wiki-hero-info {
    display: none;
}


/* =========================================================
   HERO ACCENT
========================================================= */

.wiki-hero-accent {
    position: absolute;

    left: 0;

    bottom: 0;

    width: 190px;

    height: 2px;

    background: #d93030;

    z-index: 3;
}


/* =========================================================
   SECTION
========================================================= */

.wiki-section {
    padding: 35px 0 35px;
}


/* =========================================================
   SECTION HEADING
========================================================= */

.wiki-section-heading {
    margin-bottom: 22px;
}

.wiki-section-heading h2 {
    margin: 0 0 10px;

    color: #ddd;

    font-family: 'namupro', sans-serif;

    font-size: 18px;

    line-height: 1.2;

    font-weight: 400;

    letter-spacing: 1.5px;
}

.wiki-section-line {
    width: 65px;

    height: 1px;

    background: #7d2828;
}


/* =========================================================
   MAIN GRID
   4 КАРТОЧКИ В ОДИН РЯД
========================================================= */

.wiki-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 15px;
}


/* =========================================================
   WIKI CARD
========================================================= */

.wiki-card {
    position: relative;

    min-height: 245px;

    display: flex;

    flex-direction: column;

    padding: 20px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #111 0%,
            #0d0d0d 100%
        );

    border: 1px solid rgba(255, 255, 255, 0.07);

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.wiki-card:hover {
    background:
        linear-gradient(
            135deg,
            #151515 0%,
            #101010 100%
        );

    border-color: rgba(183, 43, 43, 0.65);

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.25);

    transform: translateY(-2px);
}


/* =========================================================
   CARD NUMBERS
   01 / 02 / 03 / 04 СКРЫТЫ
========================================================= */

.wiki-card-bg,
.wiki-card-top {
    display: none;
}


/* =========================================================
   CARD CONTENT
========================================================= */

.wiki-card-content {
    position: relative;

    z-index: 2;

    margin-top: auto;
}

.wiki-card-content h3 {
    margin: 0 0 9px;

    color: #e7e7e7;

    font-family: 'namupro', sans-serif;

    font-size: 25px;

    line-height: 1.1;

    font-weight: 400;

    letter-spacing: 1px;

    transition: color 0.25s ease;
}

.wiki-card:hover .wiki-card-content h3 {
    color: #d93030;
}


/* =========================================================
   CARD LINE
========================================================= */

.wiki-card-line {
    width: 40px;

    height: 1px;

    margin-bottom: 15px;

    background: #7d2828;

    transition: width 0.25s ease;
}

.wiki-card:hover .wiki-card-line {
    width: 65px;
}


/* =========================================================
   CARD DESCRIPTION
========================================================= */

.wiki-card-content p {
    max-width: 420px;

    margin: 0;

    color: #777;

    font-family: 'namupro', sans-serif;

    font-size: 13px;

    line-height: 1.6;
}


/* =========================================================
   CARD BOTTOM
========================================================= */

.wiki-card-bottom {
    position: relative;

    z-index: 2;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-top: 20px;

    padding-top: 13px;

    border-top: 1px solid rgba(255, 255, 255, 0.06);

    color: #666;

    font-family: 'namupro', sans-serif;

    font-size: 10px;

    letter-spacing: 1px;
}

.wiki-card-arrow {
    color: #b72b2b;

    font-size: 18px;

    line-height: 1;

    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

.wiki-card:hover .wiki-card-arrow {
    color: #d93030;

    transform: translateX(4px);
}


/* =========================================================
   FOOTER
========================================================= */

.wiki-footer {
    position: relative;

    flex-shrink: 0;

    padding: 15px 0;

    background: #080808;

    border-top: 1px solid rgba(183, 43, 43, 0.45);
}

.wiki-footer-inner {
    display: flex;

    align-items: center;

    justify-content: center;
}

.wiki-footer-copy {
    color: #555;

    font-family: 'namupro', sans-serif;

    font-size: 10px;

    letter-spacing: 1px;

    text-align: center;
}


/* =========================================================
   ГЛАВНАЯ
   ОДИН ЭКРАН БЕЗ СКРОЛЛА
========================================================= */

@media (min-width: 701px) {

    body {
        height: 100vh;

        display: flex;

        flex-direction: column;

        overflow: hidden;
    }

    .wiki-header {
        flex-shrink: 0;
    }

    .wiki-main {
        flex: 1 1 auto;

        min-height: 0;

        overflow: hidden;
    }

    .wiki-footer {
        flex-shrink: 0;
    }

}


/* =========================================================
   СТРАНИЦЫ КАТЕГОРИЙ
   ОРУЖИЕ / БРОНЯ / УСТРОЙСТВА / МУТАНТЫ
========================================================= */

@media (min-width: 701px) {

    body:has(.weapons-page),
    body:has(.armor-page),
    body:has(.devices-page),
    body:has(.mutants-page) {

        height: auto;

        min-height: 100vh;

        display: block;

        overflow-x: hidden;

        overflow-y: auto;
    }

    body:has(.weapons-page) .wiki-main,
    body:has(.armor-page) .wiki-main,
    body:has(.devices-page) .wiki-main,
    body:has(.mutants-page) .wiki-main {

        min-height: 0;

        overflow: visible;
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) and (min-width: 701px) {

    .wiki-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    html,
    body {
        width: 100%;

        height: auto;

        overflow-x: hidden;

        overflow-y: auto;
    }


    /* HEADER */

    .wiki-header {
        height: 68px;
    }

    .wiki-header-inner {
        gap: 15px;
    }

    .wiki-container {
        width: min(
            100% - 30px,
            1400px
        );
    }

    .wiki-logo {
        font-size: 18px;

        letter-spacing: 1px;
    }

    .wiki-nav {
        gap: 12px;
    }

    .wiki-nav a {
        font-size: 11px;
    }


    /* MAIN */

    .wiki-main {
        min-height: 0;

        overflow: visible;
    }


    /* HERO */

    .wiki-hero {
        padding: 45px 0 40px;
    }

    .wiki-hero > .wiki-container {
        align-items: flex-start;
    }

    .wiki-hero-content h1 {
        font-size: 52px;

        letter-spacing: 2px;
    }

    .wiki-hero-content p {
        font-size: 14px;
    }

    .wiki-hero-accent {
        width: 120px;
    }


    /* SECTION */

    .wiki-section {
        padding: 25px 0 35px;
    }


    /* GRID */

    .wiki-grid {
        grid-template-columns: 1fr;

        gap: 10px;
    }


    /* CARD */

    .wiki-card {
        min-height: 220px;

        padding: 18px;
    }

    .wiki-card-content h3 {
        font-size: 24px;
    }


    /* FOOTER */

    .wiki-footer {
        padding: 16px 0;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .wiki-logo {
        font-size: 16px;

        letter-spacing: 1px;
    }

    .wiki-nav {
        gap: 8px;
    }

    .wiki-nav a {
        font-size: 10px;
    }

    .wiki-hero {
        padding: 40px 0 35px;
    }

    .wiki-hero-content h1 {
        font-size: 42px;
    }

    .wiki-hero-content p {
        font-size: 13px;
    }

    .wiki-card {
        min-height: 205px;
    }

}