/* ==============================================
   PROPERTY GALLERY LIGHTBOX - HERO-SAFE VERSION
   Uses unique class names to avoid conflicts
   ============================================== */

/* ==============================================
   GALLERY GRID STYLES
   ============================================== */

.property-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(20, 184, 166, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 37, 64, 0.95), rgba(10, 37, 64, 0) 100%);
    padding: 2rem 1.5rem 1.25rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .image-overlay {
    transform: translateY(0);
}

.image-overlay p {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

/* Responsive Gallery Grid */
@media (max-width: 1024px) {
    .property-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .property-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-item img {
        height: 250px;
    }
}

/* ==============================================
   LIGHTBOX MODAL STYLES
   ============================================== */

.gallery-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gallery-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 37, 64, 0.96);
    backdrop-filter: blur(10px);
}

.gallery-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem 2rem;
    z-index: 10001;
}

.gallery-lightbox-image {
    max-width: 95vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.gallery-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-prev {
    left: 2rem;
}

.gallery-lightbox-next {
    right: 2rem;
}

.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox-caption {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    z-index: 10002;
}

.gallery-lightbox-counter {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    z-index: 10002;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .gallery-lightbox-prev,
    .gallery-lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
    
    .gallery-lightbox-prev {
        left: 0.5rem;
    }
    
    .gallery-lightbox-next {
        right: 0.5rem;
    }
    
    .gallery-lightbox-close {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
    
    .gallery-lightbox-image {
        max-height: 80vh;
    }
    
    .gallery-lightbox-caption {
        font-size: 1rem;
        bottom: 2rem;
        padding: 0 1rem;
    }
}
