/* ====================================================== */
/* ===         ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ И СТИЛИ          === */
/* ====================================================== */
:root {
    --bg-color: #0A051E;
    --text-color: #E0E0E0; /* Сделал чуть светлее для контраста */
    --primary-neon: #00F0FF; /* Циан */
    --secondary-neon: #D900FF; /* Пурпурный */
    --font-headings: 'Poppins', sans-serif;
    --font-text: 'Roboto', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-text);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ====================================================== */
/* ===       ЛОГИКА ФОНОВЫХ ИЗОБРАЖЕНИЙ (НОВОЕ)       === */
/* ====================================================== */
#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.background-image.active {
    opacity: 0.15; /* Интенсивность фона, можно настроить */
}


/* ====================================================== */
/* ===                УТИЛИТАРНЫЕ КЛАССЫ              === */
/* ====================================================== */
.gradient-text {
    background: linear-gradient(90deg, var(--primary-neon), var(--secondary-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-family: var(--font-headings);
}

.neon-button {
    display: inline-block;
    padding: 12px 28px;
    border: 2px solid var(--primary-neon);
    border-radius: 8px;
    color: var(--primary-neon);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px var(--primary-neon), 0 0 10px var(--primary-neon) inset;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.neon-button:hover {
    background-color: var(--primary-neon);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--primary-neon), 0 0 25px var(--primary-neon);
    transform: scale(1.05) translateY(-2px);
}

/* ====================================================== */
/* ===            ОБЩАЯ СТРУКТУРА И СЕКЦИИ            === */
/* ====================================================== */
header, main > section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

/* --- Шапка --- */
header {
    padding-top: 20px;
    padding-bottom: 20px;
}
header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

header .logo {
    font-family: var(--font-headings);
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    margin-bottom: 8px;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: rgba(224, 224, 224, 0.8);
    margin: 0;
    max-width: 400px;
    line-height: 1.4;
    font-style: italic;
}
header ul {
    list-style: none;
    display: flex;
    gap: 40px;
    margin: 0;
}
header a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
header a:hover {
    color: var(--primary-neon);
    text-shadow: 0 0 5px var(--primary-neon);
}

/* --- Hero --- */
#hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}
#hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* --- Услуги --- */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.service-card {
    background: rgba(22, 16, 68, 0.5); /* Фон с фиолетовым оттенком */
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 12px;
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0);
}
.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-neon);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
}
.service-card h3 {
    font-family: var(--font-headings);
    color: #fff;
    margin-top: 0;
}

/* --- Портфолио --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.portfolio-item {
    background: rgba(22, 16, 68, 0.5);
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 240, 255, 0.2);
}
.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 25px rgba(217, 0, 255, 0.5); /* Пурпурная тень */
}
.portfolio-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.portfolio-info {
    padding: 20px;
}
.portfolio-info h3 {
    margin-top: 0;
    color: #fff;
}
.portfolio-links {
    margin-top: 15px;
    display: flex;
    gap: 15px;
}
.portfolio-links a {
    color: var(--primary-neon);
    text-decoration: none;
    font-weight: 500;
}

/* --- Контакты и Футер --- */
#contact p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}
footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    border-top: 1px solid rgba(0, 240, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* ====================================================== */
/* ===                  АДАПТИВНОСТЬ                  === */
/* ====================================================== */
@media (max-width: 768px) {
    #hero h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    header nav {
        flex-direction: column;
        gap: 20px;
    }
    
    .logo-section {
        align-items: center;
        text-align: center;
    }
    
    .logo-subtitle {
        max-width: 100%;
        font-size: 0.85rem;
    }
    
    header ul {
        padding: 0;
        gap: 25px;
    }
}