/* === Grid-Ansicht: mobile first === */
.sdg-gallery {
    display: grid;
    gap: 1.5rem;
    margin: 1rem 0;
    grid-template-columns: 1fr; /* Handy: 1 Spalte */
}

/* Tablet: 2 Spalten */
@media (min-width: 768px) {
    .sdg-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: maximal 4 Spalten */
@media (min-width: 1024px) {
    .sdg-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

.sdg-item {
    border: 1px solid #eee;
    padding: 0.75rem;
    background: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.sdg-thumb-wrap {
    flex: 1 1 auto;
}

.sdg-thumb-wrap img.sdg-thumb {
    width: 100%;
    height: auto;
    display: block;
}

.sdg-meta {
    margin-top: 0.75rem;
}

.sdg-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.sdg-download-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #fc7500;
    background: #fc7500;
    color: #fff;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sdg-download-button:hover {
    background: #d96200;
    border-color: #d96200;
    color: #fff;
}

@media (max-width: 600px) {
    .sdg-download-button {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
}

/* === Row-Ansicht: exakt 4/2x2/4 === */

.sdg-row {
    display: grid;
    gap: 1.5rem;
    margin: 1rem 0;
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: 1fr; /* Handy: 1 pro Zeile */
}

.sdg-row-cell {
    width: 100%;
    box-sizing: border-box;
}

/* Tablet: 2 Spalten -> automatisch 2 Zeilen bei 4 Items */
@media (min-width: 768px) {
    .sdg-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 4 Spalten -> 1 Zeile bei 4 Items */
@media (min-width: 1024px) {
    .sdg-row {
        grid-template-columns: repeat(4, 1fr);
    }
}
