/* Gallery Page Styles */

/* Gallery Header */
.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: #5C4033;
    margin-bottom: 1rem;
    font-weight: 500;
}

.gallery-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 0;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 0 auto 4rem;
    max-width: 1400px;
    padding: 0 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fff;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.gallery-item:focus {
    outline: 3px solid #D2B48C;
    outline-offset: 2px;
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Gallery Captions */
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1.5rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.gallery-caption h3 {
    font-family: 'Playfair Display', serif;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: white;
}

.gallery-caption p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    color: white;
}

/* Gallery Description */
.gallery-description {
    padding-top: 3rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.description-title {
    font-family: 'Playfair Display', serif;
    color: #D2B48C;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 500;
}

.description-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 2rem;
}

.description-text:last-child {
    margin-bottom: 0;
}

/* Call to Action Section */
.cta-section {
    background-color: #f9f9f9;
    margin: 0 -20px;
    padding: 4rem 20px;
}

.cta-content {
    text-align: center;
}

.cta-title {
    font-family: 'Playfair Display', serif;
    color: #5C4033;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 500;
}

.cta-text {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer Tagline */
.footer-tagline {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    margin-top: 1rem;
    color: white;
}

.lightbox-title {
    font-family: 'Playfair Display', serif;
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 500;
}

.lightbox-description {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        padding: 0 1rem;
    }
    
    .gallery-title {
        font-size: 2.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .lightbox-nav {
        position: static;
        transform: none;
        margin: 1rem 0.5rem;
        display: inline-block;
    }
    
    .lightbox-close {
        top: -40px;
        right: 50%;
        transform: translateX(50%);
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .gallery-title {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    .description-title {
        font-size: 1.5rem;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .gallery-item img,
    .gallery-caption,
    .lightbox {
        transition: none;
    }
}

/* Focus styles for keyboard navigation */
.gallery-item:focus-visible {
    outline: 3px solid #D2B48C;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .gallery-caption {
        background: rgba(0, 0, 0, 0.95);
    }
    
    .lightbox-nav {
        background: rgba(255, 255, 255, 0.4);
    }
}
