/* =========================
   SELECT
========================= */

.pg-gallery-select-wrapper {
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.pg-gallery-select-wrapper:after {
    content: '';
    border: solid #f44336;
    top: 18px;
    right: calc(100% - 50% - 135px);
    border-width: 0 2px 2px 0;
    padding: 3px;
    transform: rotate(45deg);
    position: absolute;
}

.pg-gallery-select {
    width: 100%;
    max-width: 300px;
    padding: 10px 15px;
    border: 2px solid #E44126;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 20px;
    color: #F44336 !important;
    text-transform: uppercase;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
}

.pg-gallery-select:focus,
.pg-gallery-select:focus-visible {
    border: 2px solid #E44126;
}


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

.pg-gallery-selector-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;

}

/* =========================
   GALLERY LOADING TRANSITION
========================= */

#pg-gallery-selector-grid {

    position: relative;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;

}


#pg-gallery-selector-grid.pg-gallery-loading {

    opacity: 0.35;

    transform:
        translateY(8px);

    pointer-events: none;

}


/* Loading spinner */

#pg-gallery-selector-grid.pg-gallery-loading::after {

    content: "";

    position: absolute;

    top: 50%;
    left: 50%;

    width: 34px;
    height: 34px;

    margin-left: -17px;
    margin-top: -17px;

    border:
        3px solid #ddd;

    border-top-color:
        #333;

    border-radius: 50%;

    animation:
        pgGallerySpin 0.8s linear infinite;

}


@keyframes pgGallerySpin {

    to {

        transform:
            rotate(360deg);

    }

}

.pg-gallery-selector-item {

    position: relative;

    overflow: hidden;

    aspect-ratio: 4 / 3;

    cursor: pointer;

    border-radius: 0 40px;

}


.pg-gallery-selector-item img {

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.35s ease;

}


.pg-gallery-selector-item:hover img {

    transform: scale(1.05);

}


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

.pg-gallery-selector-lightbox {

    position: fixed;

    inset: 0;

    display: none;

    align-items: center;

    justify-content: center;

    background:
        rgba(0, 0, 0, 0.92);

    z-index: 999999;

}


.pg-gallery-selector-lightbox.active {

    display: flex;

}


.pg-gallery-selector-content {

    max-width: 90vw;

    max-height: 90vh;

    text-align: center;

}


#pg-gallery-selector-image {

    display: block;

    max-width: 90vw;

    max-height: 82vh;

    width: auto;
    height: auto;

    object-fit: contain;

    user-select: none;

    -webkit-user-drag: none;

}


/* =========================
   CLOSE
========================= */

.pg-gallery-selector-close {

    position: absolute;

    top: 20px;

    right: 30px;

    width: 45px;

    height: 45px;

    border: 0;

    background: transparent;

    color: #fff;

    font-size: 40px;

    line-height: 40px;

    cursor: pointer;

}


/* =========================
   PREV / NEXT
========================= */

.pg-gallery-selector-prev,
.pg-gallery-selector-next {

    position: absolute;

    top: 50%;

    transform:
        translateY(-50%);

    width: 55px;

    height: 70px;

    border: 0;

    background:
        rgba(255, 255, 255, 0.15);

    color: #fff;

    font-size: 50px;

    line-height: 50px;

    cursor: pointer;

}


.pg-gallery-selector-prev {

    left: 25px;

}


.pg-gallery-selector-next {

    right: 25px;

}


/* =========================
   COUNTER
========================= */

#pg-gallery-selector-counter {

    margin-top: 12px;

    color: #fff;

    font-size: 14px;

}


/* =========================
   TABLET
========================= */

@media (max-width: 980px) {

    .pg-gallery-selector-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .pg-gallery-selector-grid {

        grid-template-columns: 1fr;

        gap: 15px;

    }


    .pg-gallery-selector-prev,
    .pg-gallery-selector-next {

        width: 40px;

        height: 55px;

        font-size: 40px;

    }


    .pg-gallery-selector-prev {

        left: 8px;

    }


    .pg-gallery-selector-next {

        right: 8px;

    }


    .pg-gallery-selector-close {

        top: 10px;

        right: 15px;

        font-size: 35px;

    }

}


/* CSS Page Media */
.pg-content-card-content {
    border-radius: 0 40px;
    height: 400px;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

.pg-content-info {
    height: calc(100% - 35px);
    padding: 20px;
    color: #fff;
    position: relative;
    padding-top: 150px;
}

.pg-content-card-category {
    padding: 6px 20px;
    background: #e44126;
    width: 130px;
    text-align: center;
    border-radius: 0 10px;
    text-transform: uppercase;
    color: #fff;
    font-size: 16px;
}

.pg-content-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 20px;
    text-transform: uppercase;
    color: #fff;
}

.pg-content-card-date {
    font-size: 16px;
}

.pg-content-card-description {
    font-size: 14px;
}

.pg-content-card-button {
    position: absolute;
    bottom: 20px;
}

.pg-content-card-link {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}