.custom-hover-widget {
    position: relative;
    overflow: hidden;
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
    max-width: 400px;
    min-height: 280px; /* Increased for consistent content height */
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.custom-hover-widget:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.custom-hover-widget .image-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.custom-hover-widget .uni-img {
    width: 100%;
    height: 150px; /* Fixed height for all images */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 10px;
    padding: 20px;
    margin: 5px;
}

.custom-hover-widget img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

.custom-hover-widget .title {
    font-size: 18px;
    font-weight: 600;
    margin-top: 15px; /* Consistent spacing */
    position: relative;
    z-index: 1;
    color: #222;
}

.custom-hover-widget .description {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    padding: 12px;
    font-size: 17px;
    color: black;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2;
    pointer-events: none;
    border-radius: 6px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.custom-hover-widget .image-wrapper:hover .description {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
