/* --- grid & container --- */
.container-dynamic-items-widget_eight {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px; 
    padding: 0 10px;
    width: 100%;
}

.container-widget-item_eight {
    display: flex; 
    flex-direction: column;
    align-items: center;
    margin: 0; 
}

.container-widget-dynamic-items_eight h3 {
    text-align: center;
    /* margin-bottom: 0px !important; */
    font-size: 2em;
    font-weight: bold;
}

.container-widget-item_eight a {
    border-bottom: none !important;
}


.rectangular-shape-item_eight {
    width: 100%;
    height: 18em;
    position: relative;
    display: block;
    overflow: hidden;
    background: unset !important;
}

.rectangular-shape-item_eight img {
    object-fit: cover;
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px;
    display: block;
}

.rectangular-shape-item_eight:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
    width: 100%;
    height: 11em; 
}


.container-widget-link-name_eight {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    margin-top: 10px;
    text-decoration: none !important;
    width: 100%;
    z-index: 5; 
    position: relative;
}

.container-widget-name_eight {
    color: white; 
    font-size: 1.5em; 
    text-align: center;
    margin: 0;
    word-wrap: break-word;
}

/* --- mobile responsiveness --- */
@media screen and (max-width: 768px) {
    .container-dynamic-items-widget_eight {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .rectangular-shape-item_eight,
    .rectangular-shape-item_eight img {
        width: 100% !important;
        height: 11em;
        border-radius: 5px;
    }

    .container-widget-name_eight {
        font-size: 1.1em;
    }

    .rectangular-shape-item_eight:after {
        width: 100%;
        left: 0;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
    }

    .container-widget-dynamic-items_eight h3 {
        font-size: 1.7em;
        margin-top: 20px !important;
        /* margin-bottom: 0px !important; */
    }
}

@media screen and (max-width: 420px) {
    .rectangular-shape-item_eight,
    .rectangular-shape-item_eight img {
        height: 11em;
    }
}