/* Gallery Section Container */
#seminar-gallery {
    padding: 80px 20px;
    background: radial-gradient(circle at 10% 20%, rgb(0, 0, 0) 0%, rgb(20, 20, 20) 90.2%);
    background-color: #050505;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #a5a5a5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gallery-subtitle {
    font-size: 1.2rem;
    color: #888;
    font-weight: 300;
}

/* Folder Grid View */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    perspective: 1000px;
}

.folder-card {
    background: rgba(255, 255, 255, 0.05);
    /* Fallback */
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0;
    /* Remove padding here, put in content */
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    /* backdrop-filter: blur(10px); Removed as it conflicts with img bg */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    aspect-ratio: 1/0.8;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.folder-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
    transition: 0.3s;
}

.folder-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.folder-card:hover .folder-overlay {
    background: linear-gradient(to top, rgba(0, 100, 255, 0.8) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.folder-card::before {
    /* Removed the shine effect that slides across, as it might distract from image */
    display: none;
}

.folder-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(0, 242, 254, 0.5);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(0, 242, 254, 0.2);
}

.folder-icon {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: 0.3s;
    opacity: 0.8;
}

.folder-card:hover .folder-icon {
    transform: scale(1.1);
    color: #fff;
    opacity: 1;
}

.folder-name {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.folder-count {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #ddd;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

/* Images View */
.images-view {
    display: none;
    /* Hidden by default */
    animation: fadeIn 0.5s ease;
}

.images-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.back-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 25px;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateX(-5px);
}

.current-folder-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: zoom-in;
    aspect-ratio: 1/1;
    /* Square by default */
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.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:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 2;
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    transition: 0.3s;
    background: none;
    border: none;
}

.close-lightbox:hover {
    color: #ff4757;
    transform: rotate(90deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .gallery-title {
        font-size: 2rem;
    }

    .folder-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }

    .images-header-bar {
        flex-direction: column-reverse;
        /* Controls first */
        gap: 15px;
        text-align: center;
    }
}