

.galeriecontainer {
    margin: auto;
    max-width: 1320px;
    padding: 120px 20px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: transparent;
    color: #333;
}
.gallery-single-grid {
    column-count: 4;
    column-gap: 15px;
}
.gallery-item {
    margin-bottom: 15px;
    display: inline-block;
    width: 100%;
}
.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-item img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
@media (max-width: 992px) { .gallery-single-grid { column-count: 3; } }
@media (max-width: 768px) { .gallery-single-grid { column-count: 2; } }
@media (max-width: 480px) { .gallery-single-grid { column-count: 1; } }

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 10px;
    box-sizing: border-box;
}
.modal-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: calc(100% - 60px);
}
.modal-content img {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    background: transparent;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
#pictura-embed-modal-caption {
    color: white;
    margin-top: 15px;
    font-size: 1.1em;
    height: 45px;
    text-align: center;
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
}
.modal-prev, .modal-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 2.5em;
    transition: 0.3s ease;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
}
.modal-prev { left: 10px; }
.modal-next { right: 10px; }
.modal-prev:hover, .modal-next:hover { background-color: rgba(0,0,0,0.6); }

.gallery-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.overview-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}
.overview-item:hover { transform: translateY(-5px); }
.overview-item-image-wrapper {
    height: 180px;
    background-color: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.overview-item img { width: 100%; height: 100%; object-fit: cover; }
.overview-item .no-preview { color: #95a5a6; font-style: italic; }
.overview-item h3 { margin: 0; padding: 15px; font-size: 1.1em; color: #333; }

.back-to-overview-btn {
    display: block;
    margin-bottom: 20px;
    padding: 10px 15px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
}
.back-to-overview-btn:hover {
    background-color: #e0e0e0;
}

.modal-content {
    background-color: rgba(0,0,0,0);
}