.carousel-img {
    height: 600px;
}

@media (max-width: 768px) {
    .carousel-img {
        height: 300px;
    }
}

.card-img-top {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    margin: 0;
    padding: 1rem;
}

/* Program card hover effect */

.program-card {
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.program-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 123, 255, 0.25); /* light blue transparent */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.program-card:hover .view-overlay {
    opacity: 1;
}

.row.g-4 .card.h-100 {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.row.g-4 .card.h-100:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Ensure cards and bodies stretch for uniform height */
.row.g-4 .col {
    display: flex;
}

.row.g-4 .card.h-100 {
    display: flex;
    flex-direction: column;
}

.row.g-4 .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* Center program titles and keep them at the top */
.row.g-4 .card-body h5 {
    text-align: center;
    margin-bottom: 0.5rem;
    width: 100%;
}

/* Push descriptions to the bottom */
.row.g-4 .card-body p {
    margin: 0;
    text-align: center;
}

.card-overlay {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    height: auto;
    display: flex;
    flex-direction: column;
}

.card-overlay img {
    width: 100%;
    object-fit: contain;
}

.card-overlay .overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 105, 179, 0.75); /* darker blue with same transparency */
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card-overlay:hover img {
    transform: scale(1.05);
}

.card-overlay:hover .overlay-content {
    opacity: 1;
}

.card-overlay .overlay-content h5 {
    font-size: 1.5rem;
    font-weight: 700;
    /* color removed to inherit from parent */
}

