/* ============================================
   Gallery Tabs Lightbox - Front-end Styles
   ============================================ */

/* --- Tabs --- */
.gtl-gallery-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.gtl-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.gtl-tab {
    padding: 10px 28px;
    border: 2px solid #333;
    background: transparent;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: 30px;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.gtl-tab:hover {
    background: #555;
    color: #fff;
    border-color: #555;
}

.gtl-tab.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* --- Grid --- */
.gtl-grid {
    display: grid;
    grid-template-columns: repeat(var(--gtl-columns, 4), 1fr);
    gap: 15px;
}

.gtl-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
}

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

.gtl-item:hover img {
    transform: scale(1.08);
}

.gtl-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 30px 15px 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gtl-item:hover .gtl-item-overlay {
    opacity: 1;
}

.gtl-item-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.gtl-item-category {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

/* Hidden items (filtered out) */
.gtl-item.gtl-hidden {
    display: none;
}

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

.gtl-lightbox.gtl-lightbox-open {
    display: flex;
}

.gtl-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gtl-lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.gtl-lightbox-caption {
    color: #fff;
    font-size: 16px;
    margin-top: 12px;
    text-align: center;
    max-width: 600px;
}

.gtl-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: opacity 0.2s ease;
    padding: 5px 10px;
}

.gtl-lightbox-close:hover {
    opacity: 0.7;
}

.gtl-lightbox-prev,
.gtl-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 48px;
    cursor: pointer;
    z-index: 10;
    padding: 10px 18px;
    transition: opacity 0.2s ease;
    line-height: 1;
}

.gtl-lightbox-prev {
    left: 20px;
}

.gtl-lightbox-next {
    right: 20px;
}

.gtl-lightbox-prev:hover,
.gtl-lightbox-next:hover {
    opacity: 0.7;
}

/* --- No images message --- */
.gtl-no-images {
    text-align: center;
    font-size: 16px;
    color: #666;
    padding: 40px 20px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .gtl-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gtl-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gtl-tabs {
        gap: 8px;
    }

    .gtl-tab {
        padding: 8px 18px;
        font-size: 13px;
    }

    .gtl-lightbox-prev,
    .gtl-lightbox-next {
        font-size: 36px;
        padding: 8px 12px;
    }

    .gtl-lightbox-prev {
        left: 10px;
    }

    .gtl-lightbox-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .gtl-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .gtl-tab {
        padding: 7px 14px;
        font-size: 12px;
    }
}
