.wpb-charities-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centers last row if it has fewer than 4 items */
    gap: 20px; /* Space between grid items */
    margin-top: 60px;
}

.wpb-charity-item {
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes items apart */
    align-items: center;
    flex: 1 1 calc(25% - 20px); 
    max-width: calc(25% - 20px);
    position: relative;
    transition: transform 0.3s ease-in-out;

    background: radial-gradient(circle at 100% 100%, #ffffff 0, #ffffff 29px, transparent 29px) 0% 0%/30px 30px no-repeat,
    radial-gradient(circle at 0 100%, #ffffff 0, #ffffff 29px, transparent 29px) 100% 0%/30px 30px no-repeat,
    radial-gradient(circle at 100% 0, #ffffff 0, #ffffff 29px, transparent 29px) 0% 100%/30px 30px no-repeat,
    radial-gradient(circle at 0 0, #ffffff 0, #ffffff 29px, transparent 29px) 100% 100%/30px 30px no-repeat,
    linear-gradient(#ffffff, #ffffff) 50% 50%/calc(100% - 2px) calc(100% - 60px) no-repeat,
    linear-gradient(#ffffff, #ffffff) 50% 50%/calc(100% - 60px) calc(100% - 2px) no-repeat,
    linear-gradient(90deg, #cefedc 0%, #98b9f6 100%);
    border-radius: 30px;
    box-sizing: border-box;
}


.wpb-charity-item-inner {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    flex-grow: 1; /* Allows content to take up remaining space */
    justify-content: space-between; /* Pushes the button to the bottom */
}


.wpb-charity-content {
    padding: 0 25px;
}

.wpb-charity-image {
    width: 100%;
}

.wpb-charity-image img {
    border-radius: 30px;
    width: 100% !important;
}

.wpb-charity-item:hover {
    transform: translateY(-5px);
}

.wpb-charity-title {
    display: flex;
    justify-content: space-between;
}

.wpb-charity-item h3 {
    font-size: 18px;
    line-height: normal;
    margin-bottom: 10px;
    width: 90%;
}

.wpb-charity-logo {
    width: 10%;
}

.wpb-charity-item a:hover {
    color: #005177;
}

.wpb-charity-preview {
    font-size: 16px;
    line-height: normal;
}

.wpb-charity-tag {
    font-size: 16px;
    font-weight: bold;
}

.wpb-charity-tag span {
    color: #0f88c8;
}

.wpb-charity-position {
    font-size: 20px;
    line-height: normal;
}

.wpb-charity-read-more {
    margin-top: auto;
    padding: 20px;
}

.wpb-charity-btn {
    display: inline-block;
    background-color: #ddf5ff;
    text-transform: uppercase;
    color: #000;
    font-size: 14px;
    border-radius: 20px;
    padding: 2px 10px;
}


/* Responsive Adjustments */
@media (max-width: 1024px) {
    .wpb-charity-item {
        flex: 1 1 calc(33.33% - 20px); /* 3 per row on medium screens */
        max-width: calc(33.33% - 20px);
    }
}

@media (max-width: 768px) {
    .wpb-charity-item {
        flex: 1 1 100%; /* 1 per row on small screens */
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .wpb-charity-item {
        flex: 1 1 100%; /* 1 per row on small screens */
        max-width: 100%;
    }
}
