.nasos-select-section {
    background-color: #f9f9f9; /* Дефолтный фон */
    padding: 60px 0 80px;
}
.nasos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin: 40px auto 0;
}

.nasos-card {
    position: relative;
    background: #fff;
    padding: 40px 20px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 -2px 16px rgba(0,0,0,.12), 0 2px 16px rgba(0,0,0,.12);    
    /*box-shadow: 0 4px 15px rgba(0,0,0,0.08);*/
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 50px; /* Место для вылетающего фото */
    border-radius: 4px;
}

.nasos-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

/* Изображение: Эффект вылета вверх */
.nasos-card__img {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px; 
    height: 200px; /* Фиксированная высота для центрирования разных типов насосов */
    z-index: 2;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nasos-card:hover .nasos-card__img {
    transform: translate(-50%, -55%); 
}

.nasos-card__img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Картинка вписывается без искажений */
    display: block;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.1));
}

.nasos-card__info {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.nasos-card__title {
    margin-top: 50px; /* Отступ от верхней границы под фото */
    margin-bottom: 15px;
}

.nasos-card__line {
    width: 60px;
    height: 2px;
    background-color: #167f2b; /* Акцентный цвет */
    margin: 0 auto 15px;
}

.nasos-card__text {
    margin-bottom: 10px;
}

@media (max-width: 1024px) {
    .nasos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 80px 30px; /* Больше вертикальный отступ */
    }
}

@media (max-width: 768px) {
    .nasos-select-section {
        padding: 40px 0 50px;
    }

    .nasos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }

    .nasos-card {
        margin-top: 0;
        flex-direction: row; 
        text-align: left;
        padding: 20px;
        align-items: center;
        gap: 20px;
    }

    .nasos-card__img {
        position: static; 
        transform: none !important;
        flex: 0 0 90px; 
        width: 90px;
        height: 90px;
    }

    .nasos-card__info {
        flex: 1;
    }

    .nasos-card__title {
        margin-top: 0;
        margin-bottom: 8px;
    }

    .nasos-card__line {
        margin: 0 0 10px 0; 
    }

    .nasos-card__text {
        margin-bottom: 0;
    }
}

.theme-grey { background-color: #eaeaea; }
.theme-white { background-color: #ffffff; }
.theme-blue { background-color: #f0f7ff; }
.theme-green { background-color: #f4faf5; }

.nasos-card.is-clickable {
    text-decoration: none;
    cursor: pointer;
}

.nasos-card.is-clickable:hover .nasos-card__title {
    color: #167f2b; /* Заголовок меняет цвет при наведении на ссылку */
}
.nasos-card.is-clickable .nasos-card__text,
.nasos-card.is-clickable .nasos-card__title {
    color: #1a1a1a;
}
.nasos-card {
    /* Ваши базовые стили: фон, отступы, границы */
    text-decoration: none; /* Убирает подчеркивание у ссылок */
    color: inherit;
}
.nasos-card.is-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}
.nasos-card.is-clickable:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

/* ==========================================================================
   8. АДАПТИВНОСТЬ ДЛЯ СВЕРХМАЛЫХ ЭКРАНОВ (МЕНЬШЕ 350px)
   ========================================================================== */
@media (max-width: 350px) {
    .nasos-grid {
        gap: 60px 15px; /* Увеличиваем вертикальный зазор между карточками под вылетающие фото */
    }

    .nasos-card {
        flex-direction: column; /* Перестраиваем карточку обратно в вертикальный ряд */
        text-align: center; /* Центрируем текст */
        padding: 30px 15px 20px;
        margin-top: 45px; /* Создаем свободное место сверху карточки под изображение */
    }

    .nasos-card__img {
        position: absolute; /* Вырываем картинку из потока и отправляем наверх */
        top: 0;
        left: 50%;
        transform: translate(-50%, -50%) !important; /* Центрирование по верхней границе карточки */
        width: 100px; /* Увеличиваем размер (в мобильном ряду было 90px, теперь есть место) */
        height: 100px;
        flex: none;
    }

    /* Анимация легкого вылета при наведении на сверхмалых экранах */
    .nasos-card:hover .nasos-card__img {
        transform: translate(-50%, -55%) !important;
    }

    .nasos-card__info {
        width: 100%;
    }

    .nasos-card__title {
        margin-top: 50px; /* Делаем отступ от верхней границы, чтобы текст не заходил под фото */
        margin-bottom: 12px;
        font-size: 18px; /* Немного уменьшаем шрифт заголовка, чтобы он не переносился по одной букве */
    }

    .nasos-card__line {
        margin: 0 auto 12px; /* Центрируем декоративную зеленую линию */
    }
}
