/* ===== GALLERY STYLES - STANDALONE ===== */
:root {
    --primary: #6c3fc9;
    --primary-light: #8f5ae6;
    --primary-dark: #5a32a8;
    --bg-dark: #0b0b16;
    --bg-card: #1a1a2e;
    --text-light: #e2e2fc;
    --border-glow: rgba(108, 63, 201, 0.3);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.gallery-header {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glow);
    padding: 3rem 2rem;
    text-align: center;
}

.header-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), #b380ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.header-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Container */
.gallery-main {
    flex: 1;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    width: 100%;
}

.gallery-container {
    background: var(--bg-card);
    border-radius: 40px;
    padding: 2rem;
    border: 1px solid var(--border-glow);
    box-shadow: var(--shadow);
}

/* Controls */
.gallery-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.search-wrapper {
    width: 100%;
}

.search-box {
    width: 100%;
    padding: 1.2rem 2rem;
    border-radius: 60px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-box:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(108, 63, 201, 0.2);
}

.search-box::placeholder {
    color: rgba(226, 226, 252, 0.5);
}

.filter-wrapper {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--primary-dark);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    min-height: 500px;
}

.gallery-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    transform: translateY(0);
}

.gallery-item-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.gallery-item-overlay p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.5;
}

.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.gallery-item:hover .category-badge {
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-nav:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: -80px;
}

.lightbox-nav.next {
    right: -80px;
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    color: white;
    font-size: 1.1rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Slideshow Controls */
.slideshow-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.slideshow-btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.slideshow-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--primary-dark);
}

.slideshow-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-light);
    font-size: 1.3rem;
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 30px;
    border: 2px dashed var(--border-glow);
}

.no-results span {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

/* Footer */
.gallery-footer {
    text-align: center;
    padding: 2rem;
    background: rgba(26, 26, 46, 0.8);
    border-top: 1px solid var(--border-glow);
    margin-top: 2rem;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .lightbox-nav.prev {
        left: 20px;
    }

    .lightbox-nav.next {
        right: 20px;
    }
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2.5rem;
    }

    .gallery-container {
        padding: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .filter-wrapper {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .slideshow-controls {
        flex-direction: column;
    }

    .lightbox-caption {
        font-size: 0.9rem;
        bottom: -30px;
    }
}