/* ==================================================
   Global Layout
   schwimm einfach Theme
================================================== */

/*
 * Mittlere Inhaltsbreite
 *
 * Für Bereiche, die schmaler als der normale
 * Container dargestellt werden sollen.
 */
.content {
  width: min(100%, var(--content-width));
  margin-inline: auto;
}

/*
 * Lesefreundliche Textbreite
 *
 * Für längere Fließtexte, Einleitungen
 * und redaktionelle Inhalte.
 */
.text-content {
  width: min(100%, var(--text-width));
  margin-inline: auto;
}

/* ==================================================
   Grid
================================================== */

.grid {
  display: grid;
  gap: var(--space-32);
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/*
 * Automatisches responsives Grid
 *
 * Erstellt abhängig vom verfügbaren Platz
 * so viele Spalten wie möglich.
 */
.grid-auto {
  grid-template-columns:
    repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

/* ==================================================
   Responsive
================================================== */

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}