/* hc-gallery-frontend.css */

.hc-gallery-wrapper {
    width: 100%;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
}

.hc-gallery-grid {
    display: grid;
    /* Elementor overrides these inline */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .hc-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 767px) {
    .hc-gallery-grid {
        grid-template-columns: 1fr !important;
    }
}

.hc-gallery-item {
    position: relative;
    background-color: #fafafa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* initial elegant shadow */
    display: flex;
    flex-direction: column;
    cursor: pointer;
    /* Hover transitions stripped out - now handled smoothly by GSAP Javascript */
}

.hc-gallery-image-wrapper {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    background-color: #eee;
}

.hc-gallery-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transform-origin: center;
    will-change: transform;
    /* Transformation zoom handled by GSAP */
}

/* Caption Area */
.hc-gallery-caption {
    background-color: #09203f;
    border-top: 1px solid #c50227;
    color: #ffffff;
    padding: 15px 20px;
    text-align: center;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 2;
    /* Fade/slide animated handled by GSAP */
}

/*
 * Vanilla Lightbox Styles
 */
.hc-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hc-lightbox-overlay.hc-lightbox-active {
    opacity: 1;
    visibility: visible;
}

.hc-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hc-lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
}

.hc-lightbox-overlay.hc-lightbox-active .hc-lightbox-img {
    transform: scale(1);
    opacity: 1;
}

/* Lightbox Controls */
.hc-lightbox-close,
.hc-lightbox-prev,
.hc-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 1000000;
}

.hc-lightbox-close:hover,
.hc-lightbox-prev:hover,
.hc-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.hc-lightbox-close {
    top: 20px;
    right: 30px;
    position: fixed;
}

.hc-lightbox-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    position: fixed;
}
.hc-lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.hc-lightbox-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    position: fixed;
}
.hc-lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Lightbox Caption */
.hc-lightbox-caption {
    color: #fff;
    margin-top: 15px;
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.hc-lightbox-hidden {
    display: none !important;
}
