/* --- 1. GLOBAL VARIABLES & RESET --- */
:root {
    --font-main: 'Inter', sans-serif;
    --color-bg: #ffffff;
    --color-text: #000000;
    --color-gray-bg: #F5F5F5; 
    --color-pill: #D4FF7D; /* Салатовый цвет */
    --color-border: #E0E0E0;
    --transition-speed: 0.3s;
}

body {
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* --- 2. HEADER --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
    background-color: var(--color-bg);
}

.header .logo {
    font-weight: 700;
    font-size: 36px;
    letter-spacing: -0.02em;
}

.header nav {
    display: flex;
    align-items: center;
}

.header nav a {
    text-decoration: none;
    color: var(--color-text);
    margin-left: 30px;
    font-weight: 300;
    font-size: 24px;
    transition: opacity var(--transition-speed);
}

.header nav a:hover {
    opacity: 0.6;
}

/* --- 3. HERO SECTION --- */
.hero {
    padding: 60px 48px;
    display: flex;
    flex-direction: row; /* Выстраиваем в ряд */
    align-items: center;
    justify-content: center; /* Центрируем всю группу */
    gap: 60px; /* Отступ между картинкой и текстом на десктопе */
    max-width: 1400px; 
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    min-width: 0; 
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Текст выровнен по левому краю */
}

.hero-mascot {
    display: block;
    /* order: -1 ставит картинку ПЕРВОЙ в потоке (слева на десктопе, сверху на мобиле) */
    order: -1; 
    width: 35%; 
    max-width: 480px;
    min-width: 320px; /* Не даем ей стать слишком маленькой */
    height: auto;
    object-fit: contain;
    flex-shrink: 0; 
}

.main-title {
    font-size: 120px;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.slogan-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    font-size: 36px;
    flex-wrap: wrap;
}

.slogan-static {
    font-weight: 400;
}

.slogan-dynamic-pill {
    background-color: var(--color-pill);
    padding: 5px 25px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    height: 60px;
}

.trusted-badge {
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 16px;
}

.check-icon {
    background: black;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* --- 4. FILTERS --- */
.filters-container {
    padding: 0 48px;
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    min-width: 200px;
}

.tags-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 8px 20px;
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: 50px;
    background: white;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 24px;
    font-weight: 700;
    color: #000;
    opacity: 0.3;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    opacity: 0.6;
    border-color: #000;
}

.filter-tag.active {
    background-color: #000;
    color: #fff;
    opacity: 1;
    border-color: #000;
}

/* --- 5. GAMES HUB (GRID) --- */
.hub-section {
    padding: 48px;
    background-color: var(--color-gray-bg);
    margin-top: 60px;
    min-height: 500px;
}

.hub-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 40px;
    margin-top: 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* --- 6. GAME CARD --- */
.game-card {
    background: #fff;
    border-radius: 20px; 
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 16px;
    border: 1px solid transparent;
    height: 100%;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin-bottom: 16px;
    border-radius: 2px;
    background-color: #eee;
}

.card-tags-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.mini-tag {
    font-size: 13px;
    font-weight: 500;
    background: rgba(0,0,0,0.05);
    padding: 4px 8px;
    border-radius: 20px;
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.2;
}

.card-desc {
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    margin-bottom: 16px;
    flex-grow: 1;
}

.card-info-row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    color: #000;
    font-size: 13px;
    font-weight: 500;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.info-item + .info-item::before {
    content: "|";
    margin-right: 8px;
    opacity: 0.5;
    font-weight: 400;
}

.card-link {
    display: block;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    color: #000;
    border: 1px solid #000;
    padding: 12px;
    border-radius: 99px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.card-link:hover {
    background: #000;
    color: #fff;
}

/* --- 7. RESPONSIVE / MEDIA QUERIES --- */

/* Планшеты и ноутбуки (меньше 1024px) */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column; /* Элементы друг под другом */
        padding: 40px 20px;
        text-align: center;
        gap: 0; /* УБРАЛИ GAP: чтобы картинка не отлетала далеко */
    }

    .hero-content {
        align-items: center; /* Центрируем текст */
        width: 100%;
    }

    .hero-mascot {
        /* order: -1 сохраняется, так что картинка сверху */
        width: 60%; 
        max-width: 350px;
        min-width: auto;
        margin: 0 auto 10px; /* Минимальный отступ снизу */
    }

    .slogan-container {
        justify-content: center;
    }
}

/* Мобильные телефоны (меньше 768px) */
@media (max-width: 768px) {
    /* Шапка */
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .header .logo {
        display: none; /* Скрываем логотип */
    }

    .header nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .header nav a {
        margin-left: 0;
        font-size: 18px;
    }

    /* Герой */
    .main-title {
        font-size: 14vw; 
    }

    .slogan-container {
        font-size: 20px;
    }

    .slogan-dynamic-pill {
        height: 40px;
        padding: 0 15px;
        min-width: 100px;
    }
    
    .hero-mascot {
        width: 80%;
        max-width: 300px;
    }

    /* Фильтры */
    .filters-container {
        padding: 0 20px;
        margin-top: 40px;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .filter-label {
        font-size: 18px;
    }

    .filter-tag {
        font-size: 16px;
        padding: 6px 16px;
    }

    /* Хаб и сетка */
    .hub-section {
        padding: 30px 20px;
    }
    
    .hub-title {
        font-size: 32px;
        text-align: center;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }
}