/* Gallery Page Styles */

.gallery-page {
    background: #f6f3ec;
}

/* Hero Section */
.gallery-hero {
    padding: 170px 0 86px;
    color: #fff;
    background: linear-gradient(rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.58)),
        url('https://images.unsplash.com/photo-1469854523086-cc02fe5d8800?w=1200&h=400') center/cover no-repeat;
}

.gallery-hero-content {
    text-align: center;
}

.gallery-hero h1 {
    margin: 0 0 12px;
    font-size: 50px;
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.gallery-hero p {
    margin: 0 auto;
    max-width: 760px;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.92);
}

/* Gallery Main Section */
.gallery-main {
    padding: 60px 0 80px;
}

/* Filter Controls */
.gallery-filters {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
    padding: 25px;
    background: #fff;
    border: 1px solid #ece8de;
    border-radius: 12px;
    flex-wrap: wrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 250px;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.filter-group select {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    background: #f9f7f4;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:hover,
.filter-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.1);
}

#resetFilters {
    white-space: nowrap;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

#resetFilters:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    border: 1px solid #ece8de;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

.gallery-item-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-item-image {
    transform: scale(1.08);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(230, 126, 34, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

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

.gallery-item-overlay i {
    font-size: 35px;
    color: #fff;
    animation: pulse 1s infinite;
}

.gallery-item-info {
    padding: 16px;
    background: #fff;
}

.gallery-item-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.gallery-item-category {
    margin: 0;
    font-size: 12px;
    color: #999;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* Lightbox Modal */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.gallery-lightbox[hidden] {
    display: none;
}

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

.lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 800px;
    max-height: 85vh;
    width: 90%;
    animation: slideUp 0.3s ease;
}

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

.lightbox-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-info {
    text-align: center;
    color: #fff;
    width: 100%;
}

.lightbox-info h3 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #fff;
}

.lightbox-info p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 28px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .gallery-filters {
        flex-direction: column;
        gap: 15px;
    }

    .filter-group {
        width: 100%;
    }

    .gallery-hero h1 {
        font-size: 38px;
    }

    .gallery-hero p {
        font-size: 15px;
    }

    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .lightbox-nav.lightbox-prev {
        left: 10px;
    }

    .lightbox-nav.lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        padding: 120px 0 60px;
    }

    .gallery-hero h1 {
        font-size: 32px;
    }

    .gallery-hero p {
        font-size: 14px;
    }

    .gallery-main {
        padding: 40px 0 60px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .gallery-item-image {
        height: 240px;
    }

    .gallery-filters {
        padding: 18px;
    }

    .gallery-item-overlay i {
        font-size: 30px;
    }

    .lightbox-content {
        max-height: 90vh;
        width: 95%;
    }

    .lightbox-image {
        max-height: 70vh;
    }

    .lightbox-info h3 {
        font-size: 18px;
    }

    .lightbox-info p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .gallery-hero h1 {
        font-size: 26px;
    }

    .gallery-hero p {
        font-size: 13px;
    }

    .gallery-item-image {
        height: 200px;
    }

    .gallery-filters {
        gap: 12px;
        padding: 15px;
    }

    #resetFilters {
        width: 100%;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .lightbox-nav.lightbox-prev {
        left: 5px;
    }

    .lightbox-nav.lightbox-next {
        right: 5px;
    }

    .lightbox-counter {
        bottom: 10px;
        font-size: 12px;
    }

    .lightbox-content {
        gap: 15px;
    }

    .empty-state {
        padding: 60px 20px;
    }
}
