/* --- ЦВЕТОВАЯ ПАЛИТРА (INDUSTRIAL LIGHT) --- */
:root {
    --main-bg: #1a1c22;          /* Глубокий антрацит (базовый фон) */
    --card-glass: rgba(255, 255, 255, 0.08); /* Светлое матовое стекло */
    --card-border: rgba(255, 255, 255, 0.15); /* Светлая рамка */
    --text-main: #f0f0f0;        /* Светло-серый текст для читаемости */
    --accent-pink: #c26a8d;      /* Теплый приглушенный розовый */
    --accent-blue: #5a8da8;      /* Приглушенный синий для ссылок */
    --header-bg: rgba(10, 10, 15, 0.9);
}

/* --- БАЗОВЫЕ СТИЛИ --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0a0a0c;
    background-image: url('assets/bg_city.png');
    background-attachment: fixed;
    background-size: cover;
    background-blend-mode: overlay; /* Смягчает картинку города для лучшей видимости текста */
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- ШАПКА (Стиль Садемп - Брутализм) --- */
.main-header {
    height: 90px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--header-bg);
    backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 20px;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 2px;
}

.logo a {
    text-decoration: none;
    color: white;
}

.logo-rp {
    color: var(--accent-pink);
    text-shadow: 0 0 10px var(--accent-pink);
}

/* Меню в шапке */
.menu-tabs {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tab-block {
    background: var(--accent-pink);
    color: white;
    padding: 10px 25px;
    border: 2px solid #000;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 4px 4px 0px #000;
    transition: 0.3s;
}

.tab-block:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0px #000;
}

.tab-links {
    display: flex;
    gap: 15px;
}

.tab-links {
    display: flex;
    gap: 15px;
}

.tab-links a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: 0.3s;
}

.tab-links a:hover {
    color: white;
}

/* Кнопки соцсетей и Подключиться */
.header-actions {
    display: flex;
    align-items: center;
    gap: 30px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: 0.3s;
}

.social-btn:hover {
    transform: translateY(-3px);
    border-color: white;
}

.btn-connect {
    background: white;
    color: black;
    padding: 12px 30px;
    border: 2px solid white;
    font-weight: 900;
    text-decoration: none;
    border-radius: 10px;
    transition: 0.3s;
}

.btn-connect:hover {
    background: transparent;
    color: white;
}

/* --- ГЕРОЙ (Секция с каруселью) --- */
.hero {
    height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 80%);
}

.hero-content { max-width: 900px; }

.hero h1 {
    font-size: 80px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: white;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.highlight {
    color: var(--accent-pink);
    text-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

.hero-sub {
    font-size: 20px;
    color: #e0e0e0;
    margin: 0 auto 40px;
    max-width: 650px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}

/* Карусель внутри Героя */
.gallery-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* --- ГАЛЕРЕЯ (Итоговое решение по композиции) --- */
.gallery-track {
    display: flex;
    gap: 20px;
    height: 680px; /* Увеличили общую высоту для воздуха */
    width: auto;
    max-width: 1200px;
    justify-content: center;
    padding: 20px;
}

.slide {
    position: relative;
    height: 100%;
    flex: 0 0 280px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden; /* ГАРАНТИРУЕТ, что всё, что выходит за рамки, отсекается */
    transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.4;
    filter: grayscale(100%) blur(3px);
    transform: scale(0.9);
    cursor: pointer;
    background: #000; /* Черный фон для прозрачных зон картинки */
}

/* Эффект "Погружения" в тени в самом низу блока */
.slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%; /* Накрываем нижнюю часть блока очень темным градиентом */
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    z-index: 4;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    filter: grayscale(0%) blur(0px);
    border-color: white;
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    z-index: 10;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* ИСПРАВЛЕННЫЙ ПЕРСОНАЖ (Максимальное масштабирование) */
.char-img {
    position: absolute;
    /* Опускаем персонажа еще ниже */
    bottom: -15%; 
    left: 0;
    /* Делаем его ОЧЕНЬ большим, чтобы он гарантированно выходил за границы снизу */
    width: 120%; 
    height: 130%; 
    object-fit: cover; /* Используем cover, чтобы он заполнял пространство */
    z-index: 2;
    /* Добавляем четкую тень и яркость */
    filter: brightness(1.1) contrast(1.1) drop-shadow(0 10px 20px rgba(0,0,0,0.9));
    pointer-events: none;
    transform: translateX(-10%); /* Слегка смещаем, чтобы он был центром композиции */
}

.button-container {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 85%;
    text-align: center;
}

.action-btn {
    display: inline-block;
    padding: 12px 25px;
    color: white;
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
    border: 1px solid white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: 0.3s;
}

.slide:not(.active) .action-btn {
    background: transparent;
    padding: 0;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.8);
}

.slide.active .action-btn {
    background: var(--accent-pink);
    border: 2px solid black;
    border-radius: 8px;
    box-shadow: 4px 4px 0px black;
}



/* --- СТАТИСТИКА --- */
.stats-bar {
    padding: 60px 0;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    gap: 20px;
}

.stat-item .stat-num {
    display: block;
    font-size: 36px; /* Было 48px */
    font-weight: 900;
    color: white;
}

.stat-item .stat-label {
    font-size: 12px; /* Было 14px */
    letter-spacing: 2px;
    color: #888;
}


/* --- СЕКЦИЯ О ПРОЕКТЕ (Индустриальный минимализм) --- */
.features {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
}

.section-title {
    font-size: 42px;
    margin-bottom: 60px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.description-container {
    max-width: 900px;
    margin: 0 auto;
}

.project-description {
    font-size: 24px;
    line-height: 1.8;
    color: #bbb; /* Светло-серый для мягкого чтения */
    font-weight: 400;
}

/* Акценты внутри текста */
.highlight-blue {
    color: var(--accent-blue);
    font-weight: 700;
}

.highlight-white {
    color: white;
    font-weight: 700;
}

/* Убираем старую сетку, если она еще осталась в коде */
.features-grid {
    display: none;
}


/* --- ИНСТРУКЦИЯ --- */
.instructions {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding: 40px 20px;
}

.step {
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.step-num {
    font-size: 60px;
    font-weight: 900;
    color: var(--accent-pink);
    opacity: 0.3;
    position: absolute;
    top: 10px;
    right: 20px;
}

.step h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: white;
}

.step p {
    color: #aaa;
}

/* --- ФУТЕР --- */
.main-footer {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #0a0a0c;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

.socials a {
    margin: 0 10px;
    color: white;
    text-decoration: none;
    font-weight: 700;
}

.socials a:hover {
    color: var(--accent-pink);
}

/* --- АДАПТИВНОСТЬ (RESPONSIVE DESIGN) --- */

/* --- АДАПТИВНОСТЬ (RESPONSIVE DESIGN) --- */

/* --- АДАПТИВНОСТЬ (ОБНОВЛЕННАЯ) --- */

@media (max-width: 1024px) {
    .hero h1 {
        font-size: 50px;
    }
    .hero-sub {
        font-size: 18px;
        padding: 0 10px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Основной блок для мобильных устройств */
@media (max-width: 768px) {
    /* 1. ОБЩИЕ НАСТРОЙКИ */
    html, body {
        overflow-x: hidden; /* Запрещаем горизонтальную прокрутку всей страницы */
        width: 100%;
    }

    /* 2. ШАПКА (Делаем компактной) */
    .main-header {
        height: auto;
        padding: 15px 10px;
        background: rgba(10, 10, 15, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .menu-tabs {
        display: none; /* Скрываем меню на мобилках, чтобы не занимало место */
    }

    .header-actions {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .btn-connect {
        width: 100%;
        max-width: 280px;
        padding: 12px;
        font-size: 14px;
    }

    /* 3. ГЕРОЙ (Убираем жесткие ограничения) */
    .hero {
        height: auto; /* ВАЖНО: убираем 95vh */
        min-height: 80vh;
        padding: 40px 15px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .hero h1 {
        font-size: 38px;
        margin-bottom: 15px;
    }

    .hero-sub {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* 4. ГАЛЕРЕЯ (Свайп-карусель) */
    .gallery-track {
        height: 500px; /* Ограничиваем высоту */
        width: 100%;
        max-width: 100vw; /* Не даем вылезти за края */
        padding: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        display: flex;
        justify-content: flex-start; /* Чтобы свайп начинался от левого края */
        -webkit-overflow-scrolling: touch;
    }

    /* Скрываем стандартный скроллбар */
    .gallery-track::-webkit-scrollbar {
        display: none;
    }
    .gallery-track {
        scrollbar-width: none;
    }

    .slide {
        flex: 0 0 85%; /* Каждая карточка занимает 85% ширины */
        height: 450px; /* Фиксированная высота для мобилки */
        margin: 0 5px;
    }

    /* 5. ПЕРСОНАЖ (Критически важное исправление) */
    .char-img {
        width: 80% !important; /* Уменьшаем размер, чтобы не перекрывал кнопки */
        height: auto !important;
        bottom: -10% !important; /* Чуть выше поднимаем */
        transform: translateX(0) !important; /* Центрируем */
        max-height: 70vh; /* Ограничиваем высоту, чтобы не улетал за экран */
    }

    .button-container {
        bottom: 10% !important; /* Поднимаем кнопки чуть выше */
        width: 90% !important;
    }

    .action-btn {
        font-size: 16px;
        padding: 10px 20px;
    }

    /* 6. СТАТИСТИКА */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 20px;
    }

    .stat-num {
        font-size: 24px;
    }

    /* 7. ИНСТРУКЦИЯ */
    .steps-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .step {
        margin-bottom: 20px;
        padding: 30px;
    }

    .section-title {
        font-size: 30px;
        padding: 0 10px;
    }

    /* 8. ФУТЕР */
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
}

/* Дополнительно для очень маленьких экранов (iPhone SE) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 32px;
    }
    .hero-sub {
        font-size: 14px;
    }
    .slide {
        flex: 0 0 90%;
    }
}
