.tmc-gallery {
    --tmc-gallery-orange: #f08018;
    --tmc-gallery-dark: #1d242c;
    --tmc-gallery-text: #334155;
    --tmc-gallery-line: #c7d0db;
    --tmc-gallery-white: #fff;
    --tmc-gallery-radius: 8px;
    width: 100%;
    color: var(--tmc-gallery-dark);
    font-family: "Montserrat", Sans-serif;
}

.tmc-gallery *,
.tmc-gallery *::before,
.tmc-gallery *::after {
    box-sizing: border-box;
}

.tmc-gallery__head {
    max-width: 920px;
    margin: 0 0 clamp(22px, 4vw, 44px);
}

.tmc-gallery__head p {
    margin: 0 0 8px;
    color: #fff;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 800;
    text-transform: uppercase;
}

.tmc-gallery__head h2 {
    margin: 0;
    color: #1d242c;
    font-size: clamp(42px, 6vw, 92px);
    line-height: .95;
    font-weight: 800;
    text-transform: uppercase;
}

.tmc-gallery__items {
    width: 100%;
}

.tmc-gallery__item {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: block;
    padding: 0;
    border: 1px solid rgba(199, 208, 219, .9);
    border-radius: var(--tmc-gallery-radius);
    background: var(--tmc-gallery-white);
    color: var(--tmc-gallery-dark);
    cursor: pointer;
}

.tmc-gallery__item img,
.tmc-gallery__item video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease, filter .35s ease;
}

.tmc-gallery__item:hover img,
.tmc-gallery__item:focus img,
.tmc-gallery__item:hover video,
.tmc-gallery__item:focus video {
    transform: scale(1.045);
    filter: saturate(1.05);
}

.tmc-gallery__caption {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 9px 12px;
    border-radius: 4px;
    background: rgba(29, 36, 44, .86);
    color: var(--tmc-gallery-white);
    font-size: 15px;
    line-height: 1.25;
    font-weight: 800;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
}

.tmc-gallery__item:hover .tmc-gallery__caption,
.tmc-gallery__item:focus .tmc-gallery__caption {
    opacity: 1;
    transform: translateY(0);
}

.tmc-gallery__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--tmc-gallery-orange);
    box-shadow: 0 8px 24px rgba(29, 36, 44, .28);
    transform: translate(-50%, -50%);
    transition: transform .25s ease, background .25s ease;
}

.tmc-gallery__play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 53%;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid #fff;
    transform: translate(-50%, -50%);
}

.tmc-gallery__item:hover .tmc-gallery__play,
.tmc-gallery__item:focus .tmc-gallery__play {
    background: var(--tmc-gallery-dark);
    transform: translate(-50%, -50%) scale(1.06);
}

.tmc-gallery__item.is-hidden {
    display: none !important;
}

.tmc-gallery--mosaic .tmc-gallery__items {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 150px;
    gap: 14px;
}

.tmc-gallery--mosaic .tmc-gallery__item--1,
.tmc-gallery--mosaic .tmc-gallery__item--5 {
    grid-column: span 3;
    grid-row: span 2;
}

.tmc-gallery--mosaic .tmc-gallery__item--2,
.tmc-gallery--mosaic .tmc-gallery__item--3,
.tmc-gallery--mosaic .tmc-gallery__item--6,
.tmc-gallery--mosaic .tmc-gallery__item--7 {
    grid-column: span 3;
}

.tmc-gallery--mosaic .tmc-gallery__item--4 {
    grid-column: span 2;
    grid-row: span 2;
}

.tmc-gallery--grid .tmc-gallery__items {
    display: grid;
    grid-template-columns: repeat(var(--tmc-gallery-columns), minmax(0, 1fr));
    gap: 18px;
}

.tmc-gallery--grid .tmc-gallery__item {
    aspect-ratio: 4 / 3;
}

.tmc-gallery--strip .tmc-gallery__items {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 380px);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
    scrollbar-color: var(--tmc-gallery-orange) rgba(199, 208, 219, .5);
}

.tmc-gallery--strip .tmc-gallery__item {
    min-height: 280px;
    scroll-snap-align: start;
}

.tmc-gallery__more {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    padding: 14px 24px;
    border: 1px solid var(--tmc-gallery-dark);
    border-radius: 4px;
    background: var(--tmc-gallery-dark);
    color: var(--tmc-gallery-white);
    font: inherit;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 800;
    cursor: pointer;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.tmc-gallery__more:hover,
.tmc-gallery__more:focus {
    border-color: var(--tmc-gallery-orange);
    background: var(--tmc-gallery-dark);
    color: var(--tmc-gallery-white);
}

.tmc-gallery-lightbox[hidden] {
    display: none;
}

.tmc-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.tmc-gallery-lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(29, 36, 44, .88);
}

.tmc-gallery-lightbox__dialog {
    position: relative;
    width: min(1180px, 100%);
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tmc-gallery-lightbox figure {
    width: 100%;
    margin: 0;
    display: grid;
    justify-items: center;
    gap: 14px;
}

.tmc-gallery-lightbox img,
.tmc-gallery-lightbox video {
    max-width: 100%;
    max-height: calc(100vh - 140px);
    display: block;
    border-radius: var(--tmc-gallery-radius);
    background: var(--tmc-gallery-white);
    object-fit: contain;
}

.tmc-gallery-lightbox img[hidden],
.tmc-gallery-lightbox video[hidden] {
    display: none;
}

.tmc-gallery-lightbox video {
    width: min(1180px, 100%);
    background: #000;
}

.tmc-gallery-lightbox figcaption {
    min-height: 22px;
    color: var(--tmc-gallery-white);
    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;
    text-align: center;
}

.tmc-gallery-lightbox__close,
.tmc-gallery-lightbox__arrow {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: var(--tmc-gallery-white);
    color: var(--tmc-gallery-dark);
    cursor: pointer;
}

.tmc-gallery-lightbox__close {
    top: -4px;
    right: 0;
    width: 42px;
    height: 42px;
    font-size: 32px;
    line-height: 1;
}

.tmc-gallery-lightbox__close span {
    display: block;
    transform: translateY(-1px);
}

.tmc-gallery-lightbox__arrow {
    top: 50%;
    width: 48px;
    height: 64px;
    transform: translateY(-50%);
}

.tmc-gallery-lightbox__arrow::before {
    content: "";
    width: 16px;
    height: 16px;
    display: block;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
}

.tmc-gallery-lightbox__arrow--prev {
    left: 0;
}

.tmc-gallery-lightbox__arrow--prev::before {
    transform: rotate(-45deg);
}

.tmc-gallery-lightbox__arrow--next {
    right: 0;
}

.tmc-gallery-lightbox__arrow--next::before {
    transform: rotate(135deg);
}

.tmc-gallery-lightbox__close:hover,
.tmc-gallery-lightbox__close:focus,
.tmc-gallery-lightbox__arrow:hover,
.tmc-gallery-lightbox__arrow:focus {
    background: var(--tmc-gallery-orange);
}

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

@media (max-width: 900px) {
    .tmc-gallery--mosaic .tmc-gallery__items,
    .tmc-gallery--grid .tmc-gallery__items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
    }

    .tmc-gallery--mosaic .tmc-gallery__item {
        grid-column: auto;
        grid-row: auto;
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 560px) {
    .tmc-gallery__head h2 {
        font-size: 38px;
    }

    .tmc-gallery--mosaic .tmc-gallery__items,
    .tmc-gallery--grid .tmc-gallery__items {
        grid-template-columns: 1fr;
    }

    .tmc-gallery--strip .tmc-gallery__items {
        grid-auto-columns: minmax(235px, 86vw);
    }

    .tmc-gallery__more {
        width: 100%;
    }

    .tmc-gallery-lightbox {
        padding: 16px;
    }

    .tmc-gallery-lightbox__close {
        top: 0;
        right: 0;
    }

    .tmc-gallery-lightbox__arrow {
        width: 42px;
        height: 54px;
    }
}
