/* Gallery Folder View Styles */
#main-content {
    background-image: url('/assets/img/contentbg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.folder-item {
    cursor: pointer;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.folder-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.folder-cover {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.folder-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.folder-item:hover .folder-cover img {
    transform: scale(1.1);
}

.folder-info {
    padding: 1.25rem;
    flex-grow: 1;
}

.folder-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.folder-meta {
    font-size: 0.85rem;
    color: #666;
}

.folder-meta i {
    width: 16px;
    margin-right: 5px;
    color: #004488;
}

.folder-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 68, 136, 0.85);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
}

/* Gallery Details (Images) View Styles */
.gallery-item {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

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

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Modal and Navigation Styles */
.modal-xl {
    max-width: 90%;
}

#galleryModal .modal-content {
    background: transparent;
    border: none;
}

#galleryModal .modal-body {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#fullImage {
    max-width: 100%;
    max-height: 80vh;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
    display: block;
}

#imageCaption {
    background: rgba(0, 0, 0, 0.85);
    padding: 12px;
    width: 100%;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    font-size: 1.1rem;
}

.close-gallery {
    position: absolute;
    right: -40px;
    top: -40px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1060;
}

#galleryModal {
    z-index: 100001 !important;
}

.modal-backdrop {
    z-index: 100000 !important;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    z-index: 1070;
    backdrop-filter: blur(5px);
}

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

.prev-btn { left: -80px; }
.next-btn { right: -80px; }

@media (max-width: 1200px) {
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
    .nav-btn {
        background: rgba(0, 0, 0, 0.5);
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    .close-gallery {
        right: 10px;
        top: -50px;
    }
}
