/* Gallery CSS Styles */
.page-hero {
    height: 50vh;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    background-image: radial-gradient(circle at 50% 50%, rgba(110, 77, 187, 0.1), rgba(0, 0, 0, 0.8));
}

.hero-content {
    position: relative;
    text-align: center;
    color: #fff;
    z-index: 1;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4), 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 1px 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

/* Gallery Section */
.gallery-section {
    padding: 50px 0;
    background-color: #121212;
    position: relative;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 80% 20%, rgba(110, 77, 187, 0.03), transparent 70%);
}

/* Gallery Filter */
.gallery-filter {
    margin-bottom: 30px;
    text-align: center;
}

.gallery-filter ul {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    list-style: none;
    margin: 0;
}

.gallery-filter li {
    margin: 5px;
}

.gallery-filter button {
    background-color: #1a1a1a;
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #e0e0e0;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.gallery-filter button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    border-radius: 30px;
    z-index: -1;
    transform: scale(0.98);
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-filter button.active {
    background-color: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    font-weight: bold;
}

.gallery-filter button:hover {
    background-color: #232323;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    color: #FFC000;
    transform: translateY(-2px);
}

.gallery-filter button:hover::before {
    opacity: 1;
    transform: scale(1);
}

.gallery-filter button.active:hover {
    background-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
    padding: 10px;
    margin: 0 auto;
    border: 1px dashed #ff0 !important;
    background: rgba(255,255,0,0.05) !important;
}

.gallery-item {
    position: relative;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 215, 0, 0.1);
    transform-origin: center;
    opacity: 1;
    background-color: #1a1a1a;
    border: 1px dashed #ff0 !important;
    background: rgba(255,255,0,0.05) !important;
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 30px rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.3);
    z-index: 2;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.5), transparent);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    filter: brightness(0.88) contrast(1.05);
    background: #fff !important;
    min-height: 100px !important;
    min-width: 100px !important;
    display: block !important;
}

.gallery-item:hover .gallery-image {
    filter: brightness(1) contrast(1.1);
    transform: scale(1.05);
}

.gallery-video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.9), rgba(30, 30, 30, 0.6), transparent);
    padding: 20px 15px;
    color: #e0e0e0;
    opacity: 0;
    transition: all 0.4s ease;
    transform: translateY(10px);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item-title {
    margin: 0 0 5px;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item-type {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    color: rgba(200, 162, 255, 0.8);
    letter-spacing: 0.5px;
}

.gallery-item-type i {
    margin-left: 5px;
    text-shadow: 0 0 8px rgba(200, 162, 255, 0.5);
}

.video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 60px;
    height: 60px;
    background-color: rgba(110, 77, 187, 0.3);
    border: 2px solid rgba(200, 162, 255, 0.4);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(200, 162, 255, 0.3);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.gallery-item:hover .video-icon {
    transform: translate(-50%, -50%) scale(1);
    background-color: rgba(110, 77, 187, 0.5);
    box-shadow: 0 0 30px rgba(200, 162, 255, 0.5);
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.gallery-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 1200px;
    max-height: 90vh;
}

.gallery-modal-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

.gallery-modal-video {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
}

.gallery-modal-video iframe,
.gallery-modal-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.gallery-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    padding: 15px;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.gallery-modal-nav:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.gallery-modal-prev {
    left: 20px;
}

.gallery-modal-next {
    right: 20px;
}

.gallery-modal-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    color: white;
    text-align: center;
}

/* Loading indicator */
.loading-spinner {
    text-align: center;
    padding: 30px;
}

.loading-spinner i {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 10px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
        padding: 15px 10px;
    }
    
    .gallery-item {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
        padding: 10px 5px;
    }
    
    .gallery-item {
        height: 180px;
        border-radius: 8px;
    }
    
    .gallery-modal-content {
        width: 95%;
        max-width: 90vw;
    }
    
    .gallery-modal-nav {
        font-size: 1.5rem;
        width: 30px;
        height: 30px;
    }
    
    .gallery-filter {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .gallery-filter button {
        margin: 4px;
    }
}

@media (max-width: 480px) {
    .gallery-filter button {
        padding: 6px 12px;
        font-size: 0.8rem;
        margin: 3px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
        padding: 8px 4px;
    }
    
    .gallery-item {
        height: 140px;
        border-radius: 6px;
    }
    
    .gallery-item-overlay {
        padding: 8px;
        background: linear-gradient(to top, rgba(10, 10, 10, 0.95), rgba(30, 30, 30, 0.7), transparent);
    }
    
    .gallery-item-title {
        font-size: 0.85rem;
        margin-bottom: 3px;
    }
    
    .video-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}
