/* ==============================================================================
   Krāsotājs.pro — Photo Gallery & Lightbox Styles
   File: static/painter/css/gallery.css
   ============================================================================== */

/* Gallery Card Styles */
.gallery-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12) !important;
}

.gallery-thumb {
    height: 280px;
    cursor: pointer;
}

@media (max-width: 576px) {
    .gallery-thumb {
        height: 240px;
    }
}

/* Gallery Filter Box Styles */
.gallery-filter-box {
    align-items: stretch;
}

.gallery-filter-box .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.25 !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

@media (min-width: 768px) {
    .gallery-filter-box .btn {
        min-height: 48px;
    }
}

@media (max-width: 767.98px) {
    .gallery-item-col {
        margin-bottom: 12px;
    }
    .gallery-filter-col {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .gallery-filter-box {
        width: 100% !important;
    }
    .gallery-filter-box .btn {
        width: 100% !important;
        min-height: 42px;
    }
}

.gallery-thumb img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-thumb img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.85) 100%);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.gallery-zoom-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.gallery-card:hover .gallery-zoom-icon {
    opacity: 1;
    transform: scale(1);
}

.drop-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

/* Lightbox Modal Styles */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(8px);
}

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

.lightbox-image-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
}

.lightbox-image-wrapper img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-caption {
    margin-top: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.lightbox-close, 
.lightbox-prev, 
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    font-size: 2rem;
    line-height: 1;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    backdrop-filter: blur(4px);
    user-select: none;
}

.lightbox-close:hover, 
.lightbox-prev:hover, 
.lightbox-next:hover {
    background: #ffcc00;
    color: #000;
    transform: scale(1.1);
}

.lightbox-close {
    top: -60px;
    right: 0;
}

.lightbox-prev {
    left: -70px;
    top: calc(50% - 25px);
}

.lightbox-next {
    right: -70px;
    top: calc(50% - 25px);
}

@media (max-width: 768px) {
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 10px; right: 10px; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
