/* ===== RESET И БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ===== КОНТЕЙНЕР ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    gap: 15px;
}

/* ЛОГОТИП */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: #0066cc;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo span {
    line-height: 1.1;
}

/* НАВИГАЦИЯ - 2 СТРОКИ (десктоп) */
.nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.nav-row {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.nav-row-1 {
    /* Первая строка - 4 пункта */
}

.nav-row-2 {
    /* Вторая строка - 5 пунктов */
}

.nav-row li {
    display: flex;
}

.nav-row a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 13px;
    transition: color 0.3s;
    white-space: nowrap;
    padding: 3px 5px;
    position: relative;
    display: block;
}

.nav-row a:hover {
    color: #0066cc;
}

.nav-row a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #0066cc;
    transition: width 0.3s;
}

.nav-row a:hover::after {
    width: 100%;
}

/* ТЕЛЕФОН */
.phone {
    flex-shrink: 0;
    white-space: nowrap;
}

.phone a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    transition: color 0.3s;
}

.phone a:hover {
    color: #004499;
}

/* ===== КНОПКА-ГАМБУРГЕР (по умолчанию скрыта) ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: 0.3s;
}

/* ===== HERO СЕКЦИЯ ===== */
.hero {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background: #fff;
    color: #0066cc;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* ===== SERVICES СЕКЦИЯ ===== */
.services {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #0066cc;
    font-weight: 700;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.15);
}

.service-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.service-card h3 {
    padding: 25px 25px 10px;
    color: #0066cc;
    font-size: 22px;
    font-weight: 600;
}

.service-card p {
    padding: 0 25px 20px;
    color: #666;
    line-height: 1.6;
    flex-grow: 1;
}

.btn-link {
    display: inline-block;
    margin: 0 25px 25px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s, margin-left 0.3s;
}

.btn-link:hover {
    opacity: 0.8;
    margin-left: 5px;
}

/* ===== CONTACTS СЕКЦИЯ ===== */
.contacts {
    padding: 80px 0;
    background: #fff;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    text-align: center;
}

.contact-item {
    padding: 30px 20px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: transform 0.3s;
}

.contact-item:hover {
    transform: translateY(-3px);
}

.contact-item h3 {
    color: #0066cc;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

.contact-item p {
    color: #333;
    font-size: 17px;
}

.contact-item a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: #0066cc;
}

/* ===== FOOTER ===== */
.footer {
    background: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 30px 0;
    font-size: 14px;
}

/* ===== SERVICE PAGE СТИЛИ ===== */
.service-header {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 70px 0;
    text-align: center;
}

.service-header h1 {
    font-size: 42px;
    margin-bottom: 15px;
    font-weight: 300;
    line-height: 1.2;
}

.service-header p {
    font-size: 18px;
    opacity: 0.95;
}

.service-page {
    padding: 60px 0;
}

.content-section {
    padding: 50px 0;
}

.content-section:nth-child(even) {
    background: #f8f9fa;
}

.content-section:first-child {
    padding-top: 0;
}

.content-section h2 {
    color: #0066cc;
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 300;
    position: relative;
    padding-bottom: 15px;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #0066cc;
}

.content-section h3 {
    color: #0066cc;
    font-size: 22px;
    margin: 25px 0 15px;
    font-weight: 600;
}

.content-section p {
    margin-bottom: 18px;
    line-height: 1.8;
    color: #555;
    font-size: 16px;
}

.content-section ol,
.content-section ul {
    margin-left: 0;
    margin-bottom: 25px;
}

.content-section li {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #555;
    padding-left: 5px;
}

/* Нумерованные списки */
.content-section ol {
    counter-reset: item;
    list-style: none;
}

.content-section ol li {
    counter-increment: item;
    position: relative;
    padding-left: 40px;
}

.content-section ol li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: #0066cc;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* Списки преимуществ с плюсом */
.features-list {
    list-style: none;
    margin-left: 0;
}

.features-list li {
    padding-left: 35px;
    position: relative;
    margin-bottom: 15px;
}

.features-list li::before {
    content: '+';
    position: absolute;
    left: 0;
    top: 0;
    color: #0066cc;
    font-weight: bold;
    font-size: 22px;
    line-height: 1.4;
}

.service-image {
    width: 100%;
    max-width: 800px;
    margin: 30px auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ===== CTA СЕКЦИЯ ===== */
.cta-section {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 70px 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: 15px;
    font-size: 32px;
    font-weight: 300;
}

.cta-section p {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 25px;
}

.cta-section .btn {
    background: #fff;
    color: #0066cc;
    font-size: 18px;
    padding: 16px 45px;
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Планшеты и небольшие десктопы */
@media (max-width: 1024px) {
    .header-content {
        gap: 10px;
        padding: 10px 15px;
    }

    .logo {
        font-size: 22px;
    }

    .logo img {
        height: 38px;
    }

    .nav-row {
        gap: 10px;
    }

    .nav-row a {
        font-size: 12px;
        padding: 2px 4px;
    }

    .phone a {
        font-size: 14px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .section-title {
        font-size: 32px;
    }
}

/* Мобильные устройства — ГАМБУРГЕР */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 15px;
    }

    .logo {
        font-size: 18px;
        flex: 1;
    }
    .logo img {
        height: 30px;
    }

    /* Кнопка-гамбургер — показываем */
    .menu-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
    }

    /* Телефон — сдвигаем вправо, но можно оставить на месте */
    .phone {
        order: 3;
        margin-left: 0;
    }
    .phone a {
        font-size: 15px;
    }

    /* Навигация — скрыта по умолчанию, открывается по классу .open */
    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 6px;
        padding: 15px 0 5px;
        border-top: 1px solid #eee;
        order: 4;
        flex-basis: 100%;
    }
    .nav.open {
        display: flex;
    }

    .nav-row {
        flex-direction: column;
        gap: 4px;
        width: 100%;
        text-align: center;
    }
    .nav-row a {
        display: block;
        padding: 6px 0;
        font-size: 14px;
        white-space: normal;
    }
    /* Убираем подчёркивание на мобильных */
    .nav-row a::after {
        display: none;
    }

    /* Анимация гамбургера в крестик при активном состоянии */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Остальные секции — компактнее */
    .hero {
        padding: 40px 0;
    }
    .hero h1 {
        font-size: 28px;
    }
    .hero p {
        font-size: 16px;
    }
    .services {
        padding: 40px 0;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    .service-header {
        padding: 40px 0;
    }
    .service-header h1 {
        font-size: 28px;
    }
    .content-section h2 {
        font-size: 24px;
    }
    .section-title {
        font-size: 26px;
    }
}

/* Маленькие мобильные устройства */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .service-header h1 {
        font-size: 26px;
    }

    .btn {
        padding: 12px 30px;
        font-size: 15px;
    }

    .nav-row a {
        font-size: 13px;
    }
}