.gallery-container {
    margin: 20px 0;
    position: relative;
}

.gallery-preview {
    position: relative;
}

.gallery-view-all {
    text-align: center;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
}

.btn-view-gallery {
    background: #00522c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-view-gallery:hover {
    background: #4d7b19;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-view-gallery:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gallery-full {
    position: relative;
    margin-top: 20px;
}

.gallery-back {
    text-align: center;
    margin: 20px 0;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.btn-back-preview {
    background: #00522c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-back-preview:hover {
    background: #4d7b19;
    transform: translateY(-1px);
}

.galleria a {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.galleria a:hover {
    transform: scale(1.02);
}

.galleria img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.galleria img[loading="lazy"] {
    opacity: 0.8;
}

.galleria img.loaded {
    opacity: 1;
}

@media (max-width: 768px) {
    .btn-view-gallery,
    .btn-back-preview {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
    
    .gallery-view-all,
    .gallery-back {
        margin: 15px 0;
        padding: 10px 0;
    }
}

.gallery-preview,
.gallery-full {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.galleria-full a{
    display: inline-block;
    width: 31.4%;
    margin: 4px 1% 4px 0;
    vertical-align: top;
}

.gallery-preview.hiding,
.gallery-full.hiding {
    opacity: 0;
    transform: translateY(-10px);
}

.gallery-preview.showing,
.gallery-full.showing {
    opacity: 1;
    transform: translateY(0);
}

.gallery-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.gallery-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #00522c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-view-gallery:focus,
.btn-back-preview:focus {
    outline: 2px solid #00522c;
    outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
    .gallery-view-all,
    .gallery-back {
        border-color: #444;
    }
    
    .btn-view-gallery {
        background: #4d7b19;
    }
    
    .btn-view-gallery:hover {
        background: #004a73;
    }
    
    .btn-back-preview {
        background: #495057;
    }
    
    .btn-back-preview:hover {
        background: #343a40;
    }
}

.gallery-moved-notice {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 4px;
    margin: 10px 0;
}

.gallery-moved-notice em {
    color: #00522c;
    font-weight: 500;
} 