/* ============================================================
   Demo Photography 2 — RIDOTTO per template-page-gallery
   Mantiene solo: grid cards, lightbox, photography-demo-2 overrides
   ============================================================ */

/* Carousel loader (usato da demo-photography.js) */
.portfolioDetail-load-more-loader,
.portfolioInfiniteScroll-load-more-loader {
    display: none;
    min-height: 132px;
}

/* ---- GRIGLIA PORTFOLIO ---- */
#portfolioGrid {
    margin: 0.5vw;
}
#portfolioGrid li {
    list-style: none;
}
#portfolioGrid.portfolioGridFullNoMargins { margin: 0; }
#portfolioGrid.portfolioGridFullNoMargins .portfolio-grid-item { padding: 0; }

.portfolio-grid-item { padding: 0.5vw; }
.portfolio-grid-item .thumb-info { border: none; }

.portfolio-grid-item .thumb-info:hover .thumb-info-wrapper .thumb-info-background {
    transform: scale(1.1);
}
.portfolio-grid-item .thumb-info:hover .thumb-info-wrapper .thumb-info-title {
    opacity: 1;
    transform: translate3d(-50%, 50%, 0px);
}
.portfolio-grid-item .thumb-info:hover .thumb-info-wrapper .thumb-info-title span {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.portfolio-grid-item .thumb-info .thumb-info-wrapper {
    background-size: cover;
    width: 100%;
}
.portfolio-grid-item .thumb-info .thumb-info-wrapper.size-4 { height: 19.25vw; }

.portfolio-grid-item .thumb-info .thumb-info-wrapper:after {
    background: rgba(10, 12, 36, 0.5);
    top: 0; right: 0; bottom: 0; left: 0;
}
.portfolio-grid-item .thumb-info .thumb-info-wrapper .thumb-info-background {
    position: absolute;
    top: 0; left: 0;
    background-size: cover;
    background-position: center;
    width: 100%; height: 100%;
    transition: ease all 0.3s;
}
.portfolio-grid-item .thumb-info .thumb-info-wrapper .thumb-info-title {
    width: 90%;
    background: transparent;
    bottom: 50%; left: 50%; right: auto;
    opacity: 0;
    text-transform: none;
    margin: 0;
    line-height: 1.4;
    font-size: 30px;
    font-weight: 300 !important;
    text-shadow: none;
    letter-spacing: -1px;
    transition: all 0.3s ease;
    transform: translate3d(-50%, 40%, 0px);
}
.portfolio-grid-item .thumb-info .thumb-info-wrapper .thumb-info-title span {
    display: block;
    opacity: 0;
    text-transform: none;
    font-size: 16px;
    transform: translate3d(0, -40%, 0px);
    transition: all 0.3s ease 0.3s;
}

@media (max-width: 991px) {
    #portfolioGrid { margin: 1.5vw; }
    .portfolio-grid-item { padding: 1.5vw; }
    .portfolio-grid-item .thumb-info .thumb-info-wrapper.size-4 { height: 30.25vw; }
}
@media (max-width: 767px) {
    #portfolioGrid:not(.portfolioGridFullNoMargins) { margin: 0vw; }
    .portfolio-grid-item { padding: 4.5vw 4.5vw 0vw 4.5vw; }
    .portfolio-grid-item .thumb-info .thumb-info-wrapper.size-4 { height: 50vw; }
}
@media (max-width: 576px) {
    .portfolio-grid-item { padding: 4.5vw 4.5vw 0vw 4.5vw; }
    .portfolio-grid-item .thumb-info .thumb-info-wrapper.size-4 { height: 70vw; }
}

/* ---- LIGHTBOX ---- */
.mfp-wrap.photography-portfolio-gallery {
    opacity: 0;
    transition: ease opacity 300ms;
}

#photographyLightbox {
    position: absolute;
    width: 100vw; height: 100vh;
    top: 50%; left: 50%;
    transform: translate3d(-50%, -50%, 0);
}
#photographyLightbox .mfp-close {
    background-color: #242E39;
    color: #fff;
    top: 0; right: 0;
    opacity: 1;
}
#photographyLightbox .mfp-close:hover { opacity: 0.7; }

#photographyLightbox .thumb-gallery {
    position: absolute;
    width: 100vw; height: 95vh;
    top: 50%; left: 50%;
    transform: translate3d(-50%, -50%, 0);
}

#photographyLightbox .owl-carousel .owl-item > div {
    position: relative;
    height: 95vh;
}
#photographyLightbox .owl-carousel .owl-item > div .img-thumbnail {
    position: absolute;
    top: 50%; left: 50%;
    width: 100%;
    padding: 0; border: none;
    background: transparent;
    text-align: center;
    transform: translate3d(-50%, -50%, 0);
}
#photographyLightbox .owl-carousel .owl-item img {
    display: inline-block !important;
    width: auto;
    max-width: 95vw;
    max-height: 90vh;
    box-shadow: 0px 0px 40px -10px #000;
}

#photographyLightbox .owl-carousel .owl-nav button.owl-prev,
#photographyLightbox .owl-carousel .owl-nav button.owl-next {
    border: 0 none; border-radius: 0;
    color: #fff;
    height: 80px; line-height: 68px;
    margin-top: -20px;
    transition: all 0.3s ease;
}
#photographyLightbox .owl-carousel .owl-nav button.owl-prev:before,
#photographyLightbox .owl-carousel .owl-nav button.owl-next:before {
    font-family: simple-line-icons;
    content: "\e605";
    font-size: 11px;
}
#photographyLightbox .owl-carousel .owl-nav button.owl-next::before {
    font-family: simple-line-icons;
    content: "\e606";
}

/* Thumbnails strip */
#photographyLightbox #thumbGalleryThumbs {
    width: 98%; height: 13vh;
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
}
#photographyLightbox #thumbGalleryThumbs:hover .owl-stage-outer,
#photographyLightbox #thumbGalleryThumbs.show-thumbs .owl-stage-outer {
    opacity: 1;
    transform: translateY(0);
}
#photographyLightbox #thumbGalleryThumbs .owl-stage-outer {
    opacity: 0;
    transform: translateY(100%);
    transition: ease all 300ms;
}
#photographyLightbox #thumbGalleryThumbs .owl-stage { margin: 0 auto; }
#photographyLightbox #thumbGalleryThumbs .owl-item.active-thumb { opacity: 0.5; }
#photographyLightbox #thumbGalleryThumbs .owl-item > div { height: 20vh; }
#photographyLightbox #thumbGalleryThumbs .owl-item > div .img-thumbnail {
    height: 5.3vw;
    box-shadow: 0px 0px 50px -10px #000;
    overflow: hidden;
}
#photographyLightbox #thumbGalleryThumbs .owl-item img {
    width: 100%; height: auto; max-height: none;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate3d(-50%, -50%, 0);
}

@media (max-width: 991px) {
    #photographyLightbox .owl-carousel .owl-item img {
        box-shadow: 0px 0px 20px #000;
        max-width: 89vw;
    }
    #photographyLightbox #thumbGalleryThumbs .owl-stage-outer { display: none; }
}
@media (max-width: 767px) {
    #photographyLightbox .owl-carousel .owl-item img { max-width: 80vw; }
}

/* ---- SKIN / OVERLAY ---- */
.portfolio-grid-item .thumb-info .thumb-info-wrapper:after {
    background: rgba(24, 32, 39, 0.5) !important;
}
#photographyLightbox .mfp-close {
    background: #182027 !important;
}

/* Overlay sfondo trasparente */
.mfp-bg {
    background: #0b0b0b;
    opacity: 0.85;
}

/* ---- html.photography-demo-2 overrides (font + hover card) ---- */
html.photography-demo-2 .owl-carousel .owl-nav button.owl-prev,
html.photography-demo-2 .owl-carousel .owl-nav button.owl-next {
    background: transparent !important;
    width: 55px;
}

html.photography-demo-2 .portfolio-grid-item .thumb-info:hover .thumb-info-wrapper:after {
    opacity: 0;
}
html.photography-demo-2 .portfolio-grid-item .thumb-info:hover .thumb-info-wrapper:before {
    bottom: -41px;
}
html.photography-demo-2 .portfolio-grid-item .thumb-info:hover .thumb-info-wrapper .thumb-info-title {
    bottom: 25px;
    left: 25px;
}
html.photography-demo-2 .portfolio-grid-item .thumb-info:hover .thumb-info-wrapper .thumb-info-background {
    transform: translate3d(0, 3%, 0) scale(1.3);
}
html.photography-demo-2 .portfolio-grid-item .thumb-info .thumb-info-wrapper:before {
    content: '';
    display: block;
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    box-shadow: 0 50px 190px 110px #182027;
    z-index: 1;
}
html.photography-demo-2 .portfolio-grid-item .thumb-info .thumb-info-wrapper:before,
html.photography-demo-2 .portfolio-grid-item .thumb-info .thumb-info-wrapper .thumb-info-title {
    bottom: -50%;
    transition: ease bottom 300ms;
}
html.photography-demo-2 .portfolio-grid-item .thumb-info .thumb-info-wrapper .thumb-info-plus {
    display: none;
}
html.photography-demo-2 .portfolio-grid-item .thumb-info .thumb-info-wrapper .thumb-info-title {
    left: 25px;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: -1px;
    line-height: 1.3;
    text-align: left !important;
    text-shadow: none;
    padding: 0;
    opacity: 1;
    font-weight: 700 !important;
    transform: none;
}
html.photography-demo-2 .portfolio-grid-item .thumb-info .thumb-info-wrapper .thumb-info-title .thumb-info-sub-title {
    display: block;
    opacity: 1;
    font-size: 14px;
    letter-spacing: 0;
    transform: none;
}
html.photography-demo-2 .portfolio-grid-item .thumb-info .thumb-info-wrapper .thumb-info-background {
    transform: translate3d(-2%, -2%, 0) scale(1.2);
    transition: ease all 5s;
}

/* ---- Cesana Sestriere — altezza card in container Bootstrap ---- */
.portfolio-grid-item .thumb-info .thumb-info-wrapper.size-4 {
    height: 260px;
}
@media (max-width: 767px) {
    .portfolio-grid-item .thumb-info .thumb-info-wrapper.size-4 { height: 56vw; }
}

/* X chiusura lightbox visibile anche su mobile */
@media (max-width: 991px) {
    #photographyLightbox .mfp-close {
        display: block !important;
        opacity: 1 !important;
        top: 0;
        right: 0;
        width: 44px;
        height: 44px;
        line-height: 44px;
        font-size: 1.4rem;
        background-color: rgba(24, 32, 39, 0.85) !important;
        color: #fff !important;
        z-index: 999;
    }
}