
/* Gallery Page Styles - Completely Revamped */

/* Hero Section */
.gallery-hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
}

.gallery-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.gallery-hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(2px 2px at 20px 30px, rgba(197, 37, 51, 0.3), transparent),
                      radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.1), transparent),
                      radial-gradient(1px 1px at 90px 40px, rgba(197, 37, 51, 0.2), transparent);
    background-repeat: repeat;
    animation: particles 20s linear infinite;
}

.gallery-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(197, 37, 51, 0.1), transparent);
    animation: gradientShift 8s ease-in-out infinite;
}

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

.gallery-hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    margin-bottom: 2rem;
    line-height: 1.1;
}

.gallery-hero-title-main {
    display: block;
    color: var(--heading-white);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.gallery-hero-title-accent {
    display: block;
    color: var(--primary-red);
    text-shadow: 0 0 30px rgba(197, 37, 51, 0.5);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.gallery-hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-weight: 300;
    line-height: 1.6;
}

.gallery-hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.gallery-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.gallery-hero-stat:hover {
    transform: translateY(-10px);
    background: rgba(197, 37, 51, 0.1);
    border-color: var(--primary-red);
}

.gallery-hero-stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.gallery-hero-stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Main Gallery Section */
.gallery-main {
    padding: 5rem 0;
    background: var(--dark-bg);
    position: relative;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Gallery Filters */
.gallery-filters {
    position: relative;
    margin-bottom: 4rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.gallery-filters-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(197, 37, 51, 0.05), transparent);
    border-radius: 20px;
    animation: filterGlow 4s ease-in-out infinite;
}

.gallery-filters-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-white);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gallery-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.gallery-filter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gallery-filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(197, 37, 51, 0.2), transparent);
    transition: all 0.5s ease;
}

.gallery-filter-btn:hover::before,
.gallery-filter-btn.active::before {
    left: 0;
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    transform: translateY(-5px);
    border-color: var(--primary-red);
    color: var(--heading-white);
    box-shadow: 0 10px 30px rgba(197, 37, 51, 0.3);
}

.gallery-filter-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

.gallery-filter-btn:hover i,
.gallery-filter-btn.active i {
    color: var(--primary-red);
    transform: scale(1.2);
}

.gallery-filter-btn span {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.gallery-filter-count {
    font-size: 0.8rem;
    color: var(--primary-red);
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    background: rgba(197, 37, 51, 0.2);
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(197, 37, 51, 0.2);
}

.gallery-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
    z-index: 2;
}

.gallery-item:hover .gallery-item-image {
    transform: scale(1.1);
    filter: brightness(0.8);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: all 0.5s ease;
}

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

.gallery-item-category {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.gallery-item:hover .gallery-item-category {
    transform: translateY(0);
}

.gallery-item-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--heading-white);
    margin-bottom: 0.8rem;
    transform: translateY(20px);
    transition: all 0.5s ease;
    transition-delay: 0.1s;
}

.gallery-item:hover .gallery-item-title {
    transform: translateY(0);
}

.gallery-item-view {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--heading-white);
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateY(20px);
    transition: all 0.5s ease;
    transition-delay: 0.2s;
}

.gallery-item:hover .gallery-item-view {
    transform: translateY(0);
}

.gallery-item-view i {
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-item-view i {
    transform: translateX(5px);
}

/* Loading States */
.gallery-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: var(--text-light);
}

.gallery-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.gallery-loading p {
    font-size: 1.1rem;
    font-weight: 500;
}

.gallery-load-more {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.gallery-load-more-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--primary-red), #e63946);
    color: var(--heading-white);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gallery-load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.gallery-load-more-btn:hover::before {
    left: 100%;
}

.gallery-load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(197, 37, 51, 0.4);
}

.gallery-no-images {
    text-align: center;
    padding: 4rem;
    color: var(--text-light);
}

.gallery-no-images-icon {
    font-size: 4rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
}

/* Enhanced Lightbox */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.gallery-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(197, 37, 51, 0.1) 0%, rgba(0, 0, 0, 0.9) 100%);
}

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

.gallery-lightbox-image-container {
    position: relative;
    max-width: 100%;
  height: 100%;
    margin-bottom: 2rem;
  overflow: auto;
}

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

.gallery-lightbox-close {
    position: absolute;
    top: -60px;
    right: 0;
    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(--heading-white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-close:hover {
    background: var(--primary-red);
    transform: rotate(90deg);
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    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(--heading-white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-nav:hover {
    background: var(--primary-red);
    transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox-prev {
    left: -80px;
}

.gallery-lightbox-next {
    right: -80px;
}

.gallery-lightbox-info {
    text-align: center;
    color: var(--heading-white);
}

.gallery-lightbox-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gallery-lightbox-category {
    font-size: 0.9rem;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animations */
@keyframes particles {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 30px rgba(197, 37, 51, 0.5); }
    100% { text-shadow: 0 0 50px rgba(197, 37, 51, 0.8), 0 0 80px rgba(197, 37, 51, 0.3); }
}

@keyframes filterGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .gallery-hero {
        min-height: 500px;
    }
    
    .gallery-hero-stats {
        gap: 2rem;
    }
    
    .gallery-filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.8rem;
    }
    
    .gallery-filter-btn {
        padding: 1rem 0.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .gallery-lightbox-nav {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .gallery-hero {
        min-height: 400px;
        padding-top: 100px;
    }
    
    .gallery-hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .gallery-hero-stat {
        padding: 1rem;
    }
    
    .gallery-filters {
        padding: 1.5rem;
    }
    
    .gallery-filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-container {
        padding: 0 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-lightbox-close {
        top: -40px;
        right: 10px;
    }
}

@media screen and (max-width: 576px) {
    .gallery-hero-title {
        font-size: 2.5rem;
    }
    
    .gallery-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .gallery-filters-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-filter-btn {
        padding: 1rem;
    }
    
    .gallery-main {
        padding: 3rem 0;
    }
}
