/* Gallery Page Styles */

/* Hero Section */
.gallery-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, var(--black) 0%, #0D0D0D 50%, var(--black) 100%);
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(255, 0, 0, 0.05) 0%, transparent 50%);
    animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.gallery-hero .hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
}

.gallery-hero .hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.gallery-hero .gradient-text {
    display: block;
    background: linear-gradient(135deg, #ff0000 0%, #FF0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-hero .outline-text {
    display: block;
    color: transparent;
    -webkit-text-stroke: 2px var(--white);
    text-stroke: 2px var(--white);
}

.gallery-hero .hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gray-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Section */
.filter-section {
    padding: 3rem 0 2rem;
    background: var(--black);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    border-color: #ff0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.filter-btn.active {
    background: #ff0000;
    border-color: #ff0000;
    color: var(--white);
    box-shadow: 0 4px 16px rgba(255, 0, 0, 0.4);
}

.results-counter {
    text-align: center;
    color: var(--gray-light);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 0;
    background: var(--black);
    min-height: 70vh;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--gray-dark);
}

.gallery-item.hidden {
    display: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(255, 0, 0, 0.3),
                0 0 0 2px #ff0000;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
    opacity: 1;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    background: linear-gradient(to top, rgba(255, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.gallery-category {
    display: inline-block;
    background: #ff0000;
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    align-self: flex-start;
}

.gallery-title {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    margin-bottom: 0.5rem;
}

.gallery-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    text-align: center;
    max-width: 600px;
    color: var(--white);
}

.lightbox-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.lightbox-category {
    display: inline-block;
    background: #ff0000;
    color: var(--white);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: none;
    margin-bottom: 1rem;
}

.lightbox-description {
    color: var(--gray-light);
    font-size: 1rem;
    line-height: 1.6;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: #ff0000;
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid #ff0000;
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #ff0000;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Loading State */
.gallery-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Empty State */
.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-light);
}

.gallery-empty h3 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.gallery-empty p {
    font-size: 1rem;
    margin-bottom: 2rem;
}

.gallery-empty button {
    background: #ff0000;
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-empty button:hover {
    background: #FF0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 0, 0, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .filter-bar {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
    }
    
    .lightbox-prev {
        left: 1rem;
    }
    
    .lightbox-next {
        right: 1rem;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
    }
    
    .lightbox-caption {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-hero .hero-title {
        font-size: 2rem;
    }
    
    .filter-section {
        padding: 2rem 0 1.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .gallery-item img,
    .filter-btn,
    .lightbox {
        transition: none;
    }
    
    @keyframes fadeIn {
        from, to {
            opacity: 1;
            transform: none;
        }
    }
    
    @keyframes pulseGlow {
        from, to {
            opacity: 0.5;
        }
    }
}
