/* Gallery Page Styles */
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 40px;
    min-height: 100vh;
}

.gallery-header {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-header h1 {
    font-size: 3.5em;
    font-weight: 300;
    color: #fff;
    margin-bottom: 20px;
}

.gallery-header p {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

/* Filter Buttons */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
    padding: 20px 0;
}

.filter-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-transform: capitalize;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.filter-btn.active {
    background: #fff;
    color: #1B1B1B;
    border-color: #fff;
}

/* Instagram-style Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    border-radius: 4px;
    background: #2a2a2a;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.gallery-item:hover::after {
    background: rgba(0, 0, 0, 0.3);
}

.gallery-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

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

.gallery-item-info h4 {
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 5px;
}

.gallery-item-info p {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    text-align: left;
}

/* Loading State */
.gallery-loading {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.gallery-empty h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

/* Fullscreen Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: 0 auto;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 30px;
    border-radius: 4px;
    color: #fff;
    text-align: center;
    max-width: 80%;
}

.lightbox-info h3 {
    font-size: 1.2em;
    margin-bottom: 5px;
    font-weight: 500;
}

.lightbox-info p {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Back Button */
.gallery-back {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 1000;
}

.gallery-back a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.gallery-back a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .gallery-header h1 {
        font-size: 2.5em;
    }

    .gallery-filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.8em;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .lightbox-info {
        bottom: 10px;
        padding: 10px 20px;
        max-width: 90%;
    }

    .gallery-back {
        top: 15px;
        left: 15px;
    }
}

