/* ==========================================================================
   Gallery Section - "The Mirror Wall"
   ========================================================================== */

.ts-gallery-section {
    background: #0f0f0f;
    position: relative;
}

/* Top separator line - faint glow */
.ts-gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232, 67, 147, 0.5), transparent);
    box-shadow: 0 0 10px rgba(232, 67, 147, 0.3);
}

.ts-gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}

.ts-gallery-header p {
    max-width: 600px;
    margin: 1rem auto 0;
    color: var(--ts-silver);
}

.ts-section-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #e84393;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

/* Gallery Grid - Tighter gaps for mirror wall feel */
.ts-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 0.5rem; /* Tight gap */
    padding: 0.5rem;
    background: #000;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.ts-gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    /* Sharp corners like cut mirror glass */
    border-radius: 2px; 
}

.ts-gallery-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.ts-gallery-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.ts-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1), filter 0.5s ease;
    filter: brightness(0.9) contrast(1.1); /* Slightly metallic look */
}

/* Hover: Scale and Brighten (Reflection effect) */
.ts-gallery-item:hover .ts-gallery-image img {
    transform: scale(1.03);
    filter: brightness(1.1) contrast(1.1);
}

/* Glass Overlay - Dark Tint */
.ts-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ts-gallery-item:hover .ts-gallery-overlay {
    opacity: 1;
}

/* Shine effect on hover */
.ts-gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.2),
        transparent
    );
    transform: skewX(-25deg);
    transition: 0s;
    pointer-events: none;
}

.ts-gallery-item:hover::after {
    left: 200%;
    transition: 1s ease;
}

.ts-gallery-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #e84393;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.ts-gallery-title {
    font-family: var(--ts-font-display);
    font-size: 1.5rem;
    color: var(--ts-white);
    margin: 0;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}

.ts-gallery-item:hover .ts-gallery-title {
    transform: translateY(0);
}

/* Zoom Button - Glassy */
.ts-gallery-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60px;
    height: 60px;
    background: rgba(232, 67, 147, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: var(--ts-white);
    cursor: pointer;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(232, 67, 147, 0.4);
}

.ts-gallery-item:hover .ts-gallery-zoom {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.ts-gallery-zoom:hover {
    background: rgba(232, 67, 147, 0.6);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 50px rgba(232, 67, 147, 0.8);
}

.ts-gallery-cta {
    text-align: center;
    margin-top: 3rem;
}

/* Lightbox - Keep original styles but darker */
.ts-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.98); /* Almost solid black */
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ts-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.ts-lightbox-close,
.ts-lightbox-arrow {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--ts-white);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ts-lightbox-close:hover,
.ts-lightbox-arrow:hover {
    background: #e84393;
    border-color: #e84393;
    box-shadow: 0 0 20px rgba(232, 67, 147, 0.5);
}

.ts-lightbox-close { top: 30px; right: 30px; }
.ts-lightbox-arrow { top: 50%; transform: translateY(-50%); width: 60px; height: 60px; }
.ts-lightbox-prev { left: 30px; }
.ts-lightbox-next { right: 30px; }

.ts-lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ts-lightbox-image {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.1);
}

.ts-lightbox-caption {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem 2rem;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.ts-lightbox-category {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #e84393;
}

.ts-lightbox-title {
    font-family: var(--ts-font-display);
    font-size: 1.75rem;
    color: var(--ts-white);
    margin: 0.5rem 0 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .ts-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    
    .ts-gallery-item-large {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .ts-gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .ts-gallery-item-large {
        grid-column: span 1;
    }
    
    .ts-gallery-item .ts-gallery-image {
        height: 280px;
    }
    
    /* Gallery CTA button - allow text wrapping */
    .ts-gallery-cta .ts-btn {
        width: 100%;
        white-space: normal;
        line-height: 1.4;
        text-align: center;
        padding: 1rem 1.5rem;
    }
    
    .ts-lightbox-arrow {
        width: 45px;
        height: 45px;
    }
    
    .ts-lightbox-prev {
        left: 15px;
    }
    
    .ts-lightbox-next {
        right: 15px;
    }
    
    .ts-lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}