/* ── CTS Gallery – Frontend ───────────────────────────────────────────── */

.cts-gallery-wrap {
    width: 100%;
}

/* ── Filter buttons ───────────────────────────────────────────────────── */
.cts-gallery-filters {
    margin-bottom: 24px;
    text-align: center;
}

.cts-gallery-filters-cats {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.cts-filter-btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #145694;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 7px 14px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1.4;
}

.cts-filter-btn:focus,
.cts-filter-btn:focus-visible {
    outline: none;
    box-shadow: none;
}

.cts-filter-btn:hover {
    color: #0b4b91;
    background: transparent;
    outline: none;
    box-shadow: none;
}

.cts-filter-btn.active {
    color: #5192d4;
    background: transparent;
    text-decoration: none;
}

/* View All — bordered box at end of row */
.cts-filter-view-all {
    border: 1.5px solid #0b4b91 !important;
    color: #0b4b91 !important;
    padding: 7px 20px !important;
    background: transparent !important;
    margin-left: 10px;
    text-decoration: none !important;
}

.cts-filter-view-all:hover {
    background: transparent !important;
    color: #0b4b91 !important;
    box-shadow: none !important;
}

.cts-filter-view-all.active {
    background: transparent !important;
    color: #0b4b91 !important;
    border-color: #0b4b91 !important;
    text-decoration: none !important;
}

/* ── Grid ─────────────────────────────────────────────────────────────── */
.cts-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 900px) {
    .cts-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .cts-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}

/* ── Gallery items ────────────────────────────────────────────────────── */
.cts-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    aspect-ratio: 4 / 3;
    background: #ebebeb;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cts-gallery-item.cts-visible {
    opacity: 1;
    transform: translateY(0);
}

.cts-gallery-item.cts-hidden {
    display: none;
}

/* Stagger first 8 visible items */
.cts-gallery-item:nth-child(2)  { transition-delay: 0.04s; }
.cts-gallery-item:nth-child(3)  { transition-delay: 0.08s; }
.cts-gallery-item:nth-child(4)  { transition-delay: 0.12s; }
.cts-gallery-item:nth-child(5)  { transition-delay: 0.16s; }
.cts-gallery-item:nth-child(6)  { transition-delay: 0.20s; }
.cts-gallery-item:nth-child(7)  { transition-delay: 0.24s; }
.cts-gallery-item:nth-child(8)  { transition-delay: 0.28s; }

.cts-gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.cts-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.cts-gallery-item:hover img {
    transform: scale(1.04);
}

.cts-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 86, 148, 0.45);
    opacity: 0;
    transition: opacity 0.25s;
}

.cts-gallery-item:hover .cts-gallery-overlay {
    opacity: 1;
}

.cts-gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    padding: 40px 0;
}

/* ── Load More button ─────────────────────────────────────────────────── */
.cts-load-more-wrap {
    text-align: center;
    margin-top: 28px;
}

.cts-load-more-btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: #0b4b91;
    border: 1.5px solid #0b4b91;
    border-radius: 0;
    padding: 10px 32px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    line-height: 1.4;
}

.cts-load-more-btn:hover {
    background: #145694;
    border-color: #145694;
}

/* ── Lightbox ─────────────────────────────────────────────────────────── */
.cts-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.cts-lightbox.cts-lb-open {
    display: flex;
}

.cts-lb-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.cts-lb-inner img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.cts-lb-title {
    color: #fff;
    margin: 12px 0 0;
    font-size: 14px;
    font-family: inherit;
}

.cts-lb-close,
.cts-lb-prev,
.cts-lb-next {
    position: fixed;
    background: rgba(11, 75, 145, 0.8);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    transition: background 0.2s;
    padding: 0;
    border-radius: 0;
}

.cts-lb-close:hover,
.cts-lb-prev:hover,
.cts-lb-next:hover {
    background: #0b4b91;
}

.cts-lb-close {
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 32px;
}

.cts-lb-prev,
.cts-lb-next {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 60px;
    font-size: 36px;
}

.cts-lb-prev { left: 16px; }
.cts-lb-next { right: 16px; }
