/* LP Photo Galleries - updated styles */
.lp-pg-wrap { font-family: inherit; --gap:12px; }
.lp-pg-grid { display:grid; gap: var(--gap); grid-auto-rows: auto; }
.lp-pg-grid.cols-1 { grid-template-columns: repeat(1,1fr); }
.lp-pg-grid.cols-2 { grid-template-columns: repeat(2,1fr); }
.lp-pg-grid.cols-3 { grid-template-columns: repeat(3,1fr); }
.lp-pg-grid.cols-4 { grid-template-columns: repeat(4,1fr); }
.lp-pg-grid figure.lp-pg-item { margin:0; cursor:pointer; display:flex; flex-direction:column; align-items:stretch; }
.lp-pg-item img { width:100%; height:auto; display:block; border-radius:6px; transition: transform .25s ease; }
.lp-pg-item:hover img { transform: scale(1.03); }
.lp-pg-caption { margin-top:6px; font-size:14px; color:#222; line-height:1.3; font-weight:500; }

/* reduce vertical gap slightly and tighten caption proximity */
.lp-pg-grid { gap: 10px 14px; } 
.lp-pg-caption { margin-top:6px; }

/* pagination */
.lp-pg-pagination { text-align:center; margin-top:12px; }
.lp-pg-pagination a { display:inline-block; margin:0 6px; padding:6px 10px; border:1px solid #ddd; border-radius:6px; text-decoration:none; color:#333; }
.lp-pg-pagination a.current, .lp-pg-pagination a:hover { background:#111; color:#fff; border-color:#111; }

/* loader */
.lp-pg-loader { margin-top:12px; }

/* lightbox - centered with prev/next and keyboard support */
#lp-pg-lightbox { 
    position:fixed; 
    inset:0; 
    display:none; 
    align-items:center; 
    justify-content:center; 
    z-index:99999; 
    background: rgba(0,0,0,0.75); 
    padding:20px; 
}
#lp-pg-lightbox.show { 
    display:flex; 
}
#lp-pg-lightbox .inner { 
    position:relative; 
    max-width:1200px; 
    max-height:90vh; 
    display:flex; 
    align-items:center; 
    justify-content:center; 
}
#lp-pg-lightbox img { 
    max-width:100%; 
    max-height:90vh; 
    border-radius:8px; 
    display:block; 
}

/* nút thoát luôn nằm góc trên bên phải của ảnh */
#lp-pg-lightbox .close { 
    position:absolute; 
    top:10px; 
    right:10px; 
    background:#fff; 
    color:#000; 
    border-radius:50%; 
    width:36px; 
    height:36px; 
    display:flex; 
    align-items:center; 
    justify-content:center; 
    cursor:pointer; 
    box-shadow:0 4px 12px rgba(0,0,0,.2); 
    z-index:10002; 
}

/* nút điều hướng luôn căn giữa màn hình */
#lp-pg-lightbox .nav { 
    position:fixed; 
    top:50%; 
    transform:translateY(-50%); 
    background:rgba(255,255,255,0.08); 
    color:#fff; 
    border-radius:50%; 
    width:48px; 
    height:48px; 
    display:flex; 
    align-items:center; 
    justify-content:center; 
    cursor:pointer; 
    z-index:10002; 
}
#lp-pg-lightbox .nav.prev { left:20px; }
#lp-pg-lightbox .nav.next { right:20px; }

#lp-pg-lightbox .caption { 
    position:absolute; 
    bottom:10px; 
    left:50%; 
    transform:translateX(-50%); 
    color:#fff; 
    font-size:14px; 
    background:rgba(0,0,0,0.45); 
    padding:6px 10px;
    border-radius:6px; 
    max-width:90%; 
    text-align:center; 
}


/* responsive: fallback to 1 col on small screens */
@media (max-width: 640px){
    .lp-pg-grid { grid-template-columns: 1fr !important; }
    .lp-pg-caption { font-size:13px; }
}
