/* In portfolio-style.css */

/* Find-and-Replace has been done. No more :root variables. */
/* All rules are prefixed with .inspiration-gallery to avoid conflicts. */

.inspiration-gallery,
.inspiration-gallery .gallery-grid,
.inspiration-gallery .grid-item,
.inspiration-gallery .grid-overlay,
.inspiration-gallery .overlay-content,
.inspiration-gallery .gallery-load-more,
.inspiration-gallery .load-more-btn {
    box-sizing: border-box;
}

.inspiration-gallery {
    max-width: 1259px;
    margin: 0 auto;
}

.inspiration-gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* --- Corrected Grid Item Hover Animation --- */

.inspiration-gallery .grid-item {
    position: relative; /* This is crucial for positioning the overlay */
    border-radius: 15px;
    overflow: hidden; /* This hides the content that we move outside */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.inspiration-gallery .grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.inspiration-gallery .grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease; /* Add a subtle zoom effect to the image */
}

.inspiration-gallery .grid-item:hover img {
    transform: scale(1.05); /* Zoom the image slightly on hover */
}

.inspiration-gallery .grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 50%); /* Gradient for better text readability */
    opacity: 0; /* Start fully transparent */
    transition: opacity 0.4s ease;
}

.inspiration-gallery .grid-item:hover .grid-overlay {
    opacity: 1; /* Fade in the gradient on hover */
}

.inspiration-gallery .overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(100%); /* Start completely below the visible area */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth slide-in transition */
}

.inspiration-gallery .grid-item:hover .overlay-content {
    transform: translateY(0); /* Slide into view on hover */
}

.inspiration-gallery .overlay-title {
    font-size: 18px;
    font-weight: 600;
}

.inspiration-gallery .overlay-arrow {
    font-size: 24px;
}


.inspiration-gallery .gallery-load-more {
    display: none;
    text-align: center;
    margin-top: 40px;
}


.inspiration-gallery .load-more-btn {
    background-color: #8bc34a;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* --- Lightbox Styles (No :root) --- */
.lightbox-overlay { /* Keep this global for z-index stacking */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 999999 !important; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-content {
    position: relative;
    background-color: #ffffff;
    background-image: url('https://www.transparenttextures.com/patterns/light-paper-fibers.png' );
    border-radius: 15px;
    padding: 30px;
    width: 100%;
    max-width: 850px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: visible;
}
.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-color: #8bc34a;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
}
.lightbox-close:hover {
    background-color: #FF0000;
}
.lightbox-title {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}
.lightbox-description {
    margin-top: 25px;
    line-height: 1.6;
    font-size: 14px;
    color: #555;
}

/* --- Carousel Styles (No :root) --- */
.lightbox-carousel {
    position: relative;
    margin-top: 20px;
}
.carousel-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #eee;
    border-radius: 15px;
    overflow: hidden;
    max-height: 340px;
}
.carousel-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}
.carousel-image-wrapper img.active {
    opacity: 1;
    z-index: 2;
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #8bc34a;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
}
.carousel-arrow:hover {
    background-color: #689f38;
}
.carousel-arrow.prev { left: -20px; }
.carousel-arrow.next { right: -20px; }
.carousel-fullscreen {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    width: 35px;
    height: 35px;
    font-size: 16px;
    cursor: pointer;
    z-index: 5;
}
.carousel-pagination {
    text-align: center;
    margin-top: 15px;
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
}
.carousel-pagination .dot {
    display: inline-block;
    width: 25px;
    height: 5px;
    background-color: #dcdcdc;
    border-radius: 5px;
    margin: 0 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.carousel-pagination .dot.active {
    background-color: #8bc34a;
}


/* Make featured cards clickable */
.featured-inspiration-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-inspiration-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Change arrow button from <a> to <button> styles */
.wp-product-arrow-btn {
    border: none;
    /*background: none;*/
    padding: 0;
    cursor: pointer;
}

.wp-product-arrow-btn:focus {
    outline: 2px solid #8bc34a;
    outline-offset: 2px;
}
