/* Gallery Page Styles - Works with main site styles.css */

/* Gallery Hero Section */
.gallery-hero {
    background: linear-gradient(135deg, #f8d7df 0%, #cbc1d5 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.gallery-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.gallery-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

/* Gallery Filter Section */
.gallery-filter {
    background: #ffffff;
    padding: 40px 0;
    border-bottom: 1px solid #f0eceb;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-btn {
    padding: 10px 25px;
    background: #ffffff;
    border: 2px solid #f0eceb;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #505050;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-btn:hover {
    border-color: #e7a5b3;
    color: #d76a84;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 165, 179, 0.2);
}

.filter-btn.active {
    background: #e7a5b3;
    border-color: #e7a5b3;
    color: #ffffff;
}

/* Gallery Content Section */
.gallery-content {
    padding: 60px 0;
    min-height: 500px;
    background: #fdf6e9;
}

.gallery-container {
    position: relative;
}

/* No Content Message */
.no-content-message {
    text-align: center;
    padding: 80px 20px;
    color: #505050;
}

.no-content-message i {
    font-size: 4rem;
    color: #f8d7df;
    margin-bottom: 20px;
}

.no-content-message h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 10px;
    color: #505050;
}

.no-content-message p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: #c8c8c8;
}

/* Category Sections */
.category-section {
    margin-bottom: 80px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: #505050;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e7a5b3, transparent);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    justify-content: center;
}

/* Empty Category Placeholder */
.category-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-style: italic;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    aspect-ratio: 4/5;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.gallery-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover .gallery-item-image {
    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.8), transparent);
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

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

.gallery-item-title {
    color: #ffffff;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.gallery-item-caption {
    color: rgba(255,255,255,0.9);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

#lightboxImage {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-info {
    margin-top: 20px;
    text-align: center;
    color: #ffffff;
}

#lightboxTitle {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

#lightboxCaption {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.2);
    border-color: #ffffff;
    transform: scale(1.1) translateY(-50%);
}

.lightbox-close:hover {
    transform: scale(1.1);
}

/* Masonry Layout Option */
.gallery-masonry {
    column-count: 3;
    column-gap: 25px;
}

.gallery-masonry .gallery-item {
    margin-bottom: 25px;
    break-inside: avoid;
    aspect-ratio: unset;
}

.gallery-masonry .gallery-item-image {
    height: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .gallery-masonry {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        padding: 100px 0 40px;
    }
    
    .gallery-title {
        font-size: 2.5rem;
    }
    
    .gallery-subtitle {
        font-size: 1rem;
    }
    
    .filter-buttons {
        padding: 0 20px;
    }
    
    .filter-btn {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .gallery-masonry {
        column-count: 1;
    }
    
    .category-title {
        font-size: 1.8rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.3));
    }
}

/* Loading Animation */
.gallery-loading {
    text-align: center;
    padding: 40px;
}

.gallery-loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-light-grey);
    border-top-color: var(--color-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Filter Animation */
.gallery-item.filter-hide {
    opacity: 0;
    transform: scale(0.8);
    position: absolute;
    pointer-events: none;
}

.gallery-item.filter-show {
    opacity: 1;
    transform: scale(1);
    position: relative;
    pointer-events: auto;
}
