@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600&display=swap');

/* ===== БАЗОВЫЕ СТИЛИ С FLUID-АДАПТАЦИЕЙ ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #e8ece8;
    color: #1a2a1f;
    /* FLUID: шрифт плавно меняется от 14px до 16px */
    font-size: clamp(14px, 1vw + 12px, 16px);
    line-height: 1.5;
    font-weight: 400;
}

/* ===== ТИПОГРАФИКА С FLUID-РАЗМЕРАМИ ===== */

h1, h2, h3, h4 {
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* FLUID: от 32px до 64px */
h1 {
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 500;
    margin-bottom: clamp(16px, 3vw, 20px);
}

/* FLUID: от 24px до 38px */
h2 {
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 500;
    margin-bottom: clamp(24px, 5vw, 40px);
    letter-spacing: -0.02em;
    text-align: left;
    color: #e31e24;
}

/* FLUID: от 18px до 22px */
h3 {
    font-size: clamp(18px, 3vw, 22px);
    font-weight: 500;
    margin-bottom: 12px;
}

h4 {
    font-size: clamp(16px, 2.5vw, 20px);
    font-weight: 500;
}

p, li, span, a {
    font-weight: 400;
    line-height: 1.5;
}

/* ===== СЕКЦИИ С FLUID-ОТСТУПАМИ ===== */

section {
    padding: clamp(48px, 8vw, 80px) 0;
    background-color: #ffffff;
    margin-bottom: 0;
    border-radius: 0;
}

section:last-of-type {
    margin-bottom: 0;
}

section[id] {
    scroll-margin-top: clamp(70px, 10vw, 90px);
}

/* ===== FLUID-КОНТЕЙНЕР ===== */

.container {
    max-width: min(1100px, 90%);
    margin: 0 auto;
    padding: 0 clamp(12px, 4vw, 24px);
}

/* ===== FLUID-СЕТКИ ===== */

/* Автоматическая подстройка колонок */
.services-grid,
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(20px, 3vw, 30px);
    margin-top: 20px;
}

.contact-grid-simple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: clamp(20px, 3vw, 30px);
    margin: 40px 0;
}

/* ===== АДАПТАЦИЯ ДЛЯ ПЛАНШЕТОВ (только критические моменты) ===== */

@media (max-width: 992px) {
    h2 {
        text-align: center;
    }
    
    .services-grid,
    .advantages-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    }
}

/* ===== АДАПТАЦИЯ ДЛЯ ТЕЛЕФОНОВ (только критические моменты) ===== */

@media (max-width: 768px) {
    h2 {
        text-align: center;
    }
    
    .services-grid,
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid-simple {
        grid-template-columns: 1fr;
    }
}

/* ===== АДАПТАЦИЯ ДЛЯ МАЛЕНЬКИХ ТЕЛЕФОНОВ ===== */

@media (max-width: 480px) {
    h1 {
        margin-bottom: 12px;
    }
    
    h2 {
        margin-bottom: 20px;
    }
}
/* ===== УМНАЯ АДАПТАЦИЯ (БЕЗ ГЕМОРРОЯ) ===== */

/* Плавные шрифты */
html {
    font-size: clamp(14px, 1.5vw, 16px);
}

/* Плавные отступы у секций */
section {
    padding: clamp(40px, 8vw, 80px) 0;
}

/* Плавные отступы у контейнера */
.container {
    padding-left: clamp(12px, 4vw, 24px);
    padding-right: clamp(12px, 4vw, 24px);
}

/* Заголовки плавно уменьшаются */
h1 {
    font-size: clamp(28px, 6vw, 64px);
}

h2 {
    font-size: clamp(22px, 5vw, 38px);
    margin-bottom: clamp(20px, 5vw, 40px);
}

h3 {
    font-size: clamp(18px, 3.5vw, 22px);
}

/* Герой */
.hero h1 {
    font-size: clamp(28px, 5vw, 48px);
}

.hero p {
    font-size: clamp(14px, 2.5vw, 18px);
}

.hero-wrapper {
    gap: clamp(20px, 5vw, 60px);
}

/* Сетки — сами подстраиваются */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: clamp(16px, 3vw, 30px);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: clamp(16px, 3vw, 30px);
}

/* Блок статистики — 5 колонок на десктопе, на планшете сами подстроятся */
.about-stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-card {
    flex: 1 1 0;
    min-width: 120px;
}

/* Планшеты */
@media (max-width: 992px) {
    .stat-card {
        flex: 0 0 33.33%;
    }
}

/* Телефоны */
@media (max-width: 768px) {
    .stat-card {
        flex: 0 0 50%;
    }
}

/* Маленькие телефоны */
@media (max-width: 480px) {
    .stat-card {
        flex: 0 0 100%;
    }
}