/* ===================================
   Gallery Page Styles
   =================================== */

/* Gallery Hero */
.gallery-hero {
    margin-top: 90px;
    padding: 80px 20px;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
                url('../images/gallery-bg.jpg') center/cover no-repeat;
    text-align: center;
    border-bottom: 3px solid var(--primary-gold);
}

.gallery-hero-content h1 {
    font-family: 'Rye', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--primary-gold);
    margin-bottom: 15px;
    text-shadow: 3px 3px 6px var(--shadow-dark);
}

.gallery-hero-content p {
    font-size: 18px;
    color: var(--cream);
    font-style: italic;
}

/* Gallery Section */
.gallery-section {
    padding: 80px 0;
    background: var(--leather-brown);
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 60px;
}

.filter-btn {
    padding: 12px 30px;
    background: transparent;
    border: 2px solid var(--primary-gold);
    color: var(--cream);
    font-family: 'Cinzel', serif;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-gold);
    color: var(--deep-brown);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

/* Gallery Item */
.gallery-item {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.gallery-item[style*="display: none"] {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery Frame - Old Photo Style */
.gallery-frame {
    position: relative;
    background: linear-gradient(135deg, #f5f5dc 0%, #ece5ce 100%);
    padding: 15px;
    border: 4px solid var(--deep-brown);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
}

.gallery-frame:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

/* Corner decorations */
.gallery-frame::before,
.gallery-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-gold);
    z-index: 2;
}

.gallery-frame::before {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.gallery-frame::after {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

/* Image */
.gallery-frame img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    filter: sepia(20%);
    transition: all 0.3s;
}

.gallery-frame:hover img {
    filter: sepia(0%);
    transform: scale(1.05);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    inset: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-frame:hover .gallery-overlay {
    opacity: 1;
}

/* Gallery Info */
.gallery-info {
    padding: 25px;
    width: 100%;
}

.gallery-info h3 {
    font-family: 'Rye', serif;
    color: var(--primary-gold);
    font-size: 22px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.gallery-info p {
    color: var(--cream);
    font-size: 15px;
    font-style: italic;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 1200px;
    width: 100%;
    position: relative;
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border: 5px solid var(--primary-gold);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

/* Lightbox Controls */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-gold);
    border: none;
    color: var(--deep-brown);
    font-size: 36px;
    cursor: pointer;
    z-index: 2001;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: var(--cream);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.8);
    border: none;
    color: var(--deep-brown);
    font-size: 36px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary-gold);
}

/* Lightbox Caption */
.lightbox-caption {
    background: rgba(43, 24, 16, 0.95);
    padding: 25px;
    margin-top: 15px;
    border: 2px solid var(--primary-gold);
}

.lightbox-caption h3 {
    font-family: 'Rye', serif;
    color: var(--primary-gold);
    font-size: 28px;
    margin-bottom: 10px;
}

.lightbox-caption p {
    color: var(--cream);
    font-size: 17px;
    font-style: italic;
}

/* Upload Prompt Section */
.upload-prompt {
    background: linear-gradient(135deg, rgba(43, 24, 16, 0.95) 0%, rgba(61, 40, 23, 0.95) 100%);
    border: 3px solid var(--primary-gold);
    padding: 60px 40px;
    text-align: center;
}

.upload-prompt h2 {
    font-family: 'Rye', serif;
    font-size: 36px;
    color: var(--primary-gold);
    margin-bottom: 20px;
}

.upload-prompt > p {
    font-size: 18px;
    color: var(--cream);
    margin-bottom: 40px;
}

/* Upload Info Cards */
.upload-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.upload-card {
    background: rgba(245, 245, 220, 0.1);
    padding: 30px;
    border: 2px solid rgba(212, 175, 55, 0.5);
    transition: all 0.3s;
}

.upload-card:hover {
    border-color: var(--primary-gold);
    transform: translateY(-5px);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.upload-card h4 {
    font-family: 'Cinzel', serif;
    color: var(--primary-gold);
    font-size: 20px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.upload-card p {
    color: var(--cream);
    font-size: 15px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-hero {
        padding: 60px 20px;
    }
    
    .gallery-filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .gallery-frame img {
        height: 250px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .upload-prompt {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        width: 100%;
    }
    
    .upload-info {
        grid-template-columns: 1fr;
    }
}