/* Layali Caffè Milano — gallery: staggered editorial photos, glass captions, lightbox. */

body.gallery-viewer {
    min-height: 100vh;
    margin: 0;
    color: #f3ece0;
    background: var(--layali-bg, #050505);
    overflow-x: hidden;
}


body.gallery-viewer::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(120% 90% at 50% 38%, transparent 55%, rgba(0, 0, 0, .42) 100%);
}

body.gallery-viewer .gallery-main,
body.gallery-viewer .footer-section {
    position: relative;
    z-index: 1;
}

body.gallery-viewer .hero-navbar.div-block-2 {
    top: 12px;
    margin: 16px auto 0;
    background-color: rgba(10, 10, 10, .84);
    border-color: rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(18px) brightness(108%);
    backdrop-filter: blur(18px) brightness(108%);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
}

.gallery-skip {
    position: fixed;
    left: 12px;
    top: -80px;
    z-index: 1200;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f4ead6;
    color: #14100c;
    font-size: 13px;
    text-decoration: none;
}

.gallery-skip:focus {
    top: 12px;
}

/* Intro */
.gallery-main {
    padding-top: 26px;
}

.gallery-intro {
    max-width: 940px;
    margin: 0 auto;
    padding: 44px 24px 12px;
    text-align: center;
}

.gallery-kicker {
    margin: 0 0 14px;
    color: #b9a887;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.gallery-heading {
    margin: 0 0 16px;
    color: #f7efe1;
    font-family: "Als Granate", Georgia, serif;
    font-size: clamp(38px, 6vw, 74px);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: .01em;
}

.gallery-intro-text {
    max-width: 560px;
    margin: 0 auto 12px;
    color: rgba(243, 236, 224, .66);
    font-size: 15px;
    line-height: 1.65;
}

.gallery-intro-meta {
    margin: 0;
    color: rgba(243, 236, 224, .42);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
}

/* Showcase */
.gallery-showcase {
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
    padding: clamp(26px, 4vw, 56px) clamp(18px, 4vw, 54px) clamp(36px, 5vw, 70px);
}

.gallery-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(44% 32% at var(--light-x, 50%) var(--light-y, 18%), rgba(255, 255, 255, .055), transparent 72%);
    transition: background .4s linear;
}

.showcase-flow {
    position: relative;
    z-index: 1;
}

.showcase-row {
    display: grid;
    align-items: start;
    gap: clamp(22px, 3vw, 56px);
}

.showcase-row.is-a,
.showcase-row.is-f,
.showcase-row.is-h {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
}

.showcase-row.is-b,
.showcase-row.is-i {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
}

.showcase-row.is-d {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
}

.showcase-row.is-e {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

.showcase-row.is-c,
.showcase-row.is-g {
    grid-template-columns: 1fr;
}

.showcase-row+.showcase-row {
    margin-top: clamp(48px, 7vw, 112px);
}

.showcase-row.is-c,
.showcase-row.is-g {
    margin-top: clamp(58px, 9vw, 136px);
    margin-bottom: clamp(58px, 9vw, 136px);
}

.showcase-row.is-c+.showcase-row,
.showcase-row.is-g+.showcase-row {
    margin-top: 0;
}

.showcase-item {
    position: relative;
    margin: 0;
    padding-bottom: clamp(22px, 2.4vw, 32px);
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition:
        opacity .85s cubic-bezier(.2, .7, .2, 1),
        transform 1s cubic-bezier(.2, .7, .2, 1);
}

.showcase-item.is-in {
    opacity: 1;
    transform: none;
}

.showcase-item.is-drop {
    margin-top: clamp(40px, 7vw, 104px);
}

/* Photo */
.showcase-frame {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.showcase-frame:focus {
    outline: none;
}

.showcase-frame:focus-visible {
    outline: 2px solid #d8c19a;
    outline-offset: 7px;
    border-radius: 30px;
}

.showcase-media {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: clamp(18px, 2.2vw, 30px);
    background: #15100c;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, .5),
        0 2px 0 rgba(255, 255, 255, .04) inset;
    transform: translateZ(0);
    transition: box-shadow .5s ease;
}

.showcase-media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
    transition: box-shadow .45s ease;
}

.showcase-media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    height: 54%;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(8, 6, 5, 0), rgba(8, 6, 5, .5));
    opacity: .85;
    transition: opacity .45s ease;
}

.showcase-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
    background: #1a1512;
    filter: saturate(.96) contrast(1.03);
    transition: transform 1.1s cubic-bezier(.16, 1, .3, 1), filter .6s ease;
}

.showcase-media.is-square {
    aspect-ratio: 1 / 1;
}

.showcase-media.is-landscape {
    aspect-ratio: 4 / 3;
}

.showcase-media.is-portrait {
    aspect-ratio: 3 / 4;
}

.showcase-media.is-classic {
    aspect-ratio: 5 / 4;
}

.showcase-media.is-wide {
    aspect-ratio: 16 / 9;
}

.showcase-media.is-cinema {
    aspect-ratio: 21 / 9;
}

.showcase-frame:hover .showcase-media,
.showcase-frame:focus-visible .showcase-media {
    box-shadow:
        0 38px 76px rgba(0, 0, 0, .58),
        0 2px 0 rgba(255, 255, 255, .05) inset;
}

.showcase-frame:hover .showcase-media::before,
.showcase-frame:focus-visible .showcase-media::before {
    box-shadow: inset 0 0 0 1px rgba(232, 208, 166, .34);
}

.showcase-frame:hover .showcase-media::after,
.showcase-frame:focus-visible .showcase-media::after {
    opacity: 1;
}

.showcase-frame:hover .showcase-media img,
.showcase-frame:focus-visible .showcase-media img {
    transform: scale(1.045);
    filter: saturate(1.02) contrast(1.04);
}

/* Glass caption */
.showcase-card {
    position: absolute;
    left: clamp(14px, 2.4vw, 30px);
    bottom: calc(-1 * clamp(14px, 2vw, 22px));
    z-index: 3;
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.2vw, 16px);
    max-width: min(88%, 430px);
    padding: clamp(10px, 1.1vw, 14px) clamp(14px, 1.6vw, 20px);
    border: 1px solid rgba(232, 208, 166, .26);
    border-radius: clamp(12px, 1.4vw, 16px);
    background: linear-gradient(140deg, rgba(28, 21, 16, .84), rgba(13, 10, 8, .68));
    box-shadow:
        0 18px 40px rgba(0, 0, 0, .46),
        inset 0 1px 0 rgba(255, 255, 255, .1);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    opacity: 0;
    transform: translate3d(0, 14px, 0);
    pointer-events: none;
    transition:
        opacity .7s ease,
        transform .7s cubic-bezier(.16, 1, .3, 1),
        border-color .4s ease;
}

.showcase-item.is-in .showcase-card {
    opacity: 1;
    transform: none;
    transition-delay: .22s;
}

.showcase-item.is-in .showcase-frame:hover .showcase-card,
.showcase-item.is-in .showcase-frame:focus-visible .showcase-card {
    transform: translate3d(0, -4px, 0);
    border-color: rgba(232, 208, 166, .52);
    transition-delay: 0s;
}

.showcase-index {
    flex: none;
    padding-right: clamp(10px, 1.2vw, 14px);
    border-right: 1px solid rgba(232, 208, 166, .24);
    color: #d3bd95;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .2em;
    line-height: 1;
}

.showcase-title {
    color: #f9f2e6;
    text-shadow: 0 1px 14px rgba(0, 0, 0, .55);
    font-family: "Als Granate", Georgia, serif;
    font-size: clamp(16px, 1.6vw, 22px);
    font-weight: 400;
    line-height: 1.16;
    letter-spacing: .01em;
}

.showcase-card::after {
    content: "↗";
    margin-left: auto;
    padding-left: clamp(8px, 1vw, 12px);
    color: #d8c19a;
    font-size: 13px;
    line-height: 1;
    opacity: .5;
    transition: transform .4s ease, opacity .4s ease;
}

.showcase-frame:hover .showcase-card::after,
.showcase-frame:focus-visible .showcase-card::after {
    opacity: 1;
    transform: translate3d(2px, -2px, 0);
}

/* Outro */
.gallery-outro {
    max-width: 980px;
    margin: 0 auto;
    padding: 54px 24px 96px;
    text-align: center;
}

.gallery-outro-title {
    margin: 0 0 18px;
    color: #f4ecdc;
    font-family: "Als Granate", Georgia, serif;
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 400;
    line-height: 1.15;
}

.gallery-outro-text {
    margin: 0 0 26px;
    color: rgba(243, 236, 224, .6);
    font-size: 14px;
    line-height: 1.6;
}

.gallery-outro-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.gallery-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 10px;
    background: #12100e;
    color: #fdf7ec;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color .2s, transform .2s;
}

.gallery-cta:hover {
    background: #241d16;
    transform: translateY(-1px);
}

.gallery-cta.is-ghost {
    border: 1px solid rgba(216, 193, 154, .38);
    background: transparent;
    color: #e9dcc3;
}

.gallery-cta.is-ghost:hover {
    border-color: rgba(216, 193, 154, .68);
    background: rgba(216, 193, 154, .1);
}

/* Lightbox */
.gallery-lightbox[hidden] {
    display: none !important;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(8, 6, 5, .9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    animation: gallery-lightbox-in .28s ease both;
}

@keyframes gallery-lightbox-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

html.gallery-lightbox-open,
html.gallery-lightbox-open body {
    overflow: hidden;
}

.gallery-lightbox-figure {
    position: relative;
    max-width: min(1080px, 92vw);
    margin: 0;
    padding: 12px 12px 0;
    border: 1px solid rgba(232, 208, 166, .24);
    border-radius: 20px;
    background: linear-gradient(150deg, rgba(32, 25, 19, .92), rgba(15, 11, 9, .92));
    box-shadow:
        0 44px 96px rgba(0, 0, 0, .66),
        inset 0 1px 0 rgba(255, 255, 255, .07);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    animation: gallery-figure-in .36s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes gallery-figure-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.985);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.gallery-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: min(72vh, 820px);
    margin: 0 auto;
    border-radius: 12px;
    object-fit: contain;
    background: #17110d;
}

.gallery-lightbox-caption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 6px 16px;
    color: #f1e6d2;
}

.gallery-lightbox-title {
    font-family: "Als Granate", Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-weight: 400;
}

.gallery-lightbox-count {
    color: #c0ab86;
    font-size: 10px;
    letter-spacing: .18em;
    white-space: nowrap;
}

.gallery-lightbox-button {
    position: fixed;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(216, 193, 154, .4);
    border-radius: 50%;
    background: rgba(18, 15, 12, .72);
    color: #f0e3c9;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}

.gallery-lightbox-button:hover {
    border-color: rgba(216, 193, 154, .8);
    background: rgba(38, 31, 24, .9);
    color: #fff8ea;
}

.gallery-lightbox-button svg {
    width: 20px;
    height: 20px;
}

.gallery-lightbox-close {
    top: 22px;
    right: 22px;
}

.gallery-lightbox-prev {
    left: clamp(10px, 3vw, 40px);
    top: 50%;
    margin-top: -23px;
}

.gallery-lightbox-next {
    right: clamp(10px, 3vw, 40px);
    top: 50%;
    margin-top: -23px;
}

@media (max-width: 1100px) {
    .showcase-item.is-drop {
        margin-top: clamp(28px, 5vw, 68px);
    }
}

@media (max-width: 767px) {
    body.gallery-viewer .hero-navbar.div-block-2 {
        display: none;
    }

    .gallery-main {
        padding-top: 88px;
    }

    .gallery-intro {
        padding: 34px 20px 4px;
    }

    .gallery-intro-text {
        font-size: 14px;
    }

    .gallery-showcase {
        padding: 22px 16px 30px;
    }

    .showcase-row,
    .showcase-row.is-a,
    .showcase-row.is-b,
    .showcase-row.is-c,
    .showcase-row.is-d,
    .showcase-row.is-e,
    .showcase-row.is-f,
    .showcase-row.is-g,
    .showcase-row.is-h,
    .showcase-row.is-i {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }

    .showcase-row+.showcase-row,
    .showcase-row.is-c,
    .showcase-row.is-g,
    .showcase-row.is-c+.showcase-row,
    .showcase-row.is-g+.showcase-row {
        margin-top: 34px;
        margin-bottom: 0;
    }

    .showcase-item.is-drop {
        margin-top: 0;
    }

    .showcase-item {
        padding-bottom: 20px;
    }

    .showcase-media.is-cinema,
    .showcase-media.is-wide {
        aspect-ratio: 16 / 10;
    }

    .showcase-card {
        left: 12px;
        bottom: -14px;
        max-width: calc(100% - 24px);
    }

    .showcase-title {
        font-size: 17px;
    }

    .gallery-outro {
        padding: 34px 20px 70px;
    }

    .gallery-lightbox {
        padding: 14px;
    }

    .gallery-lightbox-figure {
        padding: 8px 8px 0;
        max-width: 96vw;
        border-radius: 16px;
    }

    .gallery-lightbox-image {
        max-height: 66vh;
        border-radius: 10px;
    }

    .gallery-lightbox-caption {
        padding: 12px 4px 14px;
    }

    .gallery-lightbox-title {
        font-size: 15px;
    }

    .gallery-lightbox-button {
        width: 42px;
        height: 42px;
    }

    .gallery-lightbox-prev {
        left: 8px;
        top: auto;
        bottom: 16px;
        margin-top: 0;
    }

    .gallery-lightbox-next {
        right: 8px;
        top: auto;
        bottom: 16px;
        margin-top: 0;
    }

    .gallery-lightbox-close {
        top: 10px;
        right: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .showcase-item,
    .showcase-card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .showcase-media img {
        transition: none;
    }

    .showcase-item.is-in .showcase-card {
        transition-delay: 0s;
    }

    .gallery-lightbox,
    .gallery-lightbox-figure {
        animation: none;
    }
}

@media print {

    .gallery-lightbox,
    .gallery-skip,
    .hero-navbar,
    .navbar {
        display: none !important;
    }

    body.gallery-viewer {
        background: #fff;
        color: #000;
    }

    .showcase-row {
        grid-template-columns: 1fr 1fr !important;
    }
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: 0;
    left: 0;
    top: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.gallery-lightbox.is-closing {
    animation: gallery-lightbox-out .2s ease both;
}

@keyframes gallery-lightbox-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}


.gallery-outro-text a {
    color: #d8c19a;
    text-decoration: underline;
    text-decoration-color: rgba(216, 193, 154, .4);
    text-underline-offset: 3px;
}

.gallery-outro-text a:hover,
.gallery-outro-text a:focus-visible {
    color: #f3ece0;
    text-decoration-color: #f3ece0;
}