@charset "UTF-8";
/* CSS Document 
Theme Name: Carpenteria 3P - Galleria
Author: Si.Be Group
*/


/* GALLERIA INTERNA */

/*
    La sezione usa il contenitore chiaro già presente in Interne.css:

    <section class="home_4 home_4_interna home_4_interna_chiara galleria_interna">

    Quindi background #e9ecf4 e freccia chiara arrivano da:
    .home_4_interna_chiara
*/

.galleria_interna {
    position: relative;
}

.galleria_interna_int {
    position: relative;
    z-index: 2;
}

.galleria_interna_titolo {
    text-align: center;
}

.galleria_interna_grid {
    width: 100%;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.galleria_interna_item {
    width: calc((100% - 48px) / 3);
    height: 320px;

    position: relative;
    overflow: hidden;

    border: none;
    border-radius: 14px;

    background: #000;

    cursor: pointer;

    padding: 0;
}

.galleria_interna_item img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

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

    user-select: none;
    pointer-events: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.galleria_interna_item::before {
    content: "";
    position: absolute;
    inset: 0;

    background: rgba(255, 31, 16, 0.50);

    opacity: 0;

    z-index: 2;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.galleria_interna_item::after {
    content: "+";
    position: absolute;

    left: 50%;
    top: 50%;

    width: 42px;
    height: 42px;

    border-radius: 50%;

    background: #fff;
    color: #ff1f10;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 30px;
    line-height: 1;
    font-weight: 400;

    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0;

    z-index: 3;
    transition: all 0.35s ease;
    pointer-events: none;
}

.galleria_interna_item:hover img {
    transform: scale(1.04);
    opacity: 0.82;
}

.galleria_interna_item:hover::before {
    opacity: 1;
}

.galleria_interna_item:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}


/* POPUP GALLERIA */

body.popup_aperto {
    overflow: hidden;
}

.galleria_popup {
    position: fixed;
    inset: 0;

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

    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 70px 95px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: all 0.25s ease;
}

.galleria_popup.aperto {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.galleria_popup_box {
    width: 100%;
    max-width: 1100px;

    position: relative;
    z-index: 2;
}

.galleria_popup figure {
    width: 100%;

    margin: 0;

    text-align: center;
}

.galleria_popup img {
    max-width: 100%;
    max-height: 72vh;

    width: auto;
    height: auto;

    margin: 0 auto;

    border-radius: 14px;

    display: block;

    user-select: none;
    pointer-events: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.galleria_popup figcaption {
    max-width: 900px;

    margin: 22px auto 0;

    font-size: 18px;
    line-height: 1.45;
    font-weight: 500;

    color: #fff;
}

.galleria_popup_close {
    position: absolute;

    right: 34px;
    top: 28px;

    width: 58px;
    height: 58px;

    border: none;
    border-radius: 50%;

    background: #fff;

    cursor: pointer;

    z-index: 4;

    transition: all 0.25s ease;
}

.galleria_popup_close::before,
.galleria_popup_close::after {
    content: "";
    position: absolute;

    left: 50%;
    top: 50%;

    width: 28px;
    height: 4px;

    border-radius: 4px;

    background: #1d1d22;

    transform-origin: center center;

    transition: all 0.25s ease;
}

.galleria_popup_close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.galleria_popup_close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.galleria_popup_close:hover {
    background: #ff1f10;
}

.galleria_popup_close:hover::before,
.galleria_popup_close:hover::after {
    background: #fff;
}

.galleria_popup_arrow {
    position: absolute;

    top: 50%;

    width: 52px;
    height: 52px;

    border: 2px solid #fff;
    border-radius: 50%;

    background: transparent;

    cursor: pointer;

    transform: translateY(-50%);

    z-index: 4;

    transition: all 0.25s ease;
}

.galleria_popup_arrow:hover {
    background: #ff1f10;
    border-color: #ff1f10;
}

.galleria_popup_prev {
    left: 34px;
}

.galleria_popup_next {
    right: 34px;
}

.galleria_popup_arrow::before {
    content: "";
    position: absolute;

    left: 50%;
    top: 50%;

    width: 13px;
    height: 13px;

    border-top: 3px solid #fff;
    border-right: 3px solid #fff;
}

.galleria_popup_prev::before {
    transform: translate(-35%, -50%) rotate(-135deg);
}

.galleria_popup_next::before {
    transform: translate(-65%, -50%) rotate(45deg);
}


/* MEDIA FOR TABLET AND MOBILE DEVICE */

@media only screen and (max-width: 800px) {

    /* GALLERIA INTERNA MOBILE */

    .galleria_interna_grid {
        gap: 18px;
    }

    .galleria_interna_item {
        width: 100%;
        height: 320px;
    }

    .galleria_popup {
        padding: 70px 20px;
    }

    .galleria_popup img {
        max-height: 66vh;
    }

    .galleria_popup figcaption {
        font-size: 15px;
        line-height: 1.4;
    }

    .galleria_popup_close {
        right: 18px;
        top: 18px;

        width: 50px;
        height: 50px;
    }

    .galleria_popup_close::before,
    .galleria_popup_close::after {
        width: 24px;
        height: 4px;
    }

    .galleria_popup_arrow {
        width: 42px;
        height: 42px;
    }

    .galleria_popup_prev {
        left: 14px;
    }

    .galleria_popup_next {
        right: 14px;
    }

    .galleria_popup_arrow::before {
        width: 10px;
        height: 10px;
    }

}