/* ==========================================================================
   Gallery — ph-gallery.css
   All rules scoped under .ph-gal-content
   ========================================================================== */

.ph-gal-content *, .ph-gal-content *::before, .ph-gal-content *::after { box-sizing: border-box; }

.ph-gal-content {
    font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
    background: #fff;
}

/* ==========================================================================
   CONTAINER
   ========================================================================== */

.ph-gal-content .ph-gal-container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   HERO
   ========================================================================== */

.ph-gal-content .ph-gal-hero {
    padding: 5rem 0 4rem;
    background:
        linear-gradient(180deg, rgba(8,19,44,0.20) 0%, rgba(8,19,44,0.55) 100%),
        url("https://poolheating.com.au/wp-content/uploads/2022/07/landing-hero.jpg")
        center / cover no-repeat;
    min-height: 40vh;
    display: flex;
    align-items: flex-end;
}

.ph-gal-content .ph-gal-hero h1 {
    font-family: "Rajdhani", "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(3rem, 5vw, 5.2rem);
    line-height: 0.85;
    color: #feb415;
    margin: 0;
}

/* ==========================================================================
   SECTION
   ========================================================================== */

.ph-gal-content .ph-gal-section {
    padding: 60px 0 80px;
}

/* ==========================================================================
   FILTER BUTTONS
   ========================================================================== */

.ph-gal-content .ph-gal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}

.ph-gal-content .ph-gal-filter {
    padding: 0.5em 1.4em;
    border: 2px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #4b5563;
    font-family: "Rajdhani", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
}

.ph-gal-content .ph-gal-filter:hover {
    border-color: #1d439c;
    color: #1d439c;
}

.ph-gal-content .ph-gal-filter.active {
    background: #1d439c;
    border-color: #1d439c;
    color: #fff;
}

/* ==========================================================================
   GRID
   ========================================================================== */

.ph-gal-content .ph-gal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.ph-gal-content .ph-gal-item {
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background: #f1f5f9;
}

.ph-gal-content .ph-gal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ph-gal-content .ph-gal-item:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */

.ph-gal-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.ph-gal-lightbox.active {
    display: flex;
}

.ph-gal-lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.ph-gal-lightbox-close {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 10000;
}

.ph-gal-lightbox-close:hover {
    opacity: 1;
}

/* ==========================================================================
   RESPONSIVE — ≤ 768px
   ========================================================================== */

@media (max-width: 768px) {
    .ph-gal-content .ph-gal-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ph-gal-content .ph-gal-hero {
        min-height: 32vh;
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .ph-gal-content .ph-gal-grid {
        grid-template-columns: 1fr;
    }
}
