.tp-gallery-tabs {
    --tp-accent: #BEF443;
    --tp-bg: #000;
    --tp-text: #fff;
    --tp-border: rgba(255,255,255,.95);

    width: 100%;
    position: relative;
    box-sizing: border-box;
    background: var(--tp-bg);
    color: var(--tp-text);
    padding: clamp(22px, 3vw, 48px);
    border-radius: 0;
}

.tp-gallery-tabs--light {
    --tp-bg: #f6f2ee;
    --tp-text: #172538;
    --tp-border: #172538;
}

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

.tp-gallery-tabs__title {
    margin: 0 0 28px;
    color: var(--tp-text);
    font: inherit;
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1;
    font-weight: 600;
}

.tp-gallery-tabs__nav {
    width: 100%;
    display: flex;
    gap: 18px;
    align-items: stretch;
    flex-wrap: wrap;
    margin: 0 0 34px;
}

.tp-gallery-tab {
    appearance: none;
    -webkit-appearance: none;
    flex: 1 1 180px;
    min-width: 150px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 22px;
    border: 1px solid var(--tp-border);
    border-radius: 999px;
    background: transparent;
    color: var(--tp-text);
    font: inherit;
    font-size: clamp(12px, 1vw, 16px);
    font-weight: 500;
    letter-spacing: .14em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color .22s ease, transform .22s ease, color .22s ease, background-color .22s ease;
}

.tp-gallery-tab:hover,
.tp-gallery-tab:focus-visible,
.tp-gallery-tab.is-active {
    border-color: var(--tp-accent);
}

.tp-gallery-tab:hover {
    transform: translateY(-2px);
}

.tp-gallery-tab:focus-visible {
    outline: 2px solid var(--tp-accent);
    outline-offset: 3px;
}

.tp-gallery-tab__icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    object-fit: contain;
}

.tp-gallery-tabs__content {
    width: 100%;
    position: relative;
    min-height: 1px;
}

.tp-gallery-panel {
    width: 100%;
    position: absolute;
    inset: 0 auto auto 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .28s ease, transform .28s ease;
}

.tp-gallery-panel.is-active {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

.tp-gallery-panel img {
    max-width: 100%;
}

@media (max-width: 1100px) {
    .tp-gallery-tabs__nav {
        gap: 12px;
    }

    .tp-gallery-tab {
        flex-basis: calc(33.333% - 12px);
    }
}

@media (max-width: 767px) {
    .tp-gallery-tabs {
        padding: 20px 16px 28px;
    }

    .tp-gallery-tabs__nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        padding: 3px 1px 9px;
        margin-bottom: 22px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .tp-gallery-tabs__nav::-webkit-scrollbar {
        display: none;
    }

    .tp-gallery-tab {
        flex: 0 0 auto;
        min-width: max-content;
        min-height: 42px;
        padding: 9px 20px;
        font-size: 12px;
        letter-spacing: .11em;
    }

    .tp-gallery-tab__icon {
        width: 18px;
        height: 18px;
        flex-basis: 18px;
    }
}
