/* Mobile First (до 480px) - базовые стили для main-section */
.main-section,
.about-section {
    margin-left: 0;
}

.main-section .container,
.about-section .container {
    margin-left: 20px; /* Меньший отступ для мобильных */
}

.hero-section {
    display: flex;
    flex-direction: column; /* Вертикальная компоновка на мобильных */
    justify-content: center;
    align-items: flex-start;
    min-height: 70vh;
    gap: 40px;
    position: relative; /* Для позиционирования */
}

.hero-content {
    max-width: 100%;
    flex: none;
    width: 100%;
    position: relative; /* Относительное позиционирование */
}

.hero-heading {
    font-size: 36px; /* Меньший размер для мобильных */
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 30px;
    line-height: 1.1;
    color: #FFFFFF;
    text-align: left;
}

.hero-button {
    text-align: center;
    width: 100%; /* Полная ширина на мобильных */
    max-width: 300px;
    background: linear-gradient(var(--accent-orange), var(--accent-red));
    border-radius: 10px;
    border: 0px;
    padding: 18px 0;
    transition: transform 0.3s ease;
}

.hero-button:hover {
    transform: translateY(-2px);
}

.hero-button a {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-white);
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

/* Hero image - СКРЫВАЕМ для мобильных */
.hero-image {
    display: none; /* Скрываем весь блок hero-image для мобильных */
}

/* Скрываем фоновое изображение для мобильных */
.hero-image-background {
    display: none;
}

/* Content wrapper */
.content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0;
    text-align: left;
}

.about-content {
    width: 100%;
    text-align: left;
}

.about-text {
    width: 100%; /* Полная ширина на мобильных */
    max-width: 100%;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: left;
    font-size: 14px;
}

/* Advantages grid - ОСНОВНЫЕ СТИЛИ */
.advantages-grid {
    display: grid;
    grid-template-columns: 1fr; /* Одна колонка на мобильных */
    gap: 15px;
    margin: 25px 0;
    justify-items: start;
}

.advantage-card {
    border-radius: 10px;
    padding: 25px 15px;
    border: 1px solid #00C3FF;
    background: #03204C4D;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    height: auto; /* Автоматическая высота */
    min-height: 180px;
    text-align: left;
    width: 100%;
}

.wide-advantages-row {
    display: none; /* Убираем старый подход с отдельным рядом */
}

.wide-card {
    grid-column: span 1; /* На мобильных обычная карточка */
    height: auto;
    min-height: 160px;
    width: 100%;
}

.advantage-title {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 8px 0;
    text-align: left;
}

.advantage-description {
    font-size: 12px;
    color: #FFFFFF;
    line-height: 1.4;
    margin: 0;
    text-align: left;
}

.about-section {
    padding: 0px 0px 60px 0px;
    background: transparent;
}

.about-section .content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0;
    text-align: left;
}

.about-section .hero-heading {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 25px;
    color: #FFFFFF;
    text-align: left;
}

.about-section .about-content {
    width: 100%;
    text-align: left;
}

.about-section .about-text {
    width: 100%;
    max-width: 800px;
    line-height: 1.6;
    margin-bottom: 40px;
    text-align: left;
    color: #FFFFFF;
    font-size: 14px;
}

/* 2. Mobile landscape / Large mobile (480px-767px) */
@media (min-width: 480px) {
    .main-section .container,
    .about-section .container {
        margin-left: 30px;
    }
    
    .hero-heading {
        font-size: 42px;
    }
    
    .hero-button {
        max-width: 320px;
        padding: 20px 0;
    }
    
    .hero-button a {
        font-size: 16px;
    }
    
    .about-section .hero-heading {
        font-size: 38px;
    }
    
    .about-text {
        font-size: 15px;
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr); /* Две колонки */
        gap: 20px;
    }
    
    .wide-card {
        grid-column: span 1; /* Обычные карточки на мобильных */
    }
    
    .advantage-card {
        padding: 30px 20px;
        min-height: 200px;
    }
    
    .wide-card {
        min-height: 180px;
    }
    
    .advantage-title {
        font-size: 17px;
    }
    
    .advantage-description {
        font-size: 13px;
    }
}

/* 3. Tablets и выше (768px+) */
@media (min-width: 768px) {
    .main-section .container,
    .about-section .container {
        margin-left: var(--spacing-55);
    }
    
    .hero-section {
        display: flex;
        flex-direction: row; /* Горизонтальная компоновка */
        justify-content: space-between;
        align-items: center;
        column-gap: 30px;
        min-height: 60vh;
        position: static;
    }
    
    .hero-content {
        max-width: 500px;
        flex: 1;
        position: static;
    }
    
    .hero-heading {
        font-size: 50px;
        margin-bottom: 40px;
    }
    
    .hero-button {
        width: 350px;
        max-width: 350px;
        padding: 20px 0;
    }
    
    .hero-button a {
        font-size: 18px;
    }
    
    /* ПОКАЗЫВАЕМ hero-image для планшетов и десктопов */
    .hero-image {
        display: flex; /* Показываем блок */
        flex: 1;
        position: relative;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        min-height: 400px; /* Начальная минимальная высота для планшетов */
        overflow: hidden;
        margin-right: -20px; /* Уменьшаем отрицательный margin */
        width: auto;
    }
    
    /* Показываем фоновое изображение для десктопов */
    .hero-image-background {
        display: none;
    }
    
    .hero-image-background img {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%) scale(1.2) translateX(30%);
        width: auto;
        height: auto;
        max-height: 100vh;
        filter: blur(4px);
        opacity: 0.9;
    }
    
    /* ОСНОВНОЕ ИЗОБРАЖЕНИЕ - БЕЗ translateY() */
    .hero-image-foreground {
        position: relative;
        z-index: 3;
        max-width: 70%;
        transform: 
            rotate(-5deg)
            scale(1.1);
        transition: all 0.3s ease;
    }
    
    .hero-image-foreground img {
        width: 100%;
        height: auto;
        border-radius: 10px;
        filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
    }
    
    .about-section {
        padding: 0px 0px 30px 0px;
    }
    
    .about-section .hero-heading {
        font-size: 50px;
        margin-bottom: 30px;
    }
    
    .about-text {
        width: 80%;
        max-width: 800px;
        font-size: 16px;
        margin-bottom: 40px;
    }
    
    /* 2 КОЛОНКИ для 768px-1439px */
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr); /* Две колонки до 1440px */
        gap: 20px;
        margin: 30px 0;
    }
    
    .wide-card {
        grid-column: span 1; /* Обычные карточки */
    }
    
    .advantage-card {
        padding: 35px 20px;
        height: 220px;
    }
    
    .wide-card {
        height: 220px; /* Такая же высота */
    }
    
    .advantage-title {
        font-size: 18px;
    }
    
    .advantage-description {
        font-size: 14px;
    }
}

/* 3.1 Для узких планшетов (768px-899px) */
@media (min-width: 768px) and (max-width: 899px) {
    .hero-image-foreground {
        max-width: 75%;
        transform: 
            rotate(-5deg)
            scale(1.05);
    }
    
    .hero-image {
        min-height: 350px;
    }
}

/* 4. Desktop (900px-1439px) */
@media (min-width: 900px) and (max-width: 1439px) {
    .hero-heading {
        font-size: 55px;
    }
    
    .about-section .hero-heading {
        font-size: 55px;
    }
    
    .hero-image {
        min-height: 500px;
        margin-right: -25px;
    }
    
    .hero-image-foreground {
        max-width: 65%;
        transform: 
            rotate(-5deg)
            scale(1.25);
    }
    
    .hero-image-foreground img {
        filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
    }
    
    /* Сохраняем 2 колонки до 1440px */
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .advantage-card {
        height: 242px;
    }
    
    .wide-card {
        height: 242px;
    }
}

/* 5. Большие десктопы (1440px и больше) - 3 КОЛОНКИ */
@media (min-width: 1440px) {
    .hero-heading {
        font-size: 60px;
    }
    
    .about-section .hero-heading {
        font-size: 60px;
    }
    
    .hero-image {
        min-height: 550px;
        margin-right: -30px;
    }
    
    /* Показываем фоновое изображение с 1440px */
    @media (min-width: 1325px) {
        .hero-image-background {
            display: block;
            position: fixed;
            top: 0;
            right: 0;
            width: 50%;
            height: 100%;
            z-index: -1;
            pointer-events: none;
            overflow: hidden;
        }
        
        .hero-image-background img {
            position: absolute;
            top: 50%;
            right: 0;
            transform: translateY(-50%) scale(1.2) translateX(30%);
            width: auto;
            height: auto;
            max-height: 100vh;
            filter: blur(4px);
            opacity: 0.9;
        }
    }
    
    .hero-image-foreground {
        max-width: 60%;
        transform: 
            rotate(-5deg)
            scale(1.3);
    }
    
    .hero-content {
        max-width: 550px;
    }
    
    /* 3 КОЛОНКИ ДЛЯ 1440px+ */
    .advantages-grid {
        grid-template-columns: repeat(3, 1fr); /* Теперь 3 колонки */
        gap: 25px;
        margin: 30px 0;
    }
    
    .wide-card {
        grid-column: span 1;
    }
    
    .advantage-card {
        padding: 40px 25px;
        height: 260px;
    }
    
    .wide-card {
        height: 260px;
    }
    
    .advantage-title {
        font-size: 20px;
    }
    
    .advantage-description {
        font-size: 15px;
    }
}

/* 6. Full HD (1920px-2559px) */
@media (min-width: 1920px) and (max-width: 2559px) {
    .hero-heading {
        font-size: 75px;
    }
    
    .about-section .hero-heading {
        font-size: 75px;
    }
    
    .hero-image {
        min-height: 700px;
    }
    
    .hero-image-foreground {
        max-width: 55%;
        transform: 
            rotate(-5deg)
            scale(1.45);
    }
    
    .hero-content {
        max-width: 650px;
    }
    
    .hero-image-background img {
        transform: translateY(-50%) scale(1.35) translateX(35%);
        filter: blur(3px);
        opacity: 0.95;
    }
    
    /* Увеличиваем блок "О компании", сохраняем 3 колонки */
    .about-section .content-wrapper {
        max-width: 1400px;
    }
    
    .about-text {
        font-size: 18px;
        max-width: 900px;
    }
    
    /* Сохраняем 3 колонки */
    .advantages-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
        margin: 50px 0;
    }
    
    .advantage-card {
        padding: 50px 30px;
        height: 300px;
        border-radius: 15px;
    }
    
    .wide-card {
        height: 300px;
    }
    
    .advantage-title {
        font-size: 22px;
    }
    
    .advantage-description {
        font-size: 16px;
    }
}

/* 7. 2K мониторы (2560px-3839px) */
@media (min-width: 2560px) {
    .hero-heading {
        font-size: 85px;
    }
    
    .about-section .hero-heading {
        font-size: 85px;
    }
    
    .hero-section {
        min-height: 70vh;
        column-gap: 50px;
    }
    
    .hero-image {
        min-height: 800px;
        margin-right: -50px;
    }
    
    .hero-image-foreground {
        max-width: 50%;
        transform: 
            rotate(-5deg)
            scale(1.6);
    }
    
    .hero-content {
        max-width: 750px;
    }
    
    .hero-button {
        width: 400px;
        padding: 25px 0;
    }
    
    .hero-button a {
        font-size: 20px;
    }
    
    /* Увеличиваем фон для 2K */
    .hero-image-background {
        width: 45%;
    }
    
    .hero-image-background img {
        transform: translateY(-50%) scale(1.5) translateX(40%);
        filter: blur(2px);
        opacity: 1;
    }
    
    /* Масштабируем контейнер для 2K */
    .container {
        max-width: 2400px;
        padding: 0 100px;
    }
    
    .main-section .container,
    .about-section .container {
        margin-left: calc(var(--spacing-55) * 2); /* Увеличиваем отступ */
    }
    
    /* Увеличиваем блок "О компании" для 2K, сохраняем 3 колонки */
    .about-section .content-wrapper {
        max-width: 1600px;
    }
    
    .about-text {
        font-size: 20px;
        max-width: 1000px;
        margin-bottom: 60px;
        line-height: 1.7;
    }
    
    /* Сохраняем 3 колонки */
    .advantages-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 50px;
        margin: 60px 0;
    }
    
    .advantage-card {
        padding: 60px 35px;
        height: 350px;
        border-radius: 20px;
        border-width: 2px;
    }
    
    .wide-card {
        height: 350px;
    }
    
    .advantage-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .advantage-description {
        font-size: 18px;
        line-height: 1.6;
    }
}