:root {
    --primary: #05b7c3;
    --primary-hover: #049ca6;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --shadow: 0 5px 25px rgba(0,0,0,0.05);
    --border-color: #e9ecef;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #333;
    background: #fff;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--primary-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Кнопки */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    border: 2px solid transparent;
    padding: 0.7rem 2rem;
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.2s;
    cursor: pointer;
    background: var(--primary);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(5,183,195,0.3);
}
.btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 15px rgba(5,183,195,0.4);
    text-decoration: none;
}
.btn-outline {
    background: transparent;
    border-color: #fff;
    color: #fff;
    box-shadow: none;
}
.btn-outline:hover { background: #fff; color: var(--dark); }

/* Шапка */
.header {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.logo img { height: 40px; width: auto; }
.header-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    font-size: 0.9rem;
}
.header-contacts a { color: var(--dark); font-weight: 600; white-space: nowrap; }
.header-contacts .phone { font-size: 1.2rem; color: var(--primary); }
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #f1f3f5;
    color: var(--gray);
    margin-left: 8px;
    transition: all 0.2s;
}
.social-icons a:hover { background: var(--primary); color: #fff; }

/* Навигация */
.main-nav {
    display: flex;
    gap: 25px;
    list-style: none;
    margin-left: auto;
}
.main-nav a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    text-transform: uppercase;
    transition: color 0.2s;
    white-space: nowrap;
}
.main-nav a:hover {
    color: var(--primary);
    text-decoration: none;
}
@media (max-width: 768px) {
    .header-inner {
        justify-content: space-between;
    }
    .main-nav {
        display: none; /* на мобильных скроем, или можно сделать бургер */
    }
}

/* Герой с параллаксом */
.hero {
    position: relative;
    background: url('/img/hero.webp') center/cover no-repeat fixed;
    min-height: 90vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}
.hero h1 { font-size: 2.8rem; margin-bottom: 20px; color: #fff; }
.hero p { font-size: 1.3rem; margin-bottom: 30px; opacity: 0.9; }

/* Секции */
.services, .clients, .brief, .faq { padding: 80px 0; background: #fff; }
.section-title { text-align: center; margin-bottom: 2.5rem; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.service-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    background: #fff;
    border: 1px solid var(--border-color);
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}
.service-card .bg-img {
    height: 200px;
    background-size: cover;          
    background-position: center;
    background-repeat: no-repeat;    
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2.5rem;
    background-color: var(--dark);
}
.service-card .overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
}
.service-card .icon { position: relative; z-index: 1; }
.service-card .content { padding: 25px 20px 30px; }
.service-card h3 { text-transform: uppercase; font-size: 1.1rem; margin-bottom: 10px; }
.price { font-weight: 700; font-size: 1.2rem; color: var(--primary); margin-bottom: 20px; }
.service-card .btn { font-size: 0.85rem; padding: 0.5rem 1.5rem; }

/* Блок точности */
.accuracy {
    background: var(--primary);
    color: #fff;
    padding: 80px 0;
}
.accuracy-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}
.accuracy-text { flex: 1 1 400px; }
.accuracy-text h2 { color: #fff; }
.accuracy-img { flex: 1 1 300px; text-align: center; }
.accuracy-img img { max-width: 250px; margin: 0 auto; }

/* Карусель клиентов */
.carousel-container { position: relative; overflow: hidden; }
.carousel-track { display: flex; transition: transform 0.5s ease; }
.carousel-slide {
    min-width: 200px;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.carousel-slide img {
    max-height: 60px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}
.carousel-slide img:hover { filter: grayscale(0); opacity: 1; }
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid var(--border-color);
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-btn.left { left: 10px; }
.carousel-btn.right { right: 10px; }

/* Обратная связь две колонки */
.feedback {
    display: flex;
    flex-wrap: wrap;
    min-height: 400px;
}
.feedback-col {
    flex: 1 1 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: #fff;
}
.feedback-col::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
}
.feedback-content { position: relative; z-index: 1; }
.feedback-content h3 { color: #fff; font-size: 1.6rem; margin-bottom: 20px; }

/* Деятельность - карточки с затемнением */
.activity {
    padding: 80px 0;
    background: #f8f9fa;
}
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.activity-card {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    height: 300px;
    display: flex;
    align-items: flex-end;
    color: #fff;
}
.activity-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3); /* затемнение 30% */
    z-index: 1;
}
.activity-card .card-body {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 30px 20px;
    text-align: center;
}
.activity-card h3 { color: #fff; text-transform: uppercase; font-size: 1.2rem; margin: 0; }

/* Брифы */
.brief-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    text-align: center;
}
.brief-item {
    padding: 30px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s;
}
.brief-item:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(5,183,195,0.1);
}
.brief-item i { font-size: 2.5rem; color: var(--primary); margin-bottom: 15px; display: block; }
.brief-item a { font-weight: 600; }

/* Отзывы (галерея) */
.reviews { padding: 80px 0; background: #f8f9fa; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.gallery-item { overflow: hidden; cursor: pointer; }
.gallery-item img { width: 100%; height: 300px; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }

/* Этапы */
.stages {
    background: var(--dark);
    color: #fff;
    padding: 80px 0;
}
.stages h2 { color: #fff; text-align: center; }
.stages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.stage-card {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 25px 25px 25px 90px;
    position: relative;
}
.stage-number {
    position: absolute;
    left: 20px;
    top: 25px;
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}
.stage-card h4 { color: #fff; margin-bottom: 8px; }
.stage-card p { color: rgba(255,255,255,0.7); margin: 0; }

/* FAQ */
.faq-item { margin-bottom: 20px; }
.faq-question {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: baseline;
}
.faq-question i { color: var(--primary); margin-right: 12px; font-size: 1.2rem; }
.faq-answer { margin-left: 32px; color: #555; margin-top: 5px; }

/* Контакты */
.contacts {
    background: var(--primary);
    color: #fff;
    padding: 80px 0;
}
.contacts-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}
.contacts-info { flex: 1 1 300px; }
.contacts-info h2 { color: #fff; }
.contacts-info a { color: #fff; }
.contacts-map {
    flex: 1 1 500px;
    min-height: 350px;
    border-radius: 10px;
    overflow: hidden;
}

/* Подвал */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 25px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal.active { display: flex; }
.modal-content {
    background: #fff;
    max-width: 500px;
    width: 100%;
    border-radius: 12px;
    padding: 40px 30px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}
.modal-close:hover { color: #000; }
.modal h3 { margin-bottom: 20px; font-size: 1.5rem; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}
.consent {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
}
.consent input { margin-top: 3px; }
.consent a { color: var(--primary); text-decoration: underline; }
.btn-submit { width: 100%; }
.message-success {
    text-align: center;
    font-size: 1.1rem;
    color: #28a745;
    padding: 20px 0;
}

/* Адаптив */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .gallery-item img { height: 200px; }
    .hero { background-attachment: scroll; }
    .main-nav { display: none; } /* скрываем меню на мобильных, если нужно — замените на бургер */
}

/* Верхняя контактная полоса */
.top-bar {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 0;
}
.top-bar-inner {
    display: flex;
    justify-content: flex-end; /* контакты справа */
    align-items: center;
}
.top-bar .header-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    font-size: 0.9rem;
}
.top-bar .header-contacts a {
    color: #333;
    font-weight: 600;
    white-space: nowrap;
}
.top-bar .header-contacts .phone {
    font-size: 1.2rem;
    color: var(--primary);
}

/* Основная шапка */
.header {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* логотип слева */
}

/* Навигация с тёмным фоном */
.main-nav-bar {
    background: #1a1a2e; /* тёмный, как --dark */
    padding: 10px 0;
    position: sticky;
    top: 70px; /* чтобы не перекрывалась header'ом, подогнать под высоту header */
    z-index: 999;
}
.main-nav {
    display: flex;
    gap: 25px;
    list-style: none;
    justify-content: center;
    margin: 0;
    padding: 0;
}
.main-nav a {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    text-transform: uppercase;
    transition: color 0.2s;
    white-space: nowrap;
    text-decoration: none;
}
.main-nav a:hover {
    color: var(--primary);
}

/* Адаптивность */
@media (max-width: 768px) {
    .top-bar-inner {
        justify-content: center;
    }
    .main-nav-bar {
        position: relative;
        top: 0;
    }
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}


/* ======== Шапка и меню (фиксация) ======== */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: #fff; /* для верхней строки */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-top {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}
.header-top .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Контакты – выравнивание справа */
.header-top .header-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: center;
    font-size: 0.9rem;
}
.header-top .header-contacts a,
.header-top .header-contacts span {
    white-space: nowrap;
    color: #333;
    font-weight: 600;
}
.header-top .header-contacts .phone {
    font-size: 1.15rem;
    color: var(--primary);
}

/* Соц. иконки */
.header-top .social-icons {
    display: flex;
    gap: 5px;
}
.header-top .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f3f5;
    color: #666;
    transition: all 0.2s;
}
.header-top .social-icons a:hover {
    background: var(--primary);
    color: #fff;
}

/* Меню на тёмном фоне */
.main-nav-bar {
    background: #1a1a2e; /* тёмный, как --dark */
    padding: 8px 0;
}
.main-nav {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}
.main-nav a {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: color 0.2s;
}
.main-nav a:hover {
    color: var(--primary);
}

/* ======== Адаптивность ======== */
@media (max-width: 768px) {
    .header-top .container {
        justify-content: center;
        text-align: center;
    }
    .header-top .header-contacts {
        justify-content: center;
        gap: 15px;
        font-size: 0.85rem;
    }
    .header-top .work-hours {
        display: none; /* скрываем часы на мобильных для экономии места */
    }
    .main-nav-bar {
        display: none; /* меню убираем, если нужен бургер – добавите позже */
    }
}

/* Калькулятор */
.calculator {
    background: #f8f9fa;
    padding: 60px 0;
}
.calculator-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}
.calc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}
.calc-row .form-group {
    flex: 1 1 200px;
}
.calc-result {
    text-align: center;
    margin-top: 30px;
    padding: 25px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}
.calc-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}
.calc-note {
    color: #888;
    font-size: 0.9rem;
}
/* Сравнительная таблица */
.comparison {
    padding: 80px 0;
    background: #fff;
}
.comparison-table {
    overflow-x: auto;
    box-shadow: var(--shadow);
    border-radius: 10px;
}
.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}
.comparison-table th,
.comparison-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.comparison-table th {
    background: var(--dark);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
}
.comparison-table th:first-child {
    border-radius: 10px 0 0 0;
}
.comparison-table th:last-child {
    border-radius: 0 10px 0 0;
}
.comparison-table tr:last-child td {
    border-bottom: none;
}
.comparison-table tr:hover {
    background: #f8f9fa;
}
.check {
    color: #28a745;
    font-weight: 700;
}
.cross {
    color: #dc3545;
    font-weight: 700;
}
/* Компенсация для фиксированной шапки */
.hero {
    padding-top: 110px;  /* высота sticky-header ~110px (контакты + меню) */
}

section[id] {
    scroll-margin-top: 110px;  /* чтобы заголовки не уезжали под меню при якорном скролле */
}