/* === Perspectives Full Gallery Page === */

.pg-gallery-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* Filter Bar */
.pg-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 36px;
    justify-content: center;
}

.pg-filter-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 6px 4px;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: color 0.2s, border-color 0.2s;
    font-family: inherit;
}

.pg-filter-btn:hover {
    color: #1a1a1a;
}

.pg-filter-btn--active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

/* Masonry Grid */
.pg-masonry {
    columns: 4 220px;
    column-gap: 12px;
    margin-bottom: 12px;
}

.pg-masonry-item {
    break-inside: avoid;
    margin-bottom: 12px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
}

.pg-masonry-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.pg-masonry-item:hover img {
    transform: scale(1.04);
    filter: brightness(0.82);
}

.pg-masonry-item__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 14px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,0.55));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pg-masonry-item:hover .pg-masonry-item__overlay {
    opacity: 1;
}

.pg-masonry-item__overlay-title {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    font-family: Georgia, serif;
    line-height: 1.3;
}

/* Loading State */
.pg-loading {
    text-align: center;
    padding: 60px 0;
    color: #aaa;
    font-size: 14px;
    column-span: all;
}

.pg-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 2px solid #e0e0e0;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: pg-spin 0.7s linear infinite;
}

@keyframes pg-spin {
    to { transform: rotate(360deg); }
}

/* Mid-page Book CTA */
.pg-book-cta {
    margin: 20px 0;
    background: #f7f5f2;
    border-radius: 6px;
    padding: 28px 32px;
}

.pg-book-cta__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 640px;
    margin: 0 auto;
}

.pg-book-cta__cover {
    width: 70px;
    height: auto;
    flex-shrink: 0;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.pg-book-cta__text p {
    margin: 0 0 12px;
    font-size: 15px;
    color: #444;
    line-height: 1.6;
}

/* Load More */
.pg-load-more-wrap {
    text-align: center;
    margin-top: 32px;
}

/* === Lightbox === */
.pg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.pg-lightbox__img {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    display: block;
    border-radius: 2px;
}

.pg-lightbox__meta {
    padding: 16px 12px 6px;
    text-align: center;
    color: #fff;
    max-width: 560px;
}

.pg-lightbox__title {
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px;
    letter-spacing: 0.02em;
}

.pg-lightbox__caption {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    line-height: 1.65;
    margin: 0 0 8px;
}

.pg-lightbox__hook {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    font-style: italic;
    margin: 0;
}

.pg-lightbox__close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    z-index: 100001;
    transition: opacity 0.2s;
}

.pg-lightbox__close:hover { opacity: 1; }

.pg-lightbox__nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    padding: 14px 16px;
    cursor: pointer;
    z-index: 100001;
    transition: background 0.2s;
    border-radius: 2px;
}

.pg-lightbox__nav:hover { background: rgba(255,255,255,0.2); }
.pg-lightbox__nav--prev { left: 16px; }
.pg-lightbox__nav--next { right: 16px; }

/* Responsive */
@media (max-width: 900px) {
    .pg-masonry { columns: 3 160px; }
}

@media (max-width: 600px) {
    .pg-masonry { columns: 2 140px; }
    .pg-book-cta__inner { flex-direction: column; text-align: center; }
    .pg-lightbox__nav { display: none; }
    .pg-gallery-wrap { padding: 0 12px 40px; }
}

@media (max-width: 380px) {
    .pg-masonry { columns: 1; }
}
