/* Contenitore principale */
#gallery-app {
    font-family: sans-serif;
    margin-top: 1rem;
}

/* Breadcrumbs */
.gallery-breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #666;
}
.gallery-breadcrumbs span {
    cursor: pointer;
    color: var(--text-color);
    text-decoration: underline;
}
.gallery-breadcrumbs span:hover {
    text-decoration: none;
}
.gallery-breadcrumbs .separator {
    margin: 0 0.5rem;
    color: #999;
    text-decoration: none;
    cursor: default;
}
.gallery-breadcrumbs .current {
    color: var(--text-color);
    text-decoration: none;
    cursor: default;
    font-weight: bold;
}

/* Griglia Cartelle */
.gallery-folders {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.folder-item {
    background: #e6e6e6;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
}
.folder-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background: #fff;
}
.folder-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #ffc107; /* Colore cartella */
}
.folder-name {
    font-weight: 600;
    /* color:var(--text-color); */
    color:var(--primary-color);
    word-break: break-word;
    line-height: 1.2;
}

/* Griglia Immagini */
.gallery-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.gallery-images a {
    flex: 1 1 200px;
    max-width: 300px;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    background-color: #eee;
    display: block;
}
.gallery-images a:hover {
    transform: scale(1.02);
    z-index: 1;
}
.gallery-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Messaggio vuoto */
.empty-message {
    text-align: center;
    color: #777;
    font-style: italic;
    margin: 2rem 0;
}

/* Debug Error Box */
.debug-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: .75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}

/* Utility per nascondere elementi (sostituisce style="display: none") */
.hidden {
    display: none;
}
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.gallery-breadcrumbs {
    flex: 1;
    min-width: 200px;
}

/* Paginazione */
.gallery-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 2rem;
    text-align: center;
}
.page-btn{
    padding: 0.4rem;
}
