/* Gallery Specific Styles */

/* Earthy Background */
body {
    background-image: 
        linear-gradient(rgba(253, 232, 230, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(253, 232, 230, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 30% 30%, rgba(201, 67, 53, 0.02) 0%, transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(173, 116, 99, 0.02) 0%, transparent 60%);
    background-size: 60px 60px, 60px 60px, cover, cover;
}

/* Masonry Grid Layout */
.masonry-grid {
    column-count: 1;
    column-gap: 0;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .masonry-grid {
        column-count: 3;
        column-gap: 0;
    }
}

@media (min-width: 1280px) {
    .masonry-grid {
        column-count: 4;
    }
}

/* Gallery Item */
.gallery-item {
    break-inside: avoid;
    margin: 0;
    padding: 0;
    cursor: pointer;
    display: block;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(90, 68, 49, 0.95) 0%, rgba(90, 68, 49, 0.7) 40%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    z-index: 2;
    pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    pointer-events: auto;
}

.gallery-title {
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

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

.gallery-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    transform: translateY(10px);
    transition: transform 0.3s ease 0.1s;
}

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

.gallery-tag {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Filter Button States */
.filter-btn {
    cursor: pointer;
    user-select: none;
}

.filter-btn.active {
    background: linear-gradient(135deg, #e05d4d 0%, #c94335 100%);
    color: white;
    border-color: transparent;
}

/* No animations - keep it simple */

/* Filter transition */
.gallery-item.hidden {
    display: none;
}

/* Lightbox Styles */
#lightbox {
    transition: opacity 0.3s ease;
}

#lightbox.show {
    display: flex !important;
}

#lightbox img {
    max-height: 85vh;
    border-radius: 0.5rem;
}

#lightbox-info {
    border-radius: 0 0 0.5rem 0.5rem;
}

#lightbox button {
    transition: all 0.2s ease;
}

#lightbox button:hover {
    transform: scale(1.1);
}

#lightbox button:active {
    transform: scale(0.95);
}

/* Loading State */
.gallery-item.loading {
    background: linear-gradient(90deg, #f2ede4 25%, #e6d9c8 50%, #f2ede4 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    min-height: 200px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Mountain-inspired decorative elements - REMOVED */

/* Responsive adjustments */
@media (max-width: 640px) {
    .gallery-overlay {
        padding: 1rem;
    }
    
    .gallery-title {
        font-size: 1rem;
    }
    
    .gallery-tag {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: #fbd5d1;
    color: #6f2620;
}

/* Focus states for accessibility */
.filter-btn:focus-visible {
    outline: 2px solid #e05d4d;
    outline-offset: 2px;
}

.gallery-item:focus-visible {
    outline: 2px solid #e05d4d;
    outline-offset: 4px;
}

/* Print styles */
@media print {
    nav, footer, .filter-btn {
        display: none;
    }
    
    .masonry-grid {
        column-count: 2;
    }
    
    .gallery-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .gallery-item img,
    .gallery-overlay,
    .gallery-title,
    .gallery-tags,
    .filter-btn,
    #lightbox {
        animation: none !important;
        transition: none !important;
    }
}
