/* ==========================================================================
   PAGE SECTION STYLES (Desktop First)
   ========================================================================== */

/* --- Carousel Section --- */
#center .carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 280px 140px 0px 140px;
    text-align: left;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

#center .carousel-caption h1 {
    font-size: 80px;
}

/* --- About Section --- */
.about_h1ri1 {
    /* Creates an overlapping image effect */
    position: absolute;
    top: 15%;
}

/* --- Projects Section --- */
.proj_1l:hover .proj_1l3 {
    display: block;
    transition: 0.3s;
}

.proj_1l3 {
    /* This is the overlay that appears on hover */
    display: none;
    position: absolute;
    width: 95%;
    height: 95%;
    top: 2.4%;
    left: 2.4%;
    border: 1px solid #eee;
}

/* --- Services/About Section --- */
.about_pgoi:hover {
    transition: 0.3s;
    box-shadow: 0px 4px 20px -3px rgb(22 36 62 / 15%);
    border-bottom: 1px solid #b6702a;
}

/* --- Fun Facts Section --- */
#fact {
    background-image: url(../img/2.jpg);
    /* Consider adding background-size and background-position for better control */
    /* background-size: cover; */
    /* background-position: center; */
}

/* --- Find Us Section --- */
#find {
    background-image: url(../img/17.jpg);
}

.find_2r {
    padding: 80px 40px;
}

.find_m2 {
    /* Creates an overlapping card effect on desktop */
    position: absolute;
    top: 15%;
    left: -220px;
}

/* ==========================================================================
   HOMEPAGE CATEGORY CARD STYLES
   ========================================================================== */

.category-card {
    position: relative; /* This is the positioning anchor for the overlay */
    overflow: hidden;   /* Keeps the zoomed image contained */
    cursor: pointer;
    height: 350px; /* You can adjust the height of the cards here */
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image fills the card without stretching */
    transition: all 0.5s ease;
}

.category-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    color: #fff;
    /* A subtle gradient at the bottom to ensure the title is always readable */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    transition: all 0.4s ease-out;
}

.category-card h3 {
    font-family: "Playfair Display", serif;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 0.25rem;
    transition: all 0.4s ease-out;
}

.category-card a {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    border-bottom: 2px solid var(--brand-primary, #ec73fc);
    
    /* Hide the link by default */
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease-out;
}

/* --- The Hover Effects --- */

.category-card:hover img {
    transform: scale(1.1); /* Zoom the image */
    filter: brightness(0.8); /* Darken the image slightly */
}

.category-card:hover .category-card-overlay {
    /* Make the gradient stronger on hover */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
}

.category-card:hover h3 {
    transform: translateY(-5px); /* Move the title up a bit */
}

.category-card:hover a {
    opacity: 1; /* Fade in the 'View Products' link */
    transform: translateY(0);
}


/* ==========================================================================
   MEDIA QUERIES (Responsive Overrides)
   ========================================================================== */
@media (max-width: 991px) {
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
}


/* ==========================================================================
   MOBILE STYLES FOR HERO CAROUSEL
   ========================================================================== */

@media (max-width: 767.98px) {
    /* Add a dark overlay to the carousel image for text readability */
    #center .carousel-inner::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.4); /* 40% black overlay */
    }

    /* Center the caption content vertically and horizontally */
    #center .carousel-caption {
        top: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1; /* Ensure caption is on top of the new overlay */
    }

    /* Adjust the title font size for mobile */
    #center .carousel-caption h1 {
        font-size: 2.25rem; /* A much more mobile-friendly size */
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Adds depth and readability */
    }
}

/* ==========================================================================
   NEW STATIC MOBILE HEADER
   ========================================================================== */

#center-mobile {
    /* Set the background image and a dark overlay for text contrast */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/1.jpg');
    background-size: cover;
    background-position: center;
    
    /* Set the height to be 60% of the screen height */
    height: 60vh;
    min-height: 400px;
    
    /* Flexbox properties to center the text content */
    display: flex;
    align-items: center;
    justify-content: center;
}