.materials_and_products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 0;
    margin: auto;
    margin-top: 100px;
    background-color: #003368;
    width: 100%;
    max-width: none;
}

.materials_and_products-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    justify-content: center;
}

.materials_and_products-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    width: 400px;
    height: 460px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeSlideUp 0.8s ease forwards;
    opacity: 0;
}

.texts_s {
    padding: 40px;
}

.texts_s h2 {
    font-size: 52px;
    color: white;
}

.texts_s p {
    font-size: 19px;
    color: white;
}

.materials_and_products-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.materials_and_products-card:hover img {
    transform: none;
}

.materials_and_products-card h3 {
    margin: 5px 0 0;
    font-size: 26px;
    color: white;
}

.overlay-services-materials_and_products {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: white;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    z-index: 2;
    pointer-events: none;
    padding-bottom: 20px;
    margin: 0px;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    transition: background-color 0.4s ease;
}

.overlay-services-materials_and_products img {
    width: 60px;
    height: auto;
    margin-bottom: 10px;
}

.materials_and_products-card:hover .overlay-services-materials_and_products {
    background-color: transparent;
}

.materials_and_products-card:nth-child(1) {
    animation-delay: 0.1s;
}

.materials_and_products-card:nth-child(2) {
    animation-delay: 0.2s;
}

.materials_and_products-card:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (min-width: 1201px) {
    .materials_and_products-container {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 1200px) {
    .materials_and_products-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 992px) {
    .materials_and_products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .materials_and_products-card {
        width: 100%;
        max-width: 90%;
        height: auto;
        margin: auto;
    }

    .overlay-services-materials_and_products img {
        width: 50px;
    }

    .materials_and_products-card h3 {
        font-size: 22px;
    }
}
@media (max-width: 600px) {
    .materials_and_products-container {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .materials_and_products-card {
        width: 375px;
        max-width: 95%;
        height: 250px;
        margin: auto;
    }

    .texts_s h2 {
        font-size: 32px;
    }

    .texts_s p {
        font-size: 16px;
    }

    .overlay-services-materials_and_products {
        padding-bottom: 15px;
    }

    .overlay-services-materials_and_products img {
        width: 45px;
    }

    .materials_and_products-card h3 {
        font-size: 20px;
    }
}
