.custom-treatment-grid {
    display: flex;
    flex-wrap: wrap;
    /* Allow items to wrap on small screens */
    justify-content: flex-start;
    align-items: stretch;
    gap: 40px;
    padding: 40px 3%;
    margin: 0;
    margin-left: -90px;
    margin-right: -100px;

    transform: translateY(0);
}

.custom-treatment-card {
    background: transparent;
    border-radius: 20px;
    transition: transform 0.3s ease-in-out;
    flex: 1 1 calc(33.33% - 30px);
    max-width: calc(33.33% - 30px);
    min-width: 25em;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.custom-treatment-image {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    border-top-right-radius: 100px;
}

.custom-treatment-image img {
    width: 100%;
    height: 110%;
    object-fit: cover;
    display: block;
    border-radius: 20px 20px 0 0;
}

.custom-treatment-content {
    padding: 30px;
    text-align: center;
    border-radius: 0 0 20px 20px;
    background-color: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    width: 100%;
    border: 1px solid #ddd;
}

.custom-treatment-content h3 {
    font-size: 28px;
    font-weight: 500;
    color: #222;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.custom-treatment-content p {
    font-size: 18px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.treatment-btn {
    display: inline-block;
    font-size: 18px;
    font-weight: 600;
    color: #008CBA;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    margin-top: auto;
}

@media (max-width: 768px) {
    .custom-treatment-grid {
        margin-left: 17px;
        margin-right: -20px;
    }

    .custom-treatment-card {
        margin-left: -4px;
        margin-right: 10px;
        min-width: 31em;
    }
}