/* ===================================
   Gallery Page Styles
   =================================== */

body {
    padding-top: 80px;
}

/* Gallery Header */
.gallery-header {
    text-align: center;
    padding: 5rem 5% 4rem;
    background: linear-gradient(135deg, var(--secondary) 0%, #ffffff 100%);
}

.gallery-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    font-weight: 300;
}

.gallery-header p {
    font-size: 1.2rem;
    color: var(--light-text);
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Buttons */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 5% 2rem;
    flex-wrap: wrap;
    background: var(--secondary);
}

.filter-btn {
    padding: 0.9rem 2.5rem;
    border: 2px solid var(--accent);
    background: white;
    color: var(--text);
    cursor: pointer;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    font-family: inherit;
}

.filter-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 165, 116, 0.3);
}

.filter-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 3px 10px rgba(212, 165, 116, 0.4);
}

/* Gallery Grid */
.gallery-container {
    padding: 3rem 5% 6rem;
    max-width: 1600px;
    margin: 0 auto;
    background: var(--secondary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    animation: fadeIn 0.6s ease-out;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: #f0f0f0;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.4s ease;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
}

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

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    padding: 2.5rem 2rem;
    transform: translateY(calc(100% - 60px));
    transition: transform 0.4s ease;
    color: white;
    z-index: 2;
}

.gallery-item:hover .gallery-item-overlay {
    transform: translateY(0);
}

.gallery-item-overlay h3 {
    color: white;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    font-weight: 500;
}

.gallery-item-overlay p {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.category-tag {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Fade in/out animation for filtering */
.gallery-item.hidden {
    display: none;
}

.gallery-item.fade-out {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s, transform 0.3s;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.96);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1.5rem 2rem;
    margin-top: 1rem;
    border-radius: 5px;
    text-align: center;
    max-width: 600px;
}

.lightbox-info h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.lightbox-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2001;
}

.lightbox-close {
    top: 2rem;
    right: 2rem;
}

.lightbox-prev {
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
}

.lightbox-next {
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(212, 165, 116, 0.8);
    transform: scale(1.1);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.watermark {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Prints CTA */
.prints-cta {
    background: linear-gradient(135deg, var(--primary) 0%, #1a1a1a 100%);
    color: white;
    padding: 5rem 5%;
    text-align: center;
}

.prints-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.prints-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Empty state */
.gallery-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--light-text);
}

.gallery-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

/* Loading state */
.gallery-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--secondary);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .filter-container {
        gap: 0.8rem;
        padding: 2rem 4%;
    }

    .filter-btn {
        padding: 0.7rem 1.8rem;
        font-size: 0.75rem;
    }

    .gallery-header h1 {
        font-size: 2rem;
    }

    .gallery-header p {
        font-size: 1rem;
    }

    .gallery-item {
        height: 350px;
    }

    .gallery-item-overlay {
        transform: translateY(calc(100% - 50px));
        padding: 1.5rem 1.5rem;
    }

    .gallery-item-overlay h3 {
        font-size: 1.1rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 2.5rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }

    .lightbox img {
        max-height: 70vh;
    }

    .watermark {
        bottom: 10px;
        right: 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .gallery-container {
        padding: 2rem 4%;
    }

    .filter-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.7rem;
    }

    .prints-content h2 {
        font-size: 1.8rem;
    }

    .prints-content p {
        font-size: 1rem;
    }
}