.practice-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.practice-item {
    position: relative;
    background: #581845;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: 250px; /* Adjust as needed */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.practice-item .img {
    font-size: 40px;
    color: #fff; /* Adjust icon color */
    margin-bottom: 15px;
}
.practice-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.practice-item .img {
    height: 20%;
    overflow: hidden;
    margin-bottom: 10px; /* Adjust the margin as needed */
    margin-top: 10px;
    position: relative;
}
.img .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
    opacity: 0;
}

.practice-item .title {
    display: block;
}

.practice-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #290221; /* Adjust overlay color */
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    visibility: hidden; /* Initially hidden */
}

.practice-item:hover .overlay {
    opacity: 1;
    visibility: visible;
}

.practice-item:hover .title {
    visibility: hidden;
}

.practice-item .overlay p {
    font-size: 16px;
    color: #fff;
    text-align: center;
    margin-bottom: 15px;
}

.practice-item .btn-custom {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    border-color: #fff;
    border: 3px solid #ddd;
    transition: background 0.3s ease;
}

.practice-item .btn-custom:hover {
    background: transparent;
    border-radius: 5px;
    border-color: #fff;
    border: 10px;
    border: 3px solid #ddd;
}


/* Media Queries for Responsiveness */
@media (max-width: 1200px) {
    .practice-item {
        min-height: 220px; /* Adjust as needed */
    }
}

@media (max-width: 992px) {
    .practice-item {
        min-height: 200px; /* Adjust as needed */
    }
}

@media (max-width: 768px) {
    .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .practice-item {
        min-height: 180px; /* Adjust as needed */
    }
}

@media (max-width: 576px) {
    .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .practice-item {
        min-height: 160px; /* Adjust as needed */
    }
}