.dark-bg {
    background-color: #eaeaea;
    padding: 60px 0;
}

.container-categorii {
    display: flex;
    flex-wrap: wrap; 
    justify-content: flex-start; 
    margin: 0 auto;
    width: 100%;
    box-shadow: 0 -2px 16px rgba(0,0,0,.12), 0 2px 16px rgba(0,0,0,.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #282e6a;

}

.content-categorii-right {
    flex: 0 0 100%; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: flex-start; 
    text-align: left;
    box-sizing: border-box;
}

.content-categorii-right p {
    color: #fff;
}


.nasos-card-categorii {
    display: flex;
    min-height: 200px;
    max-height: 250px;
    text-decoration: none;
    overflow: hidden;
    background-color: #282e6a;
    cursor: pointer;
    box-sizing: border-box;
    padding: 20px 35px 20px 35px;
    flex: 0 0 100%;
    max-width: 100%;
}

.nasos-card-categorii-right {
    display: flex;
    min-height: 200px;
    max-height: 250px;
    text-decoration: none;
    overflow: hidden;
    background-color: #282e6a;
    cursor: pointer;
    box-sizing: border-box;
    padding: 0px 35px 20px 35px;
    flex: 0 0 100%;
    max-width: 100%;
}


.container-categorii:hover {
    box-shadow: 0 0 25px rgba(0,0,0,0.2);
    transform: translateY(-5px);
}

/* Контент занимает 50% */
.content-categorii {
    flex: 0 0 50%; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: flex-start; 
    text-align: left;
    background-color: #282e6a;
    box-sizing: border-box;
}


.content-categorii h2 {
    font-size: 22px;
    padding: 0 10px 10px 0;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}


.content-categorii p {
    font-size: 17px;
    padding: 0 10px 10px 0;
    color: #ffffff;
    line-height: 1.3;
}

.content-categorii-right h2 {
    font-size: 22px;
    padding: 0 10px 10px 0;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}


.content-categorii-right p {
    font-size: 17px;
    padding: 0 10px 10px 0;
    color: #ffffff;
    line-height: 1.3;
}




/* Фото занимает остальные 50% */
.photo-categorii {
    flex: 0 0 50%; 
    position: relative; /* Исправлено с position: left */
}

.photo-categorii img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Картинка заполнит всю область 50% без искажений */
    display: block;
}

.h3-white {
    color: #ffffff;
    text-transform: uppercase;
}

/* --- ЛОГИКА ДЛЯ МОБИЛЬНЫХ (<= 900px) --- */
@media (max-width: 900px) {
    .nasos-card-categorii {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .nasos-card-categorii-right {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0px 35px 20px 35px;
    }


}

/* --- МОБИЛЬНАЯ ВЕРСТКА КАРТОЧКИ (ФОТО НАД ТЕКСТОМ) --- */
@media (max-width: 600px) {


    .nasos-card-categorii {
        flex-direction: column; 
        margin-bottom:0px;
        max-height: 1000px; 
        padding: 10px 35px 0px 35px;        
    }

    .nasos-card-categorii-right {
        flex-direction: column; 
        margin-bottom:10px;
        padding: 0px 35px 20px 35px;
        max-height: 5000px;    
    }    

    
    .content-categorii {
        flex: 0 0 auto;
        width: 100%;
    }

    .photo-categorii {
        flex: 0 0 auto;
        width: 100%;
        height: 100px; /* Уменьшенная высота фото */
        order: -1; /* Фото сверху */
    }

    .h3-white {
        padding: 15px 0 0 0;
        font-size: 18px;
    } 

    .content-categorii p {
        font-size: 14px;
    }

    .content-categorii-right h2 {
        font-size: 18px;
    }

    .content-categorii-right p {
        font-size: 14px;
    }
}

