/* ==========================================================================
   Tabs Gallery - Main Styles
   ========================================================================== */

/* Base Reset */
.tabs-gallery,
.tabs-gallery *,
.tabs-gallery *::before,
.tabs-gallery *::after {
    box-sizing: border-box;
}

.tabs-gallery {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    font-family: inherit;
}

/* ==========================================================================
   Tabs Navigation
   ========================================================================== */

.tabs-gallery__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    margin-bottom: 24px;
    padding: 0;
}

.tabs-gallery__tab {
    position: relative;
    background: transparent;
    border: none;
    padding: 8px 4px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #5C7282;
    cursor: pointer;
    transition: color 0.3s ease;
}

.tabs-gallery__tab:hover {
    color: #5C7282;
}

.tabs-gallery__tab--active {
    color: #5C7282;
}

.tabs-gallery__tab--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #5C7282;
}

/* ==========================================================================
   Tab Content
   ========================================================================== */

.tabs-gallery__content {
    display: none;
}

.tabs-gallery__content--active {
    display: block;
}

/* ==========================================================================
   Description
   ========================================================================== */

.tabs-gallery__description {
    max-width: 1200px;
    margin: 0 auto 32px;
    padding: 0 16px;
    text-align: left;
}

.tabs-gallery__description p {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    color: #000000;
}

/* Desktop description visible, mobile hidden */
.tabs-gallery__description--desktop {
    display: block;
}

.tabs-gallery__description--mobile {
    display: none;
}

/* ==========================================================================
   Desktop Grid - Uniform 3 columns with vertical images
   ========================================================================== */

.tabs-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 16px;
}

.tabs-gallery__grid-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
    aspect-ratio: 3/4;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tabs-gallery__grid-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

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

.tabs-gallery__grid-item:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   Mobile Carousel
   ========================================================================== */

.tabs-gallery__carousel {
    display: none;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.tabs-gallery__carousel-track {
    display: flex;
    transition: transform 0.4s ease;
}

.tabs-gallery__carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    aspect-ratio: 3/4;
    cursor: pointer;
}

.tabs-gallery__carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Carousel Navigation Buttons */
.tabs-gallery__carousel-prev,
.tabs-gallery__carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1F2937;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.tabs-gallery__carousel-prev:hover,
.tabs-gallery__carousel-next:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.05);
}

.tabs-gallery__carousel-prev {
    left: 12px;
}

.tabs-gallery__carousel-next {
    right: 12px;
}

.tabs-gallery__carousel-prev svg,
.tabs-gallery__carousel-next svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.tabs-gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tabs-gallery-lightbox--active {
    opacity: 1;
    visibility: visible;
}

.tabs-gallery-lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    cursor: pointer;
}

.tabs-gallery-lightbox__container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 100px;
}

.tabs-gallery-lightbox__content {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tabs-gallery-lightbox__image {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Lightbox Close Button */
.tabs-gallery-lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.tabs-gallery-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Lightbox Navigation */
.tabs-gallery-lightbox__prev,
.tabs-gallery-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1F2937;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.tabs-gallery-lightbox__prev:hover,
.tabs-gallery-lightbox__next:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

.tabs-gallery-lightbox__prev {
    left: 24px;
}

.tabs-gallery-lightbox__next {
    right: 24px;
}

/* ==========================================================================
   Responsive - Tablet
   ========================================================================== */

@media (max-width: 1024px) {
    .tabs-gallery__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .tabs-gallery-lightbox__container {
        padding: 60px 80px;
    }
}

/* ==========================================================================
   Responsive - Mobile
   ========================================================================== */

@media (max-width: 768px) {
    .tabs-gallery__nav {
        gap: 4px 16px;
        margin-bottom: 16px;
    }
    
    .tabs-gallery__tab {
        font-size: 14px;
        letter-spacing: 1px;
        padding: 8px 13px;
    }
    
    /* Hide grid, show carousel on mobile */
    .tabs-gallery__grid {
        display: none;
    }
    
    .tabs-gallery__carousel {
        display: block;
    }
    
    /* Hide desktop description, show mobile */
    .tabs-gallery__description--desktop {
        display: none;
    }
    
    .tabs-gallery__description--mobile {
        display: block;
        margin-top: 24px;
        margin-bottom: 0;
    }
    
    .tabs-gallery__description {
        padding: 0 0px;
    }
    
    .tabs-gallery__description p {
        font-size: 17px;
        text-align: center;
		line-height: 1.5;
    }
    
    /* Lightbox Mobile */
    .tabs-gallery-lightbox__container {
        padding: 60px 16px;
    }
    
    .tabs-gallery-lightbox__close {
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.15);
    }
    
    .tabs-gallery-lightbox__close:hover {
        background: rgba(255, 255, 255, 0.25);
    }
    
    .tabs-gallery-lightbox__close svg {
        width: 20px;
        height: 20px;
    }
    
    .tabs-gallery-lightbox__prev,
    .tabs-gallery-lightbox__next {
        width: 40px;
        height: 40px;
        background: transparent;
        box-shadow: none;
        color: rgba(255, 255, 255, 0.8);
    }
    
    .tabs-gallery-lightbox__prev {
        left: 8px;
    }
    
    .tabs-gallery-lightbox__next {
        right: 8px;
    }
    
    .tabs-gallery-lightbox__prev:hover,
    .tabs-gallery-lightbox__next:hover {
        background: transparent;
        color: #fff;
    }
    
    .tabs-gallery-lightbox__prev svg,
    .tabs-gallery-lightbox__next svg {
        width: 24px;
        height: 24px;
    }
    
    .tabs-gallery-lightbox__image {
        max-height: calc(100vh - 120px);
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tabs-gallery-lightbox--active .tabs-gallery-lightbox__image {
    animation: scaleIn 0.3s ease;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.tabs-gallery__tab:focus,
.tabs-gallery__carousel-prev:focus,
.tabs-gallery__carousel-next:focus,
.tabs-gallery-lightbox__close:focus,
.tabs-gallery-lightbox__prev:focus,
.tabs-gallery-lightbox__next:focus {
    outline: 2px solid #5C7282;
    outline-offset: 2px;
}

/* Hide focus ring for mouse users */
.tabs-gallery__tab:focus:not(:focus-visible),
.tabs-gallery__carousel-prev:focus:not(:focus-visible),
.tabs-gallery__carousel-next:focus:not(:focus-visible),
.tabs-gallery-lightbox__close:focus:not(:focus-visible),
.tabs-gallery-lightbox__prev:focus:not(:focus-visible),
.tabs-gallery-lightbox__next:focus:not(:focus-visible) {
    outline: none;
}

/* Screen reader only */
.tabs-gallery-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Body scroll lock when lightbox is open */
body.tabs-gallery-lightbox-open {
    overflow: hidden;
}
