/* ==========================================
   วัดไทยพุทธคยา — Photo Gallery Stylesheet
   Design: Premium grid with hover zoom & overlays
   ========================================== */

.custom-gallery-block {
    margin: 32px 0;
    width: 100%;
}

.custom-gallery-title {
    font-family: 'Noto Serif Thai', serif;
    font-size: 20px;
    color: var(--burgundy, #4A1527);
    font-weight: 600;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--gold, #C8962E);
    padding-bottom: 8px;
    display: inline-block;
}

.custom-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.custom-gallery-item {
    position: relative;
    border-radius: var(--radius, 12px);
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 4px 15px var(--shadow, rgba(74, 21, 39, 0.08));
    background: #f7fafc;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.custom-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(74, 21, 39, 0.18);
}

.custom-gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.custom-gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.custom-gallery-item:hover .custom-gallery-thumb {
    transform: scale(1.08);
}

.custom-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(74, 21, 39, 0.7); /* Deep burgundy overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-gallery-item:hover .custom-gallery-overlay {
    opacity: 1;
}

.zoom-icon {
    color: var(--white, #FFFFFF);
    font-size: 13px;
    font-weight: 600;
    background: var(--gold, #C8962E);
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transform: translateY(15px);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-gallery-item:hover .zoom-icon {
    transform: translateY(0);
}

/* Lightbox Modal custom dark background styling */
#galleryLightbox .modal-content {
    background: transparent !important;
}
#galleryLightbox .modal-body {
    background: rgba(0,0,0,0.9) !important;
    border-radius: 12px;
    padding: 10px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}
#galleryLightbox img {
    border: 3px solid rgba(255,255,255,0.1);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Responsive adjustment */
@media (max-width: 576px) {
    .custom-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
}
