/* Base Styles */
.scibiz-folder-gallery {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 20px 0;
}

.sfg-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Breadcrumb Navigation */
.sfg-breadcrumb {
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sfg-breadcrumb a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.sfg-breadcrumb a:hover {
    color: #005177;
    text-decoration: underline;
}

.sfg-separator {
    color: #888;
    margin: 0 5px;
}

.sfg-current {
    font-weight: bold;
    color: #444;
}

/* Grid Layout */
.sfg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.sfg-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    color: #333;
    height: 100%;
}

.sfg-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* Folders */
.sfg-folder {
    aspect-ratio: 1;
}

.sfg-folder-icon {
    width: 64px;
    height: 64px;
    color: #f2a900; /* Yellow folder color */
    margin-bottom: 15px;
}

.sfg-folder-name {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    word-break: break-word;
}

/* Images */
.sfg-image-link {
    padding: 0;
    overflow: hidden;
    aspect-ratio: 1; /* Square crop for thumbnails */
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sfg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.sfg-image-link:hover .sfg-image {
    transform: scale(1.05);
}

.sfg-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

/* Lightbox Styles */
.sfg-lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 999999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sfg-lightbox-overlay.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.sfg-lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.sfg-lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.sfg-lightbox-close:hover,
.sfg-lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Animations */
@keyframes sfg-zoom {
    from {transform: scale(0.9)}
    to {transform: scale(1)}
}

.sfg-lightbox-content {
    animation-name: sfg-zoom;
    animation-duration: 0.3s;
}
