/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        Helvetica Neue,
        Helvetica,
        Arial,
        sans-serif;

    background: #f4f4f2;
    color: #1c1c1c;

    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}


/* =========================================================
   GENERALE
========================================================= */

.container {
    width: min(1400px, calc(100% - 60px));
    margin: 0 auto;
}


/* =========================================================
   HEADER
========================================================= */

.gallery-header {
    padding: 100px 0 55px;
}

.eyebrow {
    display: block;

    margin-bottom: 18px;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 2.5px;
    text-transform: uppercase;

    color: #777;
}

.gallery-header h1 {
    margin-bottom: 24px;

    font-size: clamp(48px, 7vw, 86px);
    font-weight: 500;

    line-height: .95;
    letter-spacing: -4px;
}

.gallery-header p {
    max-width: 650px;

    font-size: 17px;
    line-height: 1.7;

    color: #707070;
}


/* =========================================================
   FILTRI
========================================================= */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin:30px;
}

.filter-button {
    appearance: none;

    padding: 11px 19px;

    border: 1px solid rgba(237, 149, 13, 0.55);
    border-radius: 4px;

    background: transparent;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1px;

    color: rgb(105, 105, 105);

    cursor: pointer;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}


/* HOVER */

.filter-button:hover {
    border-color: rgb(237, 149, 13);

    background: rgba(237, 149, 13, 0.08);

    color: rgb(180, 105, 0);

    transform: translateY(-2px);

    box-shadow:
        0 5px 14px rgba(237, 149, 13, 0.14);
}


/* PULSANTE ATTIVO */

.filter-button.active {
    border-color: rgb(237, 149, 13);

    background: rgb(237, 149, 13);

    color: #fff;

    box-shadow:
        0 5px 16px rgba(237, 149, 13, 0.24);
}


/* HOVER SUL PULSANTE ATTIVO */

.filter-button.active:hover {
    background: rgb(225, 137, 5);

    border-color: rgb(225, 137, 5);

    color: #fff;

    box-shadow:
        0 7px 18px rgba(237, 149, 13, 0.30);
}


/* CLICK */

.filter-button:active {
    transform: translateY(0) scale(0.97);
}


/* FOCUS ACCESSIBILE */

.filter-button:focus-visible {
    outline: 2px solid rgb(237, 149, 13);
    outline-offset: 3px;
}


/* =========================================================
   GALLERIA
========================================================= */

.gallery-section {
    padding-bottom: 100px;
}

.gallery-grid {
    columns: 4 260px;
    column-gap: 16px;
}

.gallery-card {
    position: relative;

    display: block;

    width: 100%;

    margin-bottom: 16px;

    overflow: hidden;

    break-inside: avoid;

    background: #ddd;

    cursor: pointer;

    animation: galleryAppear .55s ease both;
}

@keyframes galleryAppear {

    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

.gallery-card img {
    display: block;

    width: 100%;
    height: auto;

    transition:
        transform .7s cubic-bezier(.2,.7,.2,1);
}

.gallery-card:hover img {
    transform: scale(1.045);
}


/* =========================================================
   OVERLAY
========================================================= */

.gallery-card-overlay {
    position: absolute;

    inset: 0;

    display: flex;
    align-items: flex-end;

    padding: 26px;

    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.72) 0%,
            rgba(0,0,0,.18) 45%,
            transparent 70%
        );

    opacity: 0;

    transition: opacity .35s ease;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-category {
    display: block;

    margin-bottom: 6px;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1.7px;
    text-transform: uppercase;

    color: rgba(255,255,255,.7);
}

.gallery-card-title {
    display: block;

    font-size: 18px;
    font-weight: 600;

    line-height: 1.25;

    color: white;
}


/* =========================================================
   EMPTY
========================================================= */

.gallery-empty {
    padding: 80px 0;

    text-align: center;

    font-size: 15px;
    color: #777;
}


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

.lightbox {
    position: fixed;

    inset: 0;

    z-index: 9999;

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

    padding: 50px;

    background: rgba(10,10,10,.96);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .35s ease,
        visibility .35s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}


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

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;

    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 78vh;
}

.lightbox-image {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;

    box-shadow:
        0 25px 80px rgba(0,0,0,.5);

    transform: scale(.96);

    transition:
        transform .4s cubic-bezier(.2,.7,.2,1);
}

.lightbox.active .lightbox-image {
    transform: scale(1);
}


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

.lightbox-details {
    width: 100%;

    padding-top: 18px;

    text-align: center;
}

.lightbox-category {
    display: block;

    margin-bottom: 5px;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1.8px;
    text-transform: uppercase;

    color: rgba(255,255,255,.5);
}

.lightbox-title {
    font-size: 17px;
    font-weight: 500;

    color: white;
}


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

.lightbox-close,
.lightbox-arrow {
    position: absolute;

    z-index: 2;

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

    width: 48px;
    height: 48px;

    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;

    background: rgba(255,255,255,.06);

    color: white;

    cursor: pointer;

    transition:
        background .25s ease,
        border-color .25s ease,
        transform .25s ease;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
    border-color: rgba(255,255,255,.5);

    background: rgba(255,255,255,.15);
}


/* CHIUSURA */

.lightbox-close {
    top: 25px;
    right: 25px;
}

.lightbox-close span {
    position: absolute;

    width: 20px;
    height: 1px;

    background: white;
}

.lightbox-close span:first-child {
    transform: rotate(45deg);
}

.lightbox-close span:last-child {
    transform: rotate(-45deg);
}


/* FRECCE */

.lightbox-arrow {
    top: 50%;

    font-size: 20px;

    transform: translateY(-50%);
}

.lightbox-arrow:hover {
    transform: translateY(-50%) scale(1.05);
}

.lightbox-prev {
    left: 25px;
}

.lightbox-next {
    right: 25px;
}


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

.lightbox-counter {
    position: absolute;

    bottom: 25px;
    left: 50%;

    transform: translateX(-50%);

    font-size: 11px;

    letter-spacing: 1.5px;

    color: rgba(255,255,255,.45);
}


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

@media (max-width: 1100px) {

    .gallery-grid {
        columns: 3 220px;
    }

}


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

@media (max-width: 700px) {

    .container {
        width: min(100% - 40px, 1400px);
    }

    .gallery-header {
        padding: 65px 0 35px;
    }

    .gallery-header h1 {
        letter-spacing: -2.5px;
    }

    .gallery-header p {
        font-size: 15px;
    }

    .gallery-navigation {
        padding-bottom: 25px;
    }

    .gallery-grid {
        columns: 2 140px;
        column-gap: 9px;
    }

    .gallery-card {
        margin-bottom: 9px;
    }

    .gallery-card-overlay {
        display: none;
    }

    .gallery-section {
        padding-bottom: 60px;
    }

    .lightbox {
        padding: 25px 15px;
    }

    .lightbox-image-wrapper {
        height: 72vh;
    }

    .lightbox-arrow {
        width: 42px;
        height: 42px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;

        width: 42px;
        height: 42px;
    }

    .lightbox-details {
        padding-top: 12px;
    }

}


/* =========================================================
   TOUCH DEVICE
========================================================= */

@media (hover: none) {

    .gallery-card:hover img {
        transform: none;
    }

}