/* Page-specific styles for gallery.php */
.hero {
    background-color: #111;
    color: #fff;
    text-align: center;
    padding: 10rem 2rem;
    background-image: linear-gradient(rgba(10, 10, 10, 0.3), rgba(10, 10, 10, 0.6)), url('../images/gallery-hero.jpg');
    background-size: cover;
    background-position: center;
    border-bottom: 2px solid #333;
    position: relative;
    overflow: hidden;
}

/* Moving Disco Light Overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 0, 127, 0.4), rgba(0, 255, 255, 0.4), rgba(121, 40, 202, 0.4), rgba(255, 255, 0, 0.4));
    background-size: 400% 400%;
    animation: discoLighting 10s ease infinite;
    mix-blend-mode: color;
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h2 {
    font-size: 3.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0;
    color: #fff;
    animation: neonPulse 2s infinite alternate;
}

.content {
    padding: 4rem 2rem;
}

.content .container {
    max-width: 1200px; /* Wider container for the gallery grid */
    margin: 0 auto;
}

.content h1 {
    text-align: center;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

/* Gallery Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 15px 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    background-color: #000;
}

.gallery-item::before {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: #fff;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    pointer-events: none;
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.gallery-thumb {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.3);
    border-color: #00ffff;
}

.gallery-item:hover .gallery-thumb {
    transform: scale(1.1);
}

.gallery-item:hover::before,
.gallery-item:hover::after {
    opacity: 1;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.page-link {
    display: inline-block;
    background: #111;
    border: 1px solid #333;
    color: #ddd;
    padding: 8px 18px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.page-link:hover {
    color: #00ffff;
    background: #151515;
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.page-info {
    color: #aaa;
    font-size: 1.1rem;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    border: 1px solid #333;
    animation: zoomIn 0.3s ease;
    transition: opacity 0.3s ease;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s, text-shadow 0.3s;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #ff007f;
    text-shadow: 0 0 15px rgba(255, 0, 127, 0.8);
}

/* Lightbox Navigation */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2002;
    padding: 16px;
    user-select: none;
    transition: color 0.3s, text-shadow 0.3s;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #ff007f;
    text-shadow: 0 0 15px rgba(255, 0, 127, 0.8);
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    .gallery-thumb {
        height: 130px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 10px;
    }
    .lightbox-prev {
        left: 5px;
    }
    .lightbox-next {
        right: 5px;
    }
}