/**
 * gallery.css - Gallery-specific styling
 * Extends features-pages.css with gallery grid and tab functionality
 */

/* =============================================================================
   GALLERY HERO
   ============================================================================= */

.gallery-hero {
    margin-top: 110px;
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
    animation: fadeInUp 0.8s ease-out;
}

.gallery-hero h1 {
    font-size: 3.2em;
    font-weight: 700;
    color: var(--primary-bright, #00a6cc);
    margin-bottom: 24px;
    line-height: 1.2;
}

.gallery-hero p {
    color: #bbb;
    font-size: 1.3em;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 768px) {
    .gallery-hero {
        margin-top: 90px;
        margin-bottom: 40px;
    }
    
    .gallery-hero h1 {
        font-size: 2.2em;
    }
    
    .gallery-hero p {
        font-size: 1.1em;
    }
}

/* =============================================================================
   GALLERY CONTAINER
   ============================================================================= */

.gallery-container {
    max-width: 1400px;
    margin: 0 auto 80px auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .gallery-container {
        padding: 0 20px;
        margin-bottom: 60px;
    }
}

/* =============================================================================
   TAB NAVIGATION
   ============================================================================= */

.tab-container {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
    gap: 12px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.tab-button {
    background: rgba(24, 28, 28, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: #fff;
    padding: 14px 32px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    background: rgba(24, 28, 28, 0.8);
    border-color: rgba(0, 166, 204, 0.3);
    transform: translateY(-2px);
}

.tab-button.active {
    background: rgba(0, 166, 204, 0.15);
    border-color: var(--primary-bright, #00a6cc);
    color: var(--primary-bright, #00a6cc);
    box-shadow: 0 0 20px rgba(0, 166, 204, 0.3);
}

@media (max-width: 768px) {
    .tab-container {
        gap: 8px;
        margin-bottom: 32px;
    }
    
    .tab-button {
        padding: 12px 24px;
        font-size: 0.95em;
    }
}

/* =============================================================================
   GALLERY GRID
   ============================================================================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.gallery-item {
    background: rgba(24, 28, 28, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-bright, #00a6cc), var(--accent-orange, #ff6d00));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 166, 204, 0.25);
    border-color: rgba(0, 166, 204, 0.3);
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item img,
.gallery-item video,
.gallery-media,
.gallery-thumbnail {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.gallery-item-title,
.gallery-title {
    padding: 20px;
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
}

.gallery-info {
    padding: 20px;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }
    
    .gallery-item img,
    .gallery-item video {
        height: 220px;
    }
    
    .gallery-item-title {
        padding: 16px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* =============================================================================
   LIGHTBOX MODAL
   ============================================================================= */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: scaleIn 0.3s ease-out;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-title {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 1.2em;
    font-weight: 600;
    padding: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 1.5em;
}

.lightbox-close:hover {
    background: var(--accent-orange, #ff6d00);
    border-color: var(--accent-orange, #ff6d00);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 1.5em;
}

.lightbox-nav:hover {
    background: var(--primary-bright, #00a6cc);
    border-color: var(--primary-bright, #00a6cc);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95vw;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .lightbox-nav {
        width: 48px;
        height: 48px;
        font-size: 1.2em;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-title {
        position: static;
        margin-top: 16px;
        font-size: 1em;
    }
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
