/* ==========================================================================
   0. СИСТЕМНЫЙ ПРЕЛОАДЕР (SITE PRELOADER)
   ========================================================================== */
#site-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(12, 12, 16, 0.95);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-spinner {
    display: block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(122, 0, 254, 0.1); 
    border-top: 4px solid #7a00fe;
    border-radius: 50%;
    box-shadow: 0 0 20px #7a00fe;
    animation: spin-loading 1s infinite linear; 
    margin-bottom: 25px; 
}

.loader-text {
    color: var(--main-color);
    font-size: 13px;
    letter-spacing: 4px;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 0 8px rgba(122, 0, 254, 0.6);
    margin: 0;
    text-transform: uppercase;
}

@keyframes spin-loading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#site-preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

:root {
    --bg-color: #0d0d11;
    --second-bg-color: #16161f;
    --text-color: #ffffff;
    --text-muted: #8b8b9a;
    --orange: #ff9800;
    
    --main-color: #7a00fe;
    --accent-color: #00ff00;
    
    /* Добавляем красный цвет Ютуба */
    --youtube-color: #ff0000; 

    --neon-glow: 0 0 15px rgba(122, 0, 254, 0.25), 
                 0 0 30px rgba(122, 0, 254, 0.15);
    --neon-glow-hover: 0 0 10px rgba(122, 0, 254, 0.9), 
                       0 0 30px rgba(122, 0, 254, 0.6);             
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--bg-color); 
    color: var(--text-color);
    overflow-x: hidden;
    
    /* ПЕРЕНОСИМ ФОН СЮДА */
    background-image: linear-gradient(to bottom, rgba(13, 13, 17, 0.890) 0%, rgba(13, 13, 17, 0.980) 50%, rgba(13, 13, 17, 0.200) 95%), 
                      url('../img/bg/cyberimg-1-2-1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Благодаря этому свойству фон фиксируется и не уезжает вверх при скролле */
    background-attachment: fixed;
}

/* Фиксированный холст на всё окно браузера */
#bg-particles {
    position: fixed; /* Зафиксирован при скролле */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1; /* Поверх основного фонового рисунка, но под блоками сайта */
    pointer-events: none; /* Клики проходят сквозь частицы на кнопки и ссылки */
}

/* Гарантируем, что весь контент сайта лежит ВЫШЕ слоя с частицами */
header, 
section, 
footer, 
.hero, 
.modules-section {
    position: relative;
    z-index: 2;
}

/* --- КОНТЕЙНЕР (Ширина 1400px) --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 40px;
}

/* --- ШАПКА --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /*background: rgba(13, 13, 17, 0.7);*/
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

/* Стили логотипа (оставляем твои картинкой, если нужно) */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.logo-image {
    max-height: 40px; /* Ограничиваем высоту картинки логотипа, чтобы шапка не разъезжалась */
}

/* --- МЕНЮ (Свечение при наведении) --- */
.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-item, .dropdown {
    margin-left: 35px;
}

.nav-links a:hover {
    color: var(--main-color);
    text-shadow: 0 0 5px #7a00fe, 0 0 15px rgba(122, 0, 255, 0.8), 0 0 25px rgba(122, 0, 255, 0.5);
}

.nav-links .highlight {
    /*color: var(--main-color);*/
    font-weight: 700;
}

.nav-links .highlight:hover {
    color: var(--main-color);
    text-shadow: 0 0 8px var(--main-color), 0 0 20px var(--main-color);
}


/* --- ВЫПАДАЮЩЕЕ МЕНЮ --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.arrow {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.3s ease, color 0.3s ease;
    margin-bottom: 2px;
}

.dropdown:hover > a .arrow {
    transform: rotate(-135deg);
    color: var(--main-color);
}

.dropdown-menu, .submenu {
    position: absolute;
    background: rgba(13, 13, 17, 0.95);
    backdrop-filter: blur(15px);
    min-width: 220px;
    list-style: none;
    padding: 15px 0;
    margin: 0;
    border-top: 2px solid var(--main-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    z-index: 100;
}

.dropdown-menu {
    top: 100%;
    left: 0;
    margin-top: 25px; /* Зазор под шапкой */
}

.submenu {
    top: -2px;
    left: 100%;
    transform: translateX(15px);
}

.dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-submenu:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.dropdown-menu li {
    position: relative;
}

/* Стили ссылок внутри меню */
.dropdown-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    margin: 0; /* Обнуляем отступ .nav-item */
    font-size: 1.1rem;
    color: var(--text-color);
    width: 100%;
}

.dropdown-menu a:hover {
    background: rgba(122, 0, 254, 0.1);
    color: var(--main-color);
    text-shadow: 0 0 10px rgba(122, 0, 254, 0.5);
}

.dropdown-submenu > a .arrow {
    transform: rotate(-45deg);
    margin-bottom: 0;
}

.dropdown-submenu:hover > a .arrow {
    color: var(--main-color);
    transform: rotate(-45deg); 
}


/* --- ГЛАВНЫЙ ЭКРАН --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}


/* Холст растягивается на весь первый экран и не мешает кликам */

.hero-content {
    position: relative;
    z-index: 2;
}


.hero-content {
    position: relative;
    z-index: 2;
}

.main-title {
    font-size: 5rem;
    line-height: 1.1;
    text-transform: uppercase;
    background: linear-gradient(90deg, #00f0ff, var(--main-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #7b00ff, 0 0 15px rgba(98, 4, 255, 0.7), 0 0 25px rgba(98, 0, 255, 0.5);
}

.typing-container {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 40px;
    height: 60px;
    text-shadow: 0 0 5px #00ff00, 0 0 15px rgba(0, 255, 4, 0.5), 0 0 25px rgba(0, 255, 21, 0.3);
}

.cursor { display: inline-block; width: 3px; background-color: var(--accent-color); animation: blink 0.8s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }


/* --- КНОПКИ --- */
.hero-buttons {
    display: flex;
    gap: 20px;
}

.cyber-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-color);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    transition: all 0.3s ease;
}

.primary-btn {
    background: #5865F2;
}

.primary-btn:hover {
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.7);
    filter: drop-shadow(0 0 15px var(--main-color));
    color: var(--text-color);
    transform: translateY(-5px);
}

.secondary-btn {
    
    box-shadow: inset 0 0 0 2px var(--youtube-color);
}

.secondary-btn:hover {
    background: var(--youtube-color);
    box-shadow: inset 0 0 15px rgb(255, 0, 0);
    filter: drop-shadow(0 0 15px var(--youtube-color));
    color: var(--text-color);
    transform: translateY(-5px);
}

/* --- СЕКЦИЯ ABOUT --- */
.about-section {
    padding: 100px 0 80px; 
    position: relative;
    z-index: 2;
    /* Поворот на 90 градусов: градиент идет слева направо */

}

.about-box {
    /* ИЛИ Вариант строго слева направо (90deg) */
    /* background: linear-gradient(90deg, rgba(13, 13, 17, 0.85), rgba(122, 0, 254, 0.15)); */
    border: 1px solid transparent; 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
    padding: 60px; 
    border-radius: 15px;
    /*border: 1px solid rgba(122, 0, 254, 0.2);*/
    box-shadow: 0 0 10px rgba(122, 0, 254, 0.1), 
                inset 0 0 5px rgba(122, 0, 254, 0.5);
                
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: border-color, box-shadow, opacity, transform;
    transition: 0.3s ease;
    opacity: 0.9;          
}
.about-box:hover{
    border-color: var(--main-color, #7a00fe);
    box-shadow: 0 0 20px var(--main-color, #7a00fe),
                inset 0 0 10px var(--main-color, #7a00fe);
    transform: translateY(-3px);
    opacity: 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.about-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.8;
    letter-spacing: 0.5px;
}

/* --- СЕКЦИЯ PROJECT MODULES --- */
.modules-section {
    padding: 60px 0 100px; /* Отступы для секции */
    position: relative;
    z-index: 2;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 одинаковые колонки */
    gap: 25px; /* Расстояние между карточками */
    margin-top: 40px;
}

/* Сама карточка */
.module-card {
    position: relative;
    height: 450px; /* Высота карточки */
    border-radius: 16px; /* Скругление углов */
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    background-size: cover;
    background-position: center;
    /* Плавный переход для эффекта при наведении */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}
/* 1. Карточка немного приближается и приподнимается */
.module-card:hover {
    transform: translateY(-10px) scale(1.03);
    /*box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(122, 0, 254, 0.2);*/
    border: 1px solid rgba(122, 0, 254, 0.2);
    border-radius: 16px;
    box-shadow: 0 0 10px rgba(122, 0, 254, 0.3), 
                inset 0 0 10px rgba(122, 0, 254, 0.2);
}


/* Темный градиент поверх картинки, чтобы текст был белым и читаемым */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(13, 13, 17, 0.8) 0%, rgba(13, 13, 17, 0.2) 50%, rgba(13, 13, 17, 0.9) 100%);
    z-index: 1;
    transition: background 0.4s ease;
}

/* Контейнер для текста внутри карточки */
.card-content {
    position: relative;
    z-index: 2;
    padding: 35px 25px;
    text-align: center;
    height: 100%;
}

.card-title {
    color: var(--text-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 1px;
    /* Плавное включение тени */
    transition: text-shadow 0.3s ease, color 0.3s ease;
}

.card-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    /* Плавное включение тени */
    transition: text-shadow 0.3s ease, color 0.3s ease;
}


/* --- ЭФФЕКТЫ ПРИ НАВЕДЕНИИ (HOVER) --- */



/* 2. Текст заголовка получает твое уникальное фиолетовое свечение */
.module-card:hover .card-title {
    color: #ffffff;
    text-shadow: 0 0 5px #7a00fe, 
                 0 0 15px rgba(122, 0, 255, 0.8), 
                 0 0 25px rgba(122, 0, 255, 0.5);
}

/* 3. Описание тоже слегка подсвечивается для общей гармонии */
.module-card:hover .card-desc {
    color: #e0e0e0;
    text-shadow: 0 0 8px rgba(122, 0, 255, 0.4);
}

/* 4. Чуть высветляем картинку при наведении (уменьшаем черноту оверлея) */
.module-card:hover .card-overlay {
    background: linear-gradient(to bottom, rgba(13, 13, 17, 0.6) 0%, rgba(13, 13, 17, 0.1) 50%, rgba(13, 13, 17, 0.8) 100%);
}

/* Адаптивность: на экранах поменьше делаем 2 колонки, на мобилках - 1 */
@media (max-width: 1024px) {
    .modules-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .modules-grid { grid-template-columns: 1fr; }
}

/* --- ПОДВАЛ САЙТА (FOOTER) --- */
.site-footer {
    /* Делаем фон чуть темнее основного, чтобы визуально отделить низ сайта */
    background: rgba(8, 8, 11, 0.9); 
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(122, 0, 254, 0.15); /* Тонкая фиолетовая линия сверху */
    padding: 60px 0 20px;
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr; /* Первая колонка шире остальных */
    gap: 40px;
    margin-bottom: 50px;
}

/* Стили для первой колонки с логотипом */
.footer-logo {
    max-height: 40px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.footer-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 300px; /* Ограничиваем ширину текста, чтобы он не растягивался */
}

/* Стили для колонок со ссылками */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Расстояние между ссылками */
}

.footer-title {
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    width: fit-content;
}

/* Эффект наведения для ссылок футера */
.footer-links a:hover {
    color: var(--main-color);
    text-shadow: 0 0 10px rgba(122, 0, 254, 0.5);
    transform: translateX(5px); /* Легкий сдвиг вправо при наведении */
}

/* Нижняя панель с копирайтом */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- АДАПТИВНОСТЬ ДЛЯ ФУТЕРА --- */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки на планшетах */
    }
}

@media (max-width: 500px) {
    .footer-grid {
        grid-template-columns: 1fr; /* 1 колонка на мобильных телефонах */
        text-align: center;
    }
    
    .footer-desc {
        margin: 0 auto;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-links a:hover {
        transform: translateX(0) scale(1.05); /* Меняем сдвиг на увеличение для мобилок */
    }
}

/* ==========================================
   ИНДИКАТОР ПУТИ (ХЛЕБНЫЕ КРОШКИ БЕЗ ССЫЛОК)
   ========================================== */
.breadcrumbs-container {
    padding-top: 110px; /* Отступ под фиксированную шапку */
    padding-bottom: 0px;
    position: relative;
    z-index: 2;
   
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 100;
    text-transform: none;
    letter-spacing: 1.5px;
    user-select: none; /* Запрет выделения текста для аккуратности */
}

/* Промежуточные категории (полупрозрачные) */
.breadcrumb-item {
    color: var(--text-color);
}

/* Фиолетовый разделитель */
.breadcrumb-separator {
    color: var(--text-muted);
    font-weight: 700;
}

/* Текущая страница (акцентная с неоновым свечением) */
.breadcrumb-item.active {
    color: var(--main-color);
    text-shadow: 0 0 10px rgb(123, 0, 254);
    font-weight: 700;
}

/* Всплывающее модальное окно (общее для всех страниц) */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none; /* скрыто по умолчанию */
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.image-modal.active {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
}

.modal-close, .modal-prev, .modal-next {
    position: absolute;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
}

.modal-close { top: 20px; right: 30px; }
.modal-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.modal-next { right: 20px; top: 50%; transform: translateY(-50%); }