/* Gallery & Slideshow Styles */

:root {
    --gallery-bg: #0a0a0a;
    --gallery-text: #ffffff;
    --gallery-accent: #e50914; /* Red accent matching theme */
    --gallery-gap: 20px;
}

body.gallery-page {
    background-color: var(--gallery-bg);
    color: var(--gallery-text);
}

.gallery-header {
    text-align: center;
    padding: 80px 20px 40px;
    background: linear-gradient(to bottom, #000000, #111111);
}

.gallery-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gallery-header p {
    color: #888;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.category-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.category-card:hover {
    transform: translateY(-10px);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.category-count {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

/* Image Grid */
.photo-grid {
    column-count: 3;
    column-gap: 20px;
    padding: 20px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .photo-grid {
        column-count: 2;
    }
}
@media (max-width: 600px) {
    .photo-grid {
        column-count: 1;
    }
}

.photo-item {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: zoom-in;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: opacity 0.3s ease;
}

.photo-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10001;
}

.lightbox-close:hover {
    color: var(--gallery-accent);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    background: var(--gallery-accent);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.back-btn:hover {
    background: var(--gallery-accent);
    border-color: var(--gallery-accent);
    transform: translateX(-5px);
}

.gallery-nav-center {
    text-align: center;
    padding-bottom: 20px;
}
