/* Lightbox Styles */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
    padding: 1rem;
}

.photo-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--border-light) 100%);
    border: 1px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-md);
}

.photo-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    border-color: rgba(99, 102, 241, 0.3);
}

.photo-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
    filter: brightness(0.95) contrast(1.05);
}

.photo-item:hover img {
    transform: scale(1.08);
    filter: brightness(1) contrast(1.1) saturate(1.1);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.4) 0%, 
        rgba(6, 182, 212, 0.4) 50%,
        rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-slow);
    gap: 1.25rem;
    backdrop-filter: var(--blur-sm);
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-number {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.zoom-icon {
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Gallery Header */
.gallery-header {
    text-align: center;
    margin: 3rem 0;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--bg-color) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.gallery-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.02) 0%, 
        rgba(6, 182, 212, 0.02) 100%);
    pointer-events: none;
}

.gallery-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.05em;
    position: relative;
}

.gallery-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Gallery Navigation */
.gallery-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.2s;
    border: 2px solid var(--primary-color);
}

.nav-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Related Galleries */
.related-galleries {
    margin: 3rem 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.related-card {
    background: var(--bg-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.related-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.2);
}

.related-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-card img,
.related-card .placeholder-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.related-info {
    padding: 1rem;
}

.related-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-info p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: var(--blur-lg);
    -webkit-backdrop-filter: var(--blur-lg);
    transition: var(--transition-slow);
    animation: fadeIn 0.3s ease-out;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: var(--blur-lg);
    }
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    transition: var(--transition-slow);
    animation: lightboxImageIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxImageIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1002;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 50%;
    transition: var(--transition-base);
    backdrop-filter: var(--blur-md);
    z-index: 1003;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.15);
    box-shadow: var(--shadow-xl);
}

.lightbox-prev:active,
.lightbox-next:active {
    transform: translateY(-50%) scale(1.05);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    max-width: 600px;
    font-size: 0.95rem;
    line-height: 1.4;
    opacity: 0.9;
    z-index: 1002;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.lightbox-counter {
    position: fixed;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 500;
    z-index: 1002;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.lightbox-rating {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    z-index: 1004;
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.star {
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1;
    padding: 0.25rem;
    border-radius: 4px;
}

.star:hover {
    color: #ffd700;
    transform: scale(1.1);
    background: rgba(255, 215, 0, 0.1);
}

.star.user-rated {
    color: #ffd700;
}

.rating-info {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.view-counter {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gallery-title {
        font-size: 2rem;
    }
    
    .gallery-meta {
        gap: 1rem;
        justify-content: center;
    }
    
    .meta-item {
        font-size: 0.875rem;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 0.75rem;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 0.75rem;
    }
    
    .gallery-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 200px;
}
        text-align: center;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
    
    .lightbox-caption {
        bottom: 10px;
        max-width: 90%;
        font-size: 0.875rem;
        padding: 0.4rem 0.8rem;
    }
    
    .lightbox-counter {
        top: 10px;
        left: 10px;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .lightbox-rating {
        bottom: 60px;
        padding: 0.75rem 1rem;
        max-width: 90%;
    }
    
    .star {
        font-size: 1.5rem;
        padding: 0.2rem;
    }
    
    .rating-info {
        font-size: 0.8rem;
    }
    
    .view-counter {
        font-size: 0.75rem;
    }
}
