.wp-block-gallery.has-nested-images[class*="is-style-showcase-"] {
    --thg-sc-gap: 8px;
    margin-bottom: 0;
}

.wp-block-gallery.has-nested-images[class*="is-style-showcase-"] figure.wp-block-image:not(#thg-sc) {
    position: relative;
    margin: 0;
    width: auto;
    transition: opacity .6s ease var(--d, 0ms), translate .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms), transform .35s ease, box-shadow .35s ease;
}

.wp-block-gallery.has-nested-images[class*="is-style-showcase-"] figure.wp-block-image:not(#thg-sc)[hidden] {
    display: none;
}

.wp-block-gallery.has-nested-images[class*="is-style-showcase-"] figure.wp-block-image:not(#thg-sc) a {
    display: block;
    height: 100%;
    cursor: zoom-in;
}

.wp-block-gallery.has-nested-images[class*="is-style-showcase-"] figure.wp-block-image:not(#thg-sc) a:focus-visible {
    outline: 3px solid var(--lmh-primary-success);
    outline-offset: 2px;
}

.wp-block-gallery.has-nested-images.thg-sc-anim figure.wp-block-image:not(#thg-sc) {
    opacity: 0;
    translate: 0 28px;
}

.wp-block-gallery.has-nested-images.thg-sc-anim figure.wp-block-image:not(#thg-sc).is-in {
    opacity: 1;
    translate: 0 0;
}

.wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc),
.wp-block-gallery.has-nested-images.is-style-showcase-masonry figure.wp-block-image:not(#thg-sc) {
    overflow: hidden;
    background: var(--lmh-bg-gray);
}

.wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc) img,
.wp-block-gallery.has-nested-images.is-style-showcase-masonry figure.wp-block-image:not(#thg-sc) img {
    transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .4s ease;
}

.wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc):hover img,
.wp-block-gallery.has-nested-images.is-style-showcase-masonry figure.wp-block-image:not(#thg-sc):hover img {
    transform: scale(1.06);
    filter: saturate(1.12);
}

.wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc)::after,
.wp-block-gallery.has-nested-images.is-style-showcase-masonry figure.wp-block-image:not(#thg-sc)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 6px;
    background: var(--lmh-primary-success);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s ease;
    pointer-events: none;
}

.wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc):hover::after,
.wp-block-gallery.has-nested-images.is-style-showcase-masonry figure.wp-block-image:not(#thg-sc):hover::after {
    transform: scaleX(1);
}

.wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc) a::after,
.wp-block-gallery.has-nested-images.is-style-showcase-masonry figure.wp-block-image:not(#thg-sc) a::after {
    content: "+";
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: var(--lmh-primary-success);
    color: var(--lmh-primary-info);
    font: 700 26px/1 Montserrat, sans-serif;
    opacity: 0;
    translate: 0 -8px;
    transition: opacity .3s ease, translate .3s ease;
    pointer-events: none;
}

.wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc):hover a::after,
.wp-block-gallery.has-nested-images.is-style-showcase-masonry figure.wp-block-image:not(#thg-sc):hover a::after {
    opacity: 1;
    translate: 0 0;
}

.wp-block-gallery.has-nested-images.is-style-showcase-mosaic {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: clamp(70px, 7.5vw, 150px);
    grid-auto-flow: dense;
    gap: var(--thg-sc-gap);
}

.wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc) {
    grid-column: span 2;
    grid-row: span 2;
}

.wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc).is-portrait {
    grid-column: span 1;
}

.wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc).is-feature {
    grid-column: span 3;
    grid-row: span 3;
}

.wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc).is-hero {
    grid-column: span 4;
    grid-row: span 4;
}

.wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc) img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-block-gallery.has-nested-images.is-style-showcase-masonry {
    display: block;
    columns: 3 240px;
    column-gap: 12px;
}

.wp-block-gallery.has-nested-images.is-style-showcase-masonry figure.wp-block-image:not(#thg-sc) {
    display: block;
    margin: 0 0 12px;
    break-inside: avoid;
}

.wp-block-gallery.has-nested-images.is-style-showcase-masonry figure.wp-block-image:not(#thg-sc) img {
    display: block;
    width: 100%;
    height: auto;
}

.thg-sc-spot {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 78vh;
    margin-bottom: 10px;
    background: var(--lmh-primary-info);
}

.thg-sc-spot::before {
    content: "";
    position: absolute;
    inset: -40px;
    background: var(--thg-sc-bg, none) center / cover no-repeat;
    filter: blur(28px) brightness(.65) saturate(1.2);
    transition: background-image .4s ease;
}

.thg-sc-spot-open {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.thg-sc-spot-open img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: thg-sc-fade .5s ease;
}

.thg-sc-spot .thg-sc-count {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
    padding: 8px 16px;
    background: var(--lmh-primary-success);
    color: var(--lmh-primary-info);
    font: 700 15px/1.2 Montserrat, sans-serif;
    letter-spacing: .08em;
}

.wp-block-gallery.has-nested-images.is-style-showcase-spotlight {
    display: flex;
    flex-wrap: nowrap;
    position: relative;
    overflow-x: auto;
    gap: var(--thg-sc-gap);
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--lmh-primary-info) var(--lmh-bg-gray);
}

.wp-block-gallery.has-nested-images.is-style-showcase-spotlight figure.wp-block-image:not(#thg-sc) {
    flex: 0 0 auto;
    height: 96px;
    scroll-snap-align: center;
    opacity: .55;
}

.wp-block-gallery.has-nested-images.is-style-showcase-spotlight figure.wp-block-image:not(#thg-sc) a {
    cursor: pointer;
}

.wp-block-gallery.has-nested-images.is-style-showcase-spotlight figure.wp-block-image:not(#thg-sc).is-current,
.wp-block-gallery.has-nested-images.is-style-showcase-spotlight figure.wp-block-image:not(#thg-sc):hover {
    opacity: 1;
}

.wp-block-gallery.has-nested-images.is-style-showcase-spotlight figure.wp-block-image:not(#thg-sc).is-current::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 5px;
    background: var(--lmh-primary-success);
}

.wp-block-gallery.has-nested-images.is-style-showcase-spotlight figure.wp-block-image:not(#thg-sc) img {
    width: auto;
    height: 96px;
    object-fit: cover;
}

.wp-block-gallery.has-nested-images.is-style-showcase-scrapbook {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 38px 28px;
    padding: 44px 32px;
    background: var(--lmh-bg-gray);
}

.wp-block-gallery.has-nested-images.is-style-showcase-scrapbook figure.wp-block-image:not(#thg-sc) {
    padding: 10px 10px 40px;
    background: var(--lmh-primary-white);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
    transform: rotate(var(--r, -2deg));
}

.wp-block-gallery.has-nested-images.is-style-showcase-scrapbook figure.wp-block-image:not(#thg-sc):nth-child(4n+2) {
    --r: 1.6deg;
}

.wp-block-gallery.has-nested-images.is-style-showcase-scrapbook figure.wp-block-image:not(#thg-sc):nth-child(4n+3) {
    --r: -1deg;
}

.wp-block-gallery.has-nested-images.is-style-showcase-scrapbook figure.wp-block-image:not(#thg-sc):nth-child(4n+4) {
    --r: 2.4deg;
}

.wp-block-gallery.has-nested-images.is-style-showcase-scrapbook figure.wp-block-image:not(#thg-sc):nth-child(7n) {
    --r: -3deg;
}

.wp-block-gallery.has-nested-images.is-style-showcase-scrapbook figure.wp-block-image:not(#thg-sc)::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    z-index: 1;
    width: 86px;
    height: 24px;
    background: rgba(196, 214, 0, .78);
    transform: translateX(-50%) rotate(-3deg);
    pointer-events: none;
}

.wp-block-gallery.has-nested-images.is-style-showcase-scrapbook figure.wp-block-image:not(#thg-sc):nth-child(even)::before {
    transform: translateX(-50%) rotate(4deg);
}

.wp-block-gallery.has-nested-images.is-style-showcase-scrapbook figure.wp-block-image:not(#thg-sc):hover {
    z-index: 2;
    transform: rotate(0) scale(1.06);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
}

.wp-block-gallery.has-nested-images.is-style-showcase-scrapbook figure.wp-block-image:not(#thg-sc) img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 50% 30%;
}

.thg-sc-more {
    position: relative;
    z-index: 1;
    display: block;
    overflow: hidden;
    margin: 28px auto 0;
    padding: 14px 36px;
    border: 0;
    border-radius: 0;
    background: var(--lmh-primary-info);
    color: var(--lmh-primary-white);
    font: 600 16px/1.2 Montserrat, sans-serif;
    cursor: pointer;
    transition: color .4s ease;
}

.thg-sc-more::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--lmh-primary-success);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s ease;
}

.thg-sc-more:hover,
.thg-sc-more:focus-visible {
    color: var(--lmh-primary-info);
}

.thg-sc-more:hover::before,
.thg-sc-more:focus-visible::before {
    transform: scaleX(1);
}

html.thg-sc-lock {
    overflow: hidden;
}

.thg-sc-expand {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: var(--lmh-primary-success);
    color: var(--lmh-primary-info);
    transition: width .25s ease, height .25s ease;
}

.thg-sc-expand svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: square;
    transition: transform .25s ease;
}

.thg-sc-spot-open:hover .thg-sc-expand,
.thg-sc-spot-open:focus-visible .thg-sc-expand {
    width: 52px;
    height: 52px;
}

.thg-sc-spot-open:hover .thg-sc-expand svg,
.thg-sc-spot-open:focus-visible .thg-sc-expand svg {
    transform: scale(1.12);
}

.thg-sc-box {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "rail main";
    background: rgba(0, 28, 46, .97);
    opacity: 0;
    transition: opacity .25s ease;
}

.thg-sc-box[hidden] {
    display: none;
}

.thg-sc-box.is-open {
    opacity: 1;
}

.thg-sc-box.no-rail {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main";
}

.thg-sc-box.no-rail .thg-sc-rail {
    display: none;
}

.thg-sc-main {
    grid-area: main;
    position: relative;
    min-width: 0;
    min-height: 0;
    padding: 70px 96px 64px;
}

.thg-sc-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
}

.thg-sc-stage img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    opacity: 0;
    transform: scale(.97);
    transition: opacity .3s ease, transform .3s ease;
}

.thg-sc-box.is-ready .thg-sc-stage img {
    opacity: 1;
    transform: none;
}

.thg-sc-rail {
    grid-area: rail;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: 16px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(0, 0, 0, .28);
    scrollbar-width: thin;
    scrollbar-color: var(--lmh-primary-success) transparent;
}

.thg-sc-rail button {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, .06);
    opacity: .5;
    cursor: pointer;
    transition: opacity .2s ease;
}

.thg-sc-rail button img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thg-sc-rail button:hover,
.thg-sc-rail button:focus-visible,
.thg-sc-rail button.is-current {
    opacity: 1;
}

.thg-sc-rail button:focus-visible {
    outline: 2px solid var(--lmh-primary-white);
    outline-offset: 2px;
}

.thg-sc-rail button.is-current::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid var(--lmh-primary-success);
}

.thg-sc-box .thg-sc-count {
    position: absolute;
    left: 50%;
    bottom: 24px;
    translate: -50% 0;
    color: var(--lmh-primary-success);
    font: 700 15px/1 Montserrat, sans-serif;
    letter-spacing: .14em;
    white-space: nowrap;
}

.thg-sc-prev,
.thg-sc-next,
.thg-sc-close {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--lmh-primary-info);
    color: var(--lmh-primary-success);
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease;
}

.thg-sc-prev:hover,
.thg-sc-next:hover,
.thg-sc-close:hover,
.thg-sc-prev:focus-visible,
.thg-sc-next:focus-visible,
.thg-sc-close:focus-visible {
    background: var(--lmh-primary-success);
    color: var(--lmh-primary-info);
}

.thg-sc-prev,
.thg-sc-next {
    top: 50%;
    translate: 0 -50%;
}

.thg-sc-prev {
    left: 24px;
}

.thg-sc-next {
    right: 24px;
}

.thg-sc-prev::before,
.thg-sc-next::before {
    content: "";
    width: 13px;
    height: 13px;
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
}

.thg-sc-prev::before {
    transform: translateX(3px) rotate(-135deg);
}

.thg-sc-next::before {
    transform: translateX(-3px) rotate(45deg);
}

.thg-sc-close {
    top: 14px;
    right: 18px;
    z-index: 3;
    font: 400 34px/1 Montserrat, sans-serif;
}

.thg-sc-spot .thg-sc-prev {
    left: 0;
}

.thg-sc-spot .thg-sc-next {
    right: 0;
}

@keyframes thg-sc-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 1199px) {
    .thg-sc-box {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) auto;
        grid-template-areas: "main" "rail";
    }

    .thg-sc-box.no-rail {
        grid-template-rows: minmax(0, 1fr);
    }

    .thg-sc-main {
        padding: 70px 84px 56px;
    }

    .thg-sc-rail {
        flex-direction: row;
        padding: 10px 12px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .thg-sc-rail button {
        width: auto;
        height: 72px;
    }

    .thg-sc-box .thg-sc-count {
        bottom: 20px;
    }
}

@media (max-width: 991px) {
    .wp-block-gallery.has-nested-images.is-style-showcase-mosaic {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: clamp(70px, 11vw, 140px);
    }

    .wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc).is-feature {
        grid-column: span 2;
        grid-row: span 2;
    }

    .wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc).is-hero {
        grid-row: span 3;
    }

    .wp-block-gallery.has-nested-images.is-style-showcase-spotlight figure.wp-block-image:not(#thg-sc),
    .wp-block-gallery.has-nested-images.is-style-showcase-spotlight figure.wp-block-image:not(#thg-sc) img {
        height: 80px;
    }
}

@media (max-width: 575px) {
    .wp-block-gallery.has-nested-images.is-style-showcase-mosaic {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 26vw;
        gap: 6px;
    }

    .wp-block-gallery.has-nested-images.is-style-showcase-mosaic figure.wp-block-image:not(#thg-sc).is-hero {
        grid-column: span 2;
        grid-row: span 3;
    }

    .wp-block-gallery.has-nested-images.is-style-showcase-scrapbook {
        grid-template-columns: repeat(2, 1fr);
        gap: 26px 16px;
        padding: 30px 16px;
    }

    .wp-block-gallery.has-nested-images.is-style-showcase-scrapbook figure.wp-block-image:not(#thg-sc) {
        padding: 6px 6px 22px;
    }

    .wp-block-gallery.has-nested-images.is-style-showcase-spotlight {
        gap: 6px;
    }

    .wp-block-gallery.has-nested-images.is-style-showcase-spotlight figure.wp-block-image:not(#thg-sc),
    .wp-block-gallery.has-nested-images.is-style-showcase-spotlight figure.wp-block-image:not(#thg-sc) img {
        height: 62px;
    }

    .thg-sc-spot {
        aspect-ratio: 4 / 3;
        margin-bottom: 6px;
    }

    .thg-sc-spot .thg-sc-prev,
    .thg-sc-spot .thg-sc-next {
        width: 40px;
        height: 40px;
    }

    .thg-sc-spot .thg-sc-count {
        padding: 6px 12px;
        font-size: 13px;
    }

    .thg-sc-expand {
        width: 38px;
        height: 38px;
    }

    .thg-sc-expand svg {
        width: 18px;
        height: 18px;
    }

    .thg-sc-main {
        padding: 64px 0 62px;
    }

    .thg-sc-close {
        top: 8px;
        right: 8px;
        width: 46px;
        height: 46px;
    }

    .thg-sc-box .thg-sc-prev,
    .thg-sc-box .thg-sc-next {
        top: auto;
        bottom: 8px;
        width: 46px;
        height: 46px;
        translate: none;
    }

    .thg-sc-box .thg-sc-prev {
        left: 8px;
    }

    .thg-sc-box .thg-sc-next {
        right: 8px;
    }

    .thg-sc-box .thg-sc-count {
        bottom: 24px;
    }

    .thg-sc-rail {
        gap: 6px;
        padding: 8px;
    }

    .thg-sc-rail button {
        height: 56px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .thg-sc-box {
        grid-template-columns: 110px minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        grid-template-areas: "rail main";
    }

    .thg-sc-rail {
        flex-direction: column;
        padding: 8px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .thg-sc-rail button {
        width: 100%;
        height: auto;
    }

    .thg-sc-main {
        padding: 12px 70px;
    }

    .thg-sc-box .thg-sc-prev,
    .thg-sc-box .thg-sc-next {
        top: 50%;
        bottom: auto;
        translate: 0 -50%;
    }

    .thg-sc-box .thg-sc-count {
        bottom: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wp-block-gallery.has-nested-images[class*="is-style-showcase-"] figure.wp-block-image:not(#thg-sc),
    .wp-block-gallery.has-nested-images[class*="is-style-showcase-"] figure.wp-block-image:not(#thg-sc) img,
    .thg-sc-box,
    .thg-sc-stage img,
    .thg-sc-spot-open img {
        transition: none;
        animation: none;
    }
}
