:root {
    --primary: #0044cc;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333; background:#fff; }
a { text-decoration: none; color: inherit; }

/* Header */
header {
    background: #fff;
    border-bottom: 1px solid #e9edf4;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}
.navbar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 500;
    color: inherit; /* Унаследовать цвет от родительского элемента */
}
.logo strong {
    color: #0f1f3d;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.05;
}
.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.0;
}
.logo span {
    background: var(--primary);
    color: white;
    width: 54px;
    height: 54px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}
.logo-subtitle {
    color: var(--gray);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.0;
    margin-top: 0;
}
nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}
nav a { color: #0f1f3d; font-weight: 500; transition: color .3s; }
nav a:hover { color: var(--primary); }
.btn-contact {
    background: var(--primary);
    color: white;
    padding: 0.65rem 1.6rem;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,68,204,0.15);
}

/* Hero */
.hero {
    padding: 180px 20px 140px;
    text-align: center;
    max-width: 1400px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-block;
    background: #e6f2ff;
    color: var(--primary);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}
.hero h1 {
    font-size: 4.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.hero h1 span { color: var(--primary); }
.hero p {
    font-size: 1.4rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto 2.5rem;
}
.hero-buttons a {
    padding: 1rem 2.2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 10px;
    display: inline-block;
    transition: all .3s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #003399; transform: translateY(-3px); }
.btn-secondary { background: white; color: #333; border: 2px solid #ddd; }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin: 4rem 0;
}
.stat {
    background: white;
    padding: 1.8rem 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-width: 180px;
}
.stat strong { font-size: 2.4rem; color: var(--primary); display: block; }
.stat span { font-size: 1rem; color: #555; }

/* Клиенты */
.clients {
    background: #f8fbff;
    padding: 6rem 20px;
    text-align: center;
}
.clients h2 { font-size: 2.8rem; margin-bottom: 1.5rem; }
.clients .subtitle { max-width: 900px; margin: 0 auto 4rem; font-size: 1.2rem; color: var(--gray); }
.recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.rec-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform .3s;
}
.rec-card:hover { transform: translateY(-8px); }
.rec-avatar {
    width: 80px;
    height: 80px;
    background: #ddd;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

/* Кнопка ВЕТИС */
.vetis-check-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 2rem;
    padding: 1rem 2.2rem;
    background: #f8fbff;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.vetis-check-btn i { font-size: 1.3rem; transition: transform 0.3s ease; }
.vetis-check-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,68,204,0.3);
}
.vetis-check-btn:hover i { transform: translate(6px, -6px); }

section { padding: 6rem 20px; max-width: 1400px; margin: 0 auto; }
h2 { font-size: 2.8rem; text-align: center; margin-bottom: 1.5rem; }
.subtitle { text-align: center; color: var(--gray); margin-bottom: 4rem; font-size: 1.2rem; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform .3s;
}
.service-card:hover { transform: translateY(-10px); }
.service-card img { width: 70px; margin-bottom: 1.5rem; }

.about-box {
    background: #f8fbff;
    padding: 3rem;
    border-radius: 16px;
    max-width: 1000px;
    margin: 4rem auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    text-align: center;
}
/*
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}
.contact-info, form {
    background: #f9f9ff;
    padding: 2.5rem;
    border-radius: 16px;
} */
/* Контактная информация — занимать всю ширину сетки (если рядом нет второго столбца) */
/*.contact-grid {
    grid-column: 1 / -1;
}
.contact-info {
    grid-column: 1 / -1;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}*/
/* Перенастройка колонок контактов: уже меньшая колонка контактов + более широкая гибкая карта */
.contact-grid {
    display: grid;
    grid-template-columns: clamp(320px, 28vw, 460px) minmax(500px, 1fr);
    gap: 1.75rem;
    align-items: start;
    margin-top: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Карта: базовая высота и уменьшенные размеры на больших экранах */
.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 360px; /* базовая высота */
    border: 0;
    border-radius: 8px;
}

.contact-item i { color: var(--primary); font-size: 1.5rem; }
input, textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.btn-submit {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    width: 100%;
}

.footer {
    /* background: #0044cc; */
    background: var(--dark);
    color: white;
    padding: 4rem 2rem 2rem;
    margin-top: 6rem;
}
.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}
.footer .logo strong {
    color: white;
}
.copyright { text-align: center; margin-top: 3rem; color: #777; font-size: 0.9rem; }

@media (max-width: 768px) {
    .hero h1 { font-size: 3.5rem; }
    .hero-stats, .recommendations { gap: 1.5rem; }
    .stat { padding: 1.5rem; }
}
.rec-avatar i {
    color: #fff;
    font-size: 2.2rem;
    line-height: 80px;
}
.rec-avatar {
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Адаптивность --- */

/* Общие упрощения для планшетов / небольших экранов */
@media (max-width: 1024px) {
    section { padding: 4rem 16px; }
    .hero h1 { font-size: 2.6rem; }
    .hero p { font-size: 1rem; max-width: 720px; margin: 1rem auto; }
    .logo span { width: 48px; height: 48px; font-size: 1.25rem; }
    .logo strong { font-size: 1.05rem; }

    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
    .service-card { padding: 1.25rem; }
    .clients .subtitle { padding: 0 1rem; }

    .contact-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .footer .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

/* Смартфоны — стек и увеличение удобочитаемости */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem 10px;
    }
    nav ul {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    nav a { padding: 0.25rem 0.5rem; }

    .btn-contact {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }

    .hero {
        padding: 3.5rem 12px;
    }
    .hero h1 { font-size: 2.1rem; text-align: center; }
    .hero p { font-size: 0.98rem; text-align: center; }

    .services-grid { grid-template-columns: 1fr; }
    .service-card { text-align: center; }

    .recommendations { gap: 1rem; }
    .rec-avatar { width: 56px; height: 56px; font-size: 1.6rem; }

    .contact-grid { grid-template-columns: 1fr; }
    form { width: 100%; }

    .footer .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer .logo { justify-content: center; }
    .footer .logo strong { color: white; } /* специфично для футера */
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    :root { font-size: 14px; }
    section { padding: 2.2rem 10px; }
    .hero h1 { font-size: 1.9rem; }
    .logo span { width: 44px; height: 44px; font-size: 1.1rem; }
    .hero-buttons .btn-primary { padding: 0.8rem 1rem; font-size: 0.95rem; }
    .footer { padding: 2rem 12px; }
}
/* Карта: увеличиваем минимальную высоту */
.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 360px;
    border: 0;
    border-radius: 8px;
}

/* Если место узкое — стекать под друг другом */
@media (max-width: 1024px) {
    .contact-grid { grid-template-columns: 1fr 360px; }
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-map { order: 2; }
    .contact-info { order: 1; }
    .contact-map iframe { min-height: 280px; }
}
/* Очень широкие экраны — уменьшено примерно на треть от прежних 620px */
@media (min-width: 1600px) {
    .contact-map iframe {
        min-height: 420px; /* примерно 2/3 от прежних 620px */
    }
}

/* Средние экраны */
@media (min-width: 1200px) {
    .contact-map iframe {
        min-height: 420px; /* уменьшено по сравнению с предыдущими значениями */
    }
}

/* Сохранить поведение для планшетов/мобилок */
@media (max-width: 1024px) {
    .contact-map iframe { min-height: 280px; }
}

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
    .contact-map { order: 2; }
    .contact-info { order: 1; }
    .contact-map iframe { min-height: 280px; }
}


/* резерв для фиксированной шапки */
:root { --header-height: 68px; }
body { padding-top: var(--header-height); }

/* увеличиваем резерв, когда шапка становится выше на планшетах/мобилах */
@media (max-width: 1024px) {
    :root { --header-height: 88px; }
}

@media (max-width: 768px) {
    :root { --header-height: 140px; }
    /* уменьшаем внутренний отступ героя — чтобы не было лишнего пространства */
    .hero { padding-top: calc(var(--header-height) + 1rem); }
}

@media (max-width: 480px) {
    :root { --header-height: 160px; }
    .hero { padding-top: calc(var(--header-height) + 0.5rem); }
}
/* Иконки в блоке Услуги — как в блоке Клиенты */
.service-card {
    display: flex;
    flex-direction: column;
    align-items: center; /* центрируем иконку и заголовок */
    text-align: center;
    padding: 1.6rem;
    /* ...existing styles may remain... */
}

.service-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

/* уменьшение на небольших экранах */
@media (max-width: 768px) {
    .service-icon {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .service-icon {
        width: 48px;
        height: 48px;
        font-size: 1.15rem;
    }
}

.contact-messengers {
    margin-top: 1rem;
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.messenger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.4rem;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform .12s ease, box-shadow .12s ease;
}

.messenger:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,0.12); }

.messenger-wa { background: #25D366; } /* WhatsApp green */
.messenger-tg { background: #0088cc; }  /* Telegram blue */

/* уменьшение на узких экранах */
@media (max-width: 480px) {
    .messenger { width:48px; height:48px; font-size:1.15rem; }
}

.contact-messengers {
    margin-top: 1rem;
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.messenger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.4rem;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform .12s ease, box-shadow .12s ease;
}

.messenger:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,0.12); }

.messenger-wa { background: #25D366; } /* WhatsApp green */
.messenger-tg { background: #0088cc; }  /* Telegram blue */

/* уменьшение на узких экранах */
@media (max-width: 480px) {
    .messenger { width:48px; height:48px; font-size:1.15rem; }
}

/* Увеличенные иконки слева в контактных строках и фиксированное поведение на мобильных */
.contact-item {
    display: flex;
    flex-direction: row; /* гарантируем горизонтальное расположение иконки + текста */
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.contact-item i {
    flex: 0 0 44px;           /* фиксированная ширина иконки */
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;       /* увеличенный размер символа */
    color: var(--primary);
    border-radius: 8px;
}

/* Текстовая часть занимает оставшееся место */
.contact-item > div {
    flex: 1 1 auto;
}

/* чуть больше отступа под блоком иконок мессенджеров */
/*.contact-messengers { margin-top: 1.75rem; } */

/* Мессенджеры — немного увеличим на всех экранах и уменьшим на очень узких */
.contact-messengers { gap: 1rem; margin-top: 1.75rem; }
.messenger { width: 60px; height: 60px; font-size: 1.45rem; }
@media (max-width: 480px) {
    .contact-item i {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
    .messenger { width: 52px; height: 52px; font-size: 1.25rem; }
}

/* Защита от случайных переопределений — если где-то в медиазапросах был vertical stacking */
@media (max-width: 768px) {
    .contact-item { flex-direction: row; }
}