/*
Theme Name: karanda
Theme URI: https://designsfunnel.com/
Author: Designs Funnel Team
Author URI: https://designsfunnel.com/
Description: Delivering a bespoke theme development tailored to precisely align with the unique requirements of our
esteemed client.
Version: 1.0
Template: hello-elementor

This is the child theme for Hello Elementor theme, generated with Generate Child Theme plugin by catchthemes.

(optional values you can add: Theme URI, Author URI, License, License URI, Tags, Text Domain)
*/

/* This is the CSS project page image css */

gallery-1 {
    display: ;
    grid-template-columns: repeat(2, 1fr); /* Maintains your 2-column layout */
    gap: 15px;
}

.gallery-item {
    margin: 0 !important;
    width: 100% !important;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1; /* Forces square shape */
}

.gallery-icon, 
.gallery-icon a, 
.gallery-icon img {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Ensure image covers the area without distortion */
.gallery-icon img {
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* 2. Move text inside the image and create the overlay */
figcaption.wp-caption-text.gallery-caption {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Background Overlay */
    background: rgb(0 0 0 / 19%); /* Semi-transparent black */
    
    /* Center the text */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    
    /* Hide by default */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allows clicking the link underneath if needed */
    z-index: 2;
}

/* Text styling inside the overlay */
figcaption.wp-caption-text.gallery-caption a {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
}

/* 3. Hover Effects */
.gallery-item:hover figcaption.wp-caption-text.gallery-caption {
    opacity: 1;
}

.gallery-item:hover .gallery-icon img {
    transform: scale(1.01); /* Subtle zoom effect on hover */
}
