/* Phoca Gallery – Categories View redesign
   Scope: only #phocagallery.pg-categories-view
*/

#phocagallery.pg-categories-view {
    --pg-redesign-navy: var(--parish-navy, #062b49);
    --pg-redesign-navy-dark: var(--parish-navy-dark, #031d31);
    --pg-redesign-gold: var(--parish-gold, #d6a936);
    --pg-redesign-gold-light: var(--parish-gold-light, #e3c06a);

    width: 100%;
    margin: 0 0 72px;
}

#phocagallery.pg-categories-view .pg-categories-items-box {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 24px;
    justify-content: stretch;
    align-items: stretch;
}

#phocagallery.pg-categories-view .pg-category-box {
    position: relative;
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--pg-redesign-navy) 0%, var(--pg-redesign-navy-dark) 100%);
    box-shadow: 0 10px 30px rgba(3, 29, 49, .12);
    isolation: isolate;
    transform: translateZ(0);
    transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s ease;
}

#phocagallery.pg-categories-view .pg-category-box-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#phocagallery.pg-categories-view .pg-category-box-image > a {
    display: block;
    width: 100%;
    height: 100%;
}

#phocagallery.pg-categories-view .pg-category-box-image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0;
    padding: 0;
    object-fit: cover;
    object-position: center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transition: transform .65s cubic-bezier(.2,.7,.3,1), filter .4s ease;
}

#phocagallery.pg-categories-view .pg-category-box-image svg {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 22%;
    color: var(--pg-redesign-gold);
    background:
        radial-gradient(circle at 50% 40%, rgba(255,255,255,.08) 0, rgba(255,255,255,0) 48%),
        linear-gradient(135deg, var(--pg-redesign-navy) 0%, var(--pg-redesign-navy-dark) 100%);
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

#phocagallery.pg-categories-view .pg-category-box::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(3,29,49,.01) 8%,
            rgba(3,29,49,.05) 36%,
            rgba(3,29,49,.56) 70%,
            rgba(3,29,49,.94) 100%
        );
    transition: background .35s ease;
}

#phocagallery.pg-categories-view .pg-category-box::before {
    content: "";
    position: absolute;
    z-index: 4;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    pointer-events: none;
    background: linear-gradient(90deg, var(--pg-redesign-gold) 0%, rgba(214,169,54,.45) 48%, rgba(214,169,54,0) 100%);
}

#phocagallery.pg-categories-view .pg-category-box-info {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    padding: 24px 23px 20px;
    color: #fff;
}

#phocagallery.pg-categories-view .pg-category-box-title {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #fff;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(28px, 2vw, 38px);
    font-weight: 600;
    line-height: 1;
    text-shadow: 0 2px 9px rgba(0,0,0,.34);
}

#phocagallery.pg-categories-view .pg-category-box-title a {
    display: block;
    width: 100%;
    color: #fff;
    text-decoration: none;
    transition: color .25s ease;
}

#phocagallery.pg-categories-view .pg-category-box-title a:hover {
    color: var(--pg-redesign-gold-light);
}

#phocagallery.pg-categories-view .pg-category-box-title .ph-si-category,
#phocagallery.pg-categories-view .pg-category-box-title .ph-si {
    display: none;
}

#phocagallery.pg-categories-view .pg-category-box-count {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    padding: 6px 10px;
    color: rgba(255,255,255,.90);
    background: rgba(3,29,49,.54);
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

#phocagallery.pg-categories-view .pg-category-box-label-box {
    position: absolute;
    z-index: 5;
    top: 14px;
    left: 14px;
}

#phocagallery.pg-categories-view .pg-category-box-label-new,
#phocagallery.pg-categories-view .pg-category-box-label-hot {
    float: none;
    display: inline-flex;
    align-items: center;
    margin: 0 5px 0 0;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

#phocagallery.pg-categories-view .pg-category-box-label-new {
    color: var(--pg-redesign-navy-dark);
    background: var(--pg-redesign-gold);
}

#phocagallery.pg-categories-view .pg-category-box-label-hot {
    color: #fff;
    background: #8b1f25;
}

#phocagallery.pg-categories-view .pg-category-box-description {
    display: none;
}

@media (hover: hover) {
    #phocagallery.pg-categories-view .pg-category-box:hover {
        transform: translateY(-7px);
        box-shadow: 0 20px 46px rgba(3,29,49,.22);
    }

    #phocagallery.pg-categories-view .pg-category-box:hover .pg-category-box-image img {
        transform: scale(1.065);
        filter: saturate(1.06) contrast(1.02);
    }

    #phocagallery.pg-categories-view .pg-category-box:hover::after {
        background:
            linear-gradient(
                180deg,
                rgba(3,29,49,0) 6%,
                rgba(3,29,49,.04) 34%,
                rgba(3,29,49,.62) 68%,
                rgba(3,29,49,.98) 100%
            );
    }
}

@media (min-width: 992px) {
    #phocagallery.pg-categories-view .pg-categories-items-box > .pg-category-box:first-child {
        grid-column: span 2;
        aspect-ratio: 16 / 7;
    }

    #phocagallery.pg-categories-view .pg-categories-items-box > .pg-category-box:first-child .pg-category-box-title {
        font-size: clamp(34px, 2.6vw, 48px);
    }
}

#phocagallery.pg-categories-view .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 38px;
}

#phocagallery.pg-categories-view .pagination .page-link {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    color: var(--pg-redesign-navy);
    background: #fff;
    border: 1px solid rgba(3,29,49,.12);
    border-radius: 6px;
    text-decoration: none;
    transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s ease;
}

#phocagallery.pg-categories-view .pagination .page-link:hover {
    color: var(--pg-redesign-navy-dark);
    background: var(--pg-redesign-gold);
    border-color: var(--pg-redesign-gold);
    transform: translateY(-1px);
}

#phocagallery.pg-categories-view .pagination .active .page-link {
    color: #fff;
    background: var(--pg-redesign-navy);
    border-color: var(--pg-redesign-navy);
}

@media (max-width: 991px) {
    #phocagallery.pg-categories-view .pg-categories-items-box {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    #phocagallery.pg-categories-view .pg-category-box {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 620px) {
    #phocagallery.pg-categories-view {
        margin-bottom: 50px;
    }

    #phocagallery.pg-categories-view .pg-categories-items-box {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    #phocagallery.pg-categories-view .pg-category-box {
        aspect-ratio: 16 / 11;
        border-radius: 12px;
    }

    #phocagallery.pg-categories-view .pg-category-box-info {
        padding: 20px 19px 18px;
    }

    #phocagallery.pg-categories-view .pg-category-box-title {
        font-size: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #phocagallery.pg-categories-view .pg-category-box,
    #phocagallery.pg-categories-view .pg-category-box-image img,
    #phocagallery.pg-categories-view .pg-category-box::after,
    #phocagallery.pg-categories-view .pagination .page-link {
        transition: none;
    }

    #phocagallery.pg-categories-view .pg-category-box:hover,
    #phocagallery.pg-categories-view .pg-category-box:hover .pg-category-box-image img {
        transform: none;
    }
}
