/* USMF - Gallery Overlay Fix */

/* Ensure overlay backgrounds are never white */
.gallery-card .image-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4)) !important;
    color: white !important;
    opacity: 0 !important;
    transform: translateY(20px) !important;
    transition: all 0.4s ease !important;
}

.gallery-card:hover .image-overlay {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.gallery-card .overlay-content h4 {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: 700 !important;
    margin-bottom: 5px !important;
}

.gallery-card .overlay-content p {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6) !important;
    font-size: 0.9rem !important;
}

/* Mobile fixes for overlay */
@media (max-width: 768px) {
    .gallery-card .image-overlay {
        opacity: 1 !important;
        transform: translateY(0) !important;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2)) !important;
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        padding: 20px 15px 15px !important;
    }
    
    .gallery-card .overlay-content h4 {
        font-size: 1rem !important;
    }
    
    .gallery-card .overlay-content p {
        font-size: 0.85rem !important;
    }
}

/* Additional fix to prevent white backgrounds */
.gallery-card,
.gallery-card *,
.gallery-card::before,
.gallery-card::after {
    background-color: transparent;
}

.gallery-card {
    background: white;
}

/* Ensure proper z-index stacking */
.gallery-card .card-image {
    position: relative;
    z-index: 1;
}

.gallery-card .image-overlay {
    position: absolute;
    z-index: 2;
}

/* Backup gradient for problematic browsers */
.gallery-card .image-overlay {
    background-image: linear-gradient(to top, #000000e6, #00000066) !important;
}