/* --- Custom Styles for Stylish Category Overlay --- */
* {
    font-family: 'Oswald', sans-serif !important;
}

/* Base card styling (similar to before, but we need relative positioning) */
.category-card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    background: linear-gradient(145deg, #ffffff, #f8f8f8);
    border: 2px solid #977143;
    cursor: pointer;
    /* Important for positioning the absolute overlay */
    position: relative;
    border-radius: 12px;
}

/* Hover effect: Subtle lift and shadow for interaction */
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    /* Slightly stronger shadow */
}

/* Image scaling effect on hover */
.transition-scale {
    transition: transform 0.4s ease-in-out;
    filter: brightness(1);
    /* Initial brightness */
}

.category-card:hover .transition-scale {
    transform: scale(1.05);
    filter: brightness(0.7);
    /* Darken image slightly on hover */
}

/* Overlay Styling */
.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Start with full transparency (hidden) */
    background-color: rgba(255, 255, 255, 0);
    opacity: 0;

    /* Smooth transition for opacity and background */
    transition: opacity 0.3s ease-in-out, background-color 0.3s ease-in-out;

    /* Ensure text is above the image but below anything else */
    z-index: 10;
}

/* Show Overlay on Hover */
.category-card:hover .category-overlay {
    /* Reveal the overlay with a semi-transparent black background */
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

/* Ensure the image covers the aspect ratio container */
.object-fit-cover {
    object-fit: cover;
}

/* Remove default link underline and color */
.category-card-link {
    color: inherit;
}