/* Catalog & Gallery Styles */

.gallery-header-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 4rem 0 3rem;
    margin-bottom: 3rem;
    color: white;
}

.gallery-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gallery-subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
}

.gallery-filters {
    margin-bottom: 3rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    padding: 8px 24px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-filters a.filter-btn {
    text-decoration: none;
    display: inline-block;
}

.gallery-filters a.filter-btn:visited {
    color: #475569;
}

.gallery-filters a.filter-btn.active:visited {
    color: #fff;
}

.filter-btn:hover,
.filter-btn.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transform: translateY(-2px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 4rem;
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    background: #fff;
    opacity: 1;
    /* For filtering animation */
    transform: scale(1);
}

.item-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 80%;
    /* Adjusted Aspect Ratio */
    overflow: hidden;
}

.item-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    color: white;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: opacity 0.4s ease;
    padding: 24px;
}

.gallery-item:hover .item-image-wrapper img {
    transform: scale(1.1);
}

.gallery-item:hover .item-overlay {
    opacity: 1;
}

.overlay-content {
    transform: translateY(20px);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-item:hover .overlay-content {
    transform: translateY(0);
}

.item-category {
    background: #6366f1;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    display: inline-block;
}

.item-caption {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.zoom-icon {
    font-size: 1.25rem;
    color: white;
    background: rgba(255, 255, 255, 0.25);
    width: 46px;
    height: 46px;
    line-height: 46px;
    border-radius: 50%;
    margin: 0 auto;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-icon:hover {
    background: #4f46e5;
    transform: scale(1.1);
}

/* Lightbox Modal */
.zoom-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    /* Higher than bootstrap navbar */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.close-zoom {
    position: absolute;
    top: 25px;
    right: 35px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 48px;
    font-weight: 300;
    transition: color 0.3s ease;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
}

.close-zoom:hover,
.close-zoom:focus {
    color: #fff;
    text-decoration: none;
}

.zoom-image {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 75vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.zoom-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #e2e8f0;
    padding-top: 15px;
}

.zoom-caption .badge {
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 20px;
}

@media only screen and (max-width: 768px) {
    .zoom-image {
        width: 100%;
        max-width: 95%;
    }

    .gallery-title {
        font-size: 2.25rem;
    }

    .gallery-subtitle {
        font-size: 1.1rem;
    }

    .close-zoom {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }
}