:root {
    --ttsa-bg: #07122c;
    --ttsa-bg-soft: #0d1837;
    --ttsa-line: rgba(34, 220, 255, 0.24);
    --ttsa-accent: #2adfff;
    --ttsa-accent-soft: rgba(42, 223, 255, 0.16);
    --ttsa-text: #f6fbff;
    --ttsa-text-soft: rgba(246, 251, 255, 0.72);
    --ttsa-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    --ttsa-radius: 18px;
}

.ttsa-section {
    position: relative;
    padding: 22px 0;
}

.ttsa-section__head {
    margin-bottom: 18px;
}

.ttsa-section__subtitle {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ttsa-accent);
}

.ttsa-section__title {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 10px 16px;
    border-left: 5px solid rgba(255, 255, 255, 0.9);
    background: #3d72cb;
    color: #fff;
    font-size: clamp(24px, 2.4vw, 46px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: var(--ttsa-shadow);
}

.ttsa-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    background: rgba(9, 20, 49, 0.75);
}

.ttsa-section[data-columns="3"] .ttsa-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ttsa-section[data-columns="2"] .ttsa-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ttsa-section[data-columns="1"] .ttsa-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.ttsa-card {
    position: relative;
    min-width: 0;
}

.ttsa-card__button,
.ttsa-load-more {
    position: relative;
    display: block;
    width: 100%;
    min-height: 370px;
    border: 1px solid rgba(42, 223, 255, 0.18);
    background:
        linear-gradient(180deg, rgba(4, 10, 29, 0.16), rgba(4, 10, 29, 0.82)),
        linear-gradient(180deg, #08122e 0%, #081636 100%);
    color: var(--ttsa-text);
    text-align: left;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.ttsa-card__button:hover,
.ttsa-card__button:focus-visible,
.ttsa-load-more:hover,
.ttsa-load-more:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(42, 223, 255, 0.46);
    box-shadow: var(--ttsa-shadow);
    outline: none;
}

.ttsa-card--square .ttsa-card__button,
.ttsa-card--load-more .ttsa-load-more {
    min-height: 370px;
}

.ttsa-card--tall .ttsa-card__button {
    min-height: 470px;
}

.ttsa-card--wide {
    grid-column: span 2;
}

.ttsa-card--wide .ttsa-card__button {
    min-height: 370px;
}

.ttsa-card__bg-text {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -18px;
    font-size: clamp(48px, 7vw, 94px);
    line-height: 0.9;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(37, 202, 243, 0.11);
    pointer-events: none;
    white-space: nowrap;
}

.ttsa-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 58px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(10, 25, 57, 0.88);
    border: 1px solid rgba(42, 223, 255, 0.28);
    color: var(--ttsa-accent);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.1;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.ttsa-card__badge--image img {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.ttsa-card__copy {
    position: absolute;
    top: 56px;
    left: 18px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: calc(100% - 98px);
}

.ttsa-card__prefix {
    color: #2ee4ff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.ttsa-card__title {
    color: #ffffff;
    font-size: clamp(24px, 2.05vw, 42px);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: 0.015em;
    text-transform: uppercase;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.24);
}

.ttsa-card__cover {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 78px;
    bottom: 58px;
    z-index: 2;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
}

.ttsa-card__cover img,
.ttsa-card__inset img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ttsa-card__cover.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ttsa-card__placeholder {
    color: var(--ttsa-text-soft);
    font-size: 14px;
    font-weight: 700;
}

.ttsa-card__inset {
    position: absolute;
    right: 14px;
    bottom: 26px;
    z-index: 3;
    width: 120px;
    height: 84px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.6);
    box-shadow: 0 12px 26px rgba(0,0,0,0.24);
}

.ttsa-card__address {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 3;
    text-align: center;
    color: #77d7f0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.ttsa-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #0a1535 0%, #09112b 100%);
}

.ttsa-load-more__plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 146px;
    height: 146px;
    border-radius: 24px;
    background: #efefef;
    color: #172347;
    font-size: 120px;
    font-weight: 300;
    line-height: 1;
}

.ttsa-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    color: #ffffff;
    isolation: isolate;
}

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

.ttsa-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 20, 26, 0.84);
    backdrop-filter: blur(3px);
}

.ttsa-lightbox__shell {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    outline: none;
}

.ttsa-lightbox__toolbar {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    padding: 10px 16px;
    background: rgba(20, 21, 25, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ttsa-lightbox__quick-close {
    position: fixed;
    top: 72px;
    right: 16px;
    z-index: 2147483002;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(10, 12, 18, 0.88);
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ttsa-lightbox__quick-close:hover,
.ttsa-lightbox__quick-close:focus-visible {
    background: rgba(20, 24, 34, 0.96);
    border-color: rgba(42, 223, 255, 0.56);
    transform: scale(1.04);
    outline: none;
}

.ttsa-lightbox__counter {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
}

.ttsa-lightbox__tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ttsa-lightbox__tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.ttsa-lightbox__tool:hover,
.ttsa-lightbox__tool:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    outline: none;
}

.ttsa-lightbox__tool-icon {
    font-size: 26px;
    line-height: 1;
}

.ttsa-lightbox__tool--close {
    display: inline-flex;
}

.ttsa-lightbox__viewport {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    align-items: center;
    gap: 0;
}

.ttsa-lightbox__canvas {
    position: relative;
    min-width: 0;
    height: 100%;
    padding: 20px 10px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ttsa-lightbox__figure {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.ttsa-lightbox__image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 168px);
    object-fit: contain;
    background: #0e1117;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.ttsa-lightbox__caption {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    max-width: min(680px, calc(100% - 40px));
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(12, 15, 24, 0.72);
    color: rgba(255, 255, 255, 0.94);
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
    pointer-events: none;
}

.ttsa-lightbox__nav {
    position: relative;
    z-index: 3;
    align-self: center;
    justify-self: center;
    width: 42px;
    height: 64px;
    border: 0;
    border-radius: 4px;
    background: rgba(30, 34, 44, 0.8);
    color: rgba(255, 255, 255, 0.94);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ttsa-lightbox__nav:hover,
.ttsa-lightbox__nav:focus-visible {
    background: rgba(49, 56, 73, 0.92);
    transform: scale(1.03);
    outline: none;
}

.ttsa-lightbox__thumbs-wrap {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 10px 34px 18px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ttsa-lightbox[data-thumbs="0"] .ttsa-lightbox__thumbs-wrap {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.ttsa-lightbox__thumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    gap: 16px;
    overflow-x: auto;
    padding: 0 2px;
    scroll-behavior: smooth;
}

.ttsa-lightbox__thumb {
    flex: 0 0 116px;
    width: 116px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(14, 17, 23, 0.9);
    opacity: 0.56;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ttsa-lightbox__thumb:hover,
.ttsa-lightbox__thumb:focus-visible {
    opacity: 0.88;
    transform: translateY(-1px);
    outline: none;
}

.ttsa-lightbox__thumb.is-active {
    opacity: 1;
    border-color: var(--ttsa-accent);
    box-shadow: 0 0 0 1px rgba(42, 223, 255, 0.18);
}

.ttsa-lightbox__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.admin-bar .ttsa-lightbox__quick-close {
    top: 104px;
}

body.admin-bar .ttsa-lightbox__toolbar {
    padding-top: 42px;
}

@media (max-width: 782px) {
    body.admin-bar .ttsa-lightbox__quick-close {
        top: 92px;
    }

    body.admin-bar .ttsa-lightbox__toolbar {
        padding-top: 56px;
    }
}

body.ttsa-modal-open {
    overflow: hidden;
}

@media (max-width: 1200px) {
    .ttsa-grid,
    .ttsa-section[data-columns="4"] .ttsa-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .ttsa-grid,
    .ttsa-section[data-columns="4"] .ttsa-grid,
    .ttsa-section[data-columns="3"] .ttsa-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ttsa-card--wide {
        grid-column: span 2;
    }

    .ttsa-lightbox__viewport {
        grid-template-columns: 56px minmax(0, 1fr) 56px;
    }

    .ttsa-lightbox__thumbs-wrap {
        padding: 8px 18px 16px;
    }

    .ttsa-lightbox__thumb {
        flex-basis: 104px;
        width: 104px;
        height: 66px;
    }
}

@media (max-width: 640px) {
    .ttsa-grid,
    .ttsa-section[data-columns="4"] .ttsa-grid,
    .ttsa-section[data-columns="3"] .ttsa-grid,
    .ttsa-section[data-columns="2"] .ttsa-grid {
        grid-template-columns: 1fr;
    }

    .ttsa-card--wide {
        grid-column: span 1;
    }

    .ttsa-card__button,
    .ttsa-card--square .ttsa-card__button,
    .ttsa-card--wide .ttsa-card__button,
    .ttsa-card--load-more .ttsa-load-more {
        min-height: 340px;
    }

    .ttsa-card--tall .ttsa-card__button {
        min-height: 420px;
    }

    .ttsa-card__copy {
        top: 50px;
        left: 14px;
        right: 14px;
    }

    .ttsa-card__title {
        font-size: 34px;
    }

    .ttsa-card__cover {
        top: 82px;
        bottom: 54px;
    }

    .ttsa-lightbox__toolbar {
        min-height: 54px;
        padding: 8px 10px;
    }

    .ttsa-lightbox__quick-close {
        top: 62px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 26px;
    }

    .ttsa-lightbox__counter {
        font-size: 14px;
    }

    .ttsa-lightbox__tool {
        width: 36px;
        height: 36px;
    }

    .ttsa-lightbox__tool-icon {
        font-size: 22px;
    }

    .ttsa-lightbox__viewport {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
    }

    .ttsa-lightbox__canvas {
        padding: 14px 4px 6px;
    }

    .ttsa-lightbox__image {
        max-height: calc(100vh - 146px);
    }

    .ttsa-lightbox__nav {
        width: 34px;
        height: 54px;
        font-size: 30px;
    }

    .ttsa-lightbox__thumbs-wrap {
        padding: 8px 10px 12px;
    }

    .ttsa-lightbox__thumbs {
        gap: 10px;
    }

    .ttsa-lightbox__thumb {
        flex-basis: 88px;
        width: 88px;
        height: 58px;
        border-radius: 12px;
    }

    .ttsa-lightbox__caption {
        bottom: 8px;
        max-width: calc(100% - 16px);
        font-size: 12px;
    }
}
