@font-face {
    font-family: 'Bebas Neue';
    src: url('../fonts/BebasNeue-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --primary-color: #030f1b;
    --header-bg: #030f1b;
    --secondary-color: #1a2533;
    --accent-color: #ffffff;
    --text-color: #ffffff;
    --text-muted: #8e99a3;
    --border-color: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-accent: 'Bebas Neue', sans-serif;
}

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

body {
    background-color: var(--primary-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header & Nav */
header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
}

.header-brand-bar {
    display: none;
}

@media (min-width: 1025px) {
    .header-brand-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 0 14px;
        gap: 28px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
}

.header-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    line-height: 0;
}

.ayrus-wordmark {
    font-family: var(--font-accent);
    font-size: clamp(32px, 3.6vw, 52px);
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #fff;
    line-height: 1;
    transform: scaleY(1.12);
    transform-origin: left center;
}

.header-brand--compact .ayrus-wordmark {
    font-size: 22px;
    letter-spacing: 0.06em;
    transform: scaleY(1.08);
    transform-origin: left center;
}

.header-tagline {
    text-align: right;
    max-width: 540px;
    flex-shrink: 1;
}

.header-tagline p {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.header-tagline p + p {
    margin-top: 5px;
}

@media (max-width: 1200px) and (min-width: 1025px) {
    .header-tagline p {
        font-size: 9px;
    }

    .nav-desktop {
        gap: 20px;
        flex-wrap: wrap;
    }
}

.header-top {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo-image-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.logo-image {
    height: 56px;
    width: auto;
    display: block;
}

.logo-image--brand {
    height: 52px;
}

.logo-image-link-desktop {
    display: none;
}

@media (min-width: 1025px) {
    .logo-image-link-desktop {
        display: inline-flex;
    }

    .logo-image-link-desktop .logo-image {
        height: 64px;
    }
}

@media (max-width: 1024px) {
    .logo-image {
        height: 40px;
    }
}

.logo-container {
    display: flex;
    flex-direction: column;
}

.logo {
    font-family: var(--font-accent);
    font-size: 80px;
    /* Even larger */
    font-weight: 400;
    text-transform: uppercase;
    line-height: 0.8;
    letter-spacing: 1px;
    /* Changed from negative to small positive */
    display: block;
    transform: scaleY(1.3);
    /* More vertical stretch */
    transform-origin: top;
    color: #fff;
}

@media (max-width: 1400px) and (min-width: 1025px) {
    .logo {
        font-size: clamp(28px, 3.2vw, 56px);
        line-height: 0.95;
    }
}

.logo-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.header-top-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.region-select {
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-bottom {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 12px 0 15px;
    flex-wrap: wrap;
    gap: 8px 0;
}

.nav-desktop {
    display: flex;
    flex-wrap: wrap;
    gap: 28px 32px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 0;
    white-space: nowrap;
}

.nav-link.active {
    color: #fbbf24;
}

.nav-desktop .nav-link,
.sidebar .nav-link {
    font-family: var(--font-accent);
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 2px;
    /* Increased for better look */
    transform: scaleY(1.2);
    transform-origin: center;
}

.sidebar .nav-link {
    font-size: 24px;
    /* Slightly larger for sidebar */
}

.header-bottom-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.icon {
    font-size: 18px;
}

/* Burger Menu */
.burger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.burger span {
    width: 25px;
    height: 2px;
    background: var(--text-color);
    transition: 0.3s;
}

/* Sidebar */
.sidebar {
    position: fixed;
    right: -100%;
    top: 0;
    width: 100%;
    /* На всю ширину */
    height: 100%;
    background: var(--secondary-color);
    z-index: 1001;
    transition: 0.5s;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Добавлено для скроллинга меню, а не сайта */
    /* Убрал box-shadow так как на весь экран */
}

.sidebar.active {
    right: 0;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    /* Одинаковые отступы */
    cursor: pointer;
    font-size: 30px;
    color: var(--text-color);
    line-height: 1;
    z-index: 1002;
    padding: 5px;
    /* Для удобства нажатия */
}

.sidebar-links {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    /* Равномерное распределение */
    padding-top: 50px;
    /* Отступ от крестика */
    align-items: flex-start;
    /* Выравнивание по левому краю */
    padding-left: 10px;
}

.sidebar-links .nav-item {
    width: 100%;
}

.sidebar-links .nav-link {
    font-size: 18px;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Sub-navigation (Pills) */
.sub-nav-container {
    max-width: 1400px;
    margin: 30px auto 40px;
    padding: 0 40px;
}

.sub-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sub-nav-link {
    padding: 10px 25px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    transition: all 0.3s ease;
    text-transform: none;
    /* As in screenshot "О лиге", "руководство" */
}

.sub-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.sub-nav-link.active {
    background: #fff;
    color: var(--primary-color);
    border-color: #fff;
}

@media (max-width: 768px) {
    .sub-nav-container {
        padding: 0 20px;
        margin: 20px auto 30px;
    }

    .sub-nav {
        gap: 8px;
    }

    .sub-nav-link {
        padding: 8px 18px;
        font-size: 13px;
    }
}

.sidebar-auth-link {
    margin-top: 20px;
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

@media (max-width: 1024px) {
    .header-bottom {
        display: none;
    }

    .burger {
        display: flex;
    }

    .header-top {
        display: flex;
        padding: 15px 0;
    }

    .logo {
        font-size: 18px;
    }

    .container {
        padding: 0 20px;
    }
}

/* Grid System */
.grid {
    display: grid;
    gap: 30px;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1100px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Footer */
footer {
    background: var(--header-bg);
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 80px 0;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
}

.footer-logo-image-link {
    display: inline-flex;
    margin-bottom: 10px;
    line-height: 0;
}

.footer-logo-image {
    height: 80px;
    width: auto;
    display: block;
}

.footer-logo {
    font-size: 32px;
    letter-spacing: 1px;
    line-height: 1.1;
    color: #fff;
    font-family: var(--font-accent);
    display: inline-block;
    margin-bottom: 10px;
}

.footer-legal {
    font-size: 13px;
    color: #fff;
    line-height: 1.6;
    font-weight: 500;
}

.footer-address {
    font-size: 13px;
    color: #fff;
    line-height: 1.6;
    margin-top: 5px;
    font-weight: 500;
}

.footer-phone {
    font-size: 24px;
    font-family: var(--font-accent);
    color: #fff;
    margin-right: 20px;
    letter-spacing: 1px;
}

.footer-docs {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.footer-docs a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.footer-docs a:hover {
    color: #fff;
}

.footer-contacts {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px;
        padding: 50px 0;
    }

    .footer-phone {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .footer-docs {
        justify-content: center;
    }

    .footer-logo {
        transform-origin: center;
        font-size: 36px;
    }

    .footer-docs {
        justify-content: center;
        gap: 20px;
    }
}