:root {
    --primary: #0f172a;
    --secondary: #0ea5e9;
    --accent: #dc2626;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --dark-bg: #1e293b;
    --text-light: #f1f5f9;
    --text-dark: #000000;
    --border-color: #e2e8f0;
    --menu-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
}

img[loading="lazy"] {
    display: block;
    width: 100%;
    height: auto;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary);
    padding: 0 1rem;
    height: var(--menu-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-light);
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

.menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.menu a {
    color: var(--text-light);
    display: block;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s;
}

.menu a:hover::after,
.menu a.active::after {
    width: 100%;
}

.burger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
}

.burger div {
    position: absolute;
    height: 4px;
    width: 100%;
    background: var(--text-light);
    border-radius: 2px;
    transition: all 0.4s ease;
}

.burger div:nth-child(1) { top: 0; }
.burger div:nth-child(2) { top: 8px; }
.burger div:nth-child(3) { top: 16px; }

@media (max-width: 768px) {
    .menu {
        display: none;
        flex-direction: column;
        background: var(--primary);
        position: absolute;
        top: var(--menu-height);
        left: 0;
        width: 100%;
        padding: 1rem 2rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

    .menu.active {
        display: flex;
    }

    .burger {
        display: block;
    }

    .menu a {
        padding: 0.5rem 0;
        font-size: 1rem;
    }
}

.main-banner {
    background: linear-gradient(135deg, var(--primary), var(--dark-bg));
    color: var(--text-light);
    padding: 6rem 0 4rem;
    position: relative;
}

.main-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://komionline.ru/uploads/2016/08/node_74379_3.jpg ') center/cover no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.main-banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.main-banner-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.main-banner-content p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn:hover {
    background: #b91c1c;
}

.section {
    padding: 4rem 0;
    background: var(--background);
}

.section.dark {
    background: var(--dark-bg);
    color: var(--text-light);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--accent);
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
}

.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.2rem;
}

.about-text ul {
    margin-bottom: 1.2rem;
}

.about-text li {
    margin-bottom: 0.5rem;
}

.services-grid,
.projects-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card,
.project-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover,
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-card img,
.project-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.service-content,
.project-content {
    padding: 1.2rem;
}

.service-content h3,
.project-content h3 {
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.service-content p,
.project-content p {
    color: var(--text-dark);
    margin-bottom: 1.2rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 1rem;
}

.contact-item svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    fill: var(--accent);
    margin-top: 4px;
}

footer {
    background: var(--primary);
    color: var(--text-light);
    padding: 2rem 0;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
}

.copyright {
    text-align: center;
    padding-top: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent);
    color: var(--text-light);
    padding: 0.8rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    z-index: 999;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .about-section {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-text {
        max-width: 100%;
    }

    .main-banner-content h1 {
        font-size: 2rem;
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}