/* Gallery Exhibition Hero */
.exhibition-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(93, 104, 166, 0.3), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(4, 173, 191, 0.3), transparent 50%),
        linear-gradient(to bottom, #0f172a, rgba(15, 23, 42, 0.8), #0f172a);
    z-index: 1;
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.exhibition-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, var(--color-cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Filter Navigation */
.gallery-filter-nav {
    position: sticky;
    top: 70px;
    /* Adjust based on navbar height */
    z-index: 100;
    padding: 1.5rem 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.filter-list {
    display: flex;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    flex-wrap: wrap;
}

.filter-item {
    font-size: 1rem;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.filter-item.active {
    color: #0f172a;
    background: var(--color-cyan);
    font-weight: 700;
    box-shadow: 0 0 20px rgba(4, 217, 217, 0.4);
}

/* Gallery Grid & Cards */
.gallery-grid-exhibition {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #1e293b;
    aspect-ratio: 4/3;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent 70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 2rem;
    text-align: center;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item .overlay h3 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.gallery-item .overlay .creator-badge {
    color: var(--color-cyan);
    border: 1px solid var(--color-cyan);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}



/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #1e293b;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

#modal-body-content {
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    #modal-body-content {
        flex-direction: row;
        align-items: stretch;
    }

    .modal-media {
        flex: 1.4;
        height: auto;
        min-height: 500px;
    }

    .modal-details {
        flex: 1;
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }
}


.modal-media {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 40vh;
}

#modal-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#modal-3d-viewer {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.modal-details {
    padding: 3rem;
    background: #1e293b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}



.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: #fff;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .exhibition-hero {
        height: 50vh;
        min-height: 300px;
    }

    .exhibition-title {
        font-size: 2.2rem;
    }

    .exhibition-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .gallery-filter-nav {
        top: 60px;
        padding: 1rem 0;
    }

    .filter-item {
        padding: 0.4rem 1.2rem;
        font-size: 0.9rem;
    }

    .gallery-grid-exhibition {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
        padding: 1rem;
    }

    .modal-overlay {
        padding: 1rem;
    }

    .modal-details {
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .exhibition-title {
        font-size: 1.8rem;
    }

    .exhibition-label {
        font-size: 0.8rem;
    }
}