/* TABS */
.gallery-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    border-bottom: 1px solid rgba(22, 37, 92, .08);
	border-top: 1px solid rgba(22, 37, 92, .08);
    padding: 0 80px;
    scrollbar-width: none;
	position:relative;
}

.gsc-gallery__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 50, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-item:hover .gsc-gallery__overlay{
    opacity: 1;
}

.tab-btn {
    font-size: .68rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--mid);
    padding: 18px 24px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    transition: all .3s;
    flex-shrink: 0;
    background: unset;
    border-color: transparent;
}

.tab-btn.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    font-weight: 700;
}

.tab-btn:hover {
    color: var(--navy);
}

/* CONTENT */
.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* MASONRY */
.gallery-grid {
/*     column-count: 4;
    column-gap: 20px; */
	display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 4px;
}

.gallery-item {
    break-inside: avoid;
    overflow: hidden;
    position: relative;
    background: var(--paper);
    aspect-ratio: 4 / 3;
    cursor: pointer;
}

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

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

.is-hidden {
    display: none;
}


/* LIGHTBOX */
.lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox img {
    max-width: 80%;
    max-height: 80%;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 35px;
    color: #fff;
    cursor: pointer;
}

.lightbox .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    user-select: none;
}

.lightbox .prev { left: 30px; }
.lightbox .next { right: 30px; }

/* RESPONSIVE */
@media(max-width:1024px){ .gallery-grid	{ grid-template-columns: repeat(3, 1fr);} .sub-tabs{justify-content: flex-start!important;} }
@media(max-width:768px){ .gallery-grid	{ grid-template-columns: repeat(2, 1fr); } }
@media(max-width:480px){ .gallery-grid	{ grid-template-columns: repeat(2, 1fr); } }
/* SUB-TABS — child galleries inside a main tab (e.g. Sports > Karate) */
.sub-tabs {
    display: flex;
    gap: .6rem;
    justify-content: center;
    flex-wrap: nowrap;
    margin:1rem 0 .6rem;
    padding: 0 16px;
    overflow-y: scroll;
    scrollbar-width: none;
}

.sub-btn {
    font-size: .66rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 600;
    padding: .5rem 1.1rem;
    border-radius: 99px;
    white-space: nowrap;
    border: 1px solid rgba(22, 37, 92, .2);
    background: #fff;
    color: var(--navy);
    cursor: pointer;
    transition: all .25s;
}

.sub-btn:hover {
    border-color: var(--gold);
}

.sub-btn.active {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.sub-content {
    display: none;
}

.sub-content.active {
    display: block;
}

/* GALLERY DESCRIPTIONS — post excerpts (parent + child galleries) */
.gallery-excerpt {
    max-width: 720px;
    margin: .6rem auto .4rem;
    text-align: center;
    font-size: .92rem;
    line-height: 1.8;
    color: var(--mid, #6B7280);
    font-weight: 300;
    padding: 0 16px;
}

.gallery-excerpt--sub {
    margin-top: 1rem;
    font-size: .88rem;
}