/* =========================================================
   GridCards – Basis
   ========================================================= */

.gc-grid {
  /* Layout-Variablen */
  --gc-min: 18rem;          /* Mindestbreite einer Karte */
  --gc-gap: 1.5rem;
  --gc-max-width: 1400px;

  display: grid;
  gap: var(--gc-gap);

  /* Kern: responsives Grid */
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(100%, var(--gc-min)), 1fr)
  );

  max-width: var(--gc-max-width);
  margin-inline: auto;
  padding: 1rem;

  /* Container Queries aktivieren */
  container-type: inline-size;
}


/* =========================================================
   Card-Modus
   ========================================================= */

.gc-cards {
  /* aktuell keine zusätzlichen Regeln nötig */
}

.gc-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: .5rem;

  padding: 1.25rem;

  box-shadow: 0 1px 3px rgba(0,0,0,.08);

  position: relative;
  top: 0;

  transition: top .2s ease, box-shadow .2s ease;
}

/* leichter Hover-Effekt */
.gc-card:hover {
  top: -4px;
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
}

/* Titel */
.gc-card-title {
  margin: 0 0 .75rem;
  font-size: 1.2rem;
  font-weight: 600;

  padding-left: .75rem;
  border-left: 4px solid var(--clr-primary, #444);
}

/* Inhalt */
.gc-card-content {
  display: flow-root; /* wichtig für Float-Bilder */
}

/* Bilder innerhalb Cards */
.gc-card img {
  display: block;
  max-width: 100%;
  height: auto;

  margin-inline: auto;

  border: none;
  box-shadow: none;
  border-radius: .35rem;
}


/* =========================================================
   Float-Bilder (optional, aber sinnvoller Default)
   ========================================================= */

.gc-card img.leftcontentimage,
.gc-card span.leftcontentimage {
  float: left;
  margin: .35em .9em .75em 0;

  max-width: min(45%, 14rem);
}

.gc-card img.rightcontentimage,
.gc-card span.rightcontentimage {
  float: right;
  margin: .35em 0 .75em .9em;

  max-width: min(45%, 14rem);
}

/* Container Query: kleine Karten → kein Float */
@container (max-width: 520px) {
  .gc-card img.leftcontentimage,
  .gc-card span.leftcontentimage,
  .gc-card img.rightcontentimage,
  .gc-card span.rightcontentimage {
    float: none;
    display: block;
    max-width: 100%;
    margin: 0 0 1rem 0;
  }
}

/* =========================================================
   Card-Modifier
   ========================================================= */

/* === Layout === */

.gc-cards.gc-layout-narrow { --gc-max-width: 960px; }
.gc-cards.gc-layout-wide { --gc-max-width: 1600px; }

.gc-cards.gc-layout-tight { --gc-gap: .75rem; }
.gc-cards.gc-layout-loose { --gc-gap: 2rem; }

.gc-cards.gc-layout-small { --gc-min: 14rem; }
.gc-cards.gc-layout-large { --gc-min: 24rem; }


/* === Frame === */

.gc-cards.gc-frame-flat .gc-card {
  box-shadow: none;
}

.gc-cards.gc-frame-borderless .gc-card {
  border: 0;
}

.gc-cards.gc-frame-shadow .gc-card {
  box-shadow: 0 4px 14px rgba(0,0,0,.14);
}

.gc-cards.gc-frame-rounded .gc-card {
  border-radius: 1rem;
}


/* === Theme === */

.gc-cards.gc-theme-muted .gc-card {
  background: #f7f7f7;
}

.gc-cards.gc-theme-dark .gc-card {
  background: #1f2937;
  color: #f3f4f6;
  border-color: rgba(255,255,255,.15);
}

.gc-cards.gc-theme-dark .gc-card-title {
  border-left-color: currentColor;
}


/* === Content === */

.gc-cards.gc-content-compact .gc-card {
  padding: .875rem;
}

.gc-cards.gc-content-spacious .gc-card {
  padding: 1.75rem;
}

.gc-cards.gc-content-center .gc-card {
  text-align: center;
}

.gc-cards.gc-content-center .gc-card-title {
  border-left: 0;
  padding-left: 0;
}

.gc-cards.gc-content-no-hover .gc-card:hover {
  top: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* =========================================================
   Raster-Modus
   ========================================================= */

.gc-raster {
  /* kleinere Mindestbreite für Kacheln */
  --gc-min: 8rem;
}

.gc-cell {
  display: grid;
  place-items: center;

  min-height: 5rem;

  padding: .75rem;

  background: #f5f5f0;
  border-radius: .35rem;

  box-sizing: border-box;
}

/* Inhalte sollen Fläche ausfüllen */
.gc-cell > a,
.gc-cell > button {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Bilder / SVGs sauber skalieren */
.gc-cell img,
.gc-cell svg {
  display: block;

  max-width: 100%;
  max-height: 100%;

  width: auto;
  height: auto;

  object-fit: contain;
}

/* =========================================================
   Raster-Modifier
   ========================================================= */

/* === Layout === */

.gc-raster.gc-layout-narrow { --gc-max-width: 960px; }
.gc-raster.gc-layout-wide { --gc-max-width: 1600px; }

.gc-raster.gc-layout-tight { --gc-gap: .5rem; }
.gc-raster.gc-layout-loose { --gc-gap: 2rem; }

.gc-raster.gc-layout-small { --gc-min: 6rem; }
.gc-raster.gc-layout-large { --gc-min: 12rem; }


/* === Frame === */

.gc-raster.gc-frame-flat .gc-cell {
  background: transparent;
}

.gc-raster.gc-frame-borderless .gc-cell {
  border: 0;
}

.gc-raster.gc-frame-shadow .gc-cell {
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.gc-raster.gc-frame-rounded .gc-cell {
  border-radius: 1rem;
  overflow: hidden;
}


/* === Theme === */

.gc-raster.gc-theme-muted .gc-cell {
  background: #f7f7f7;
}

.gc-raster.gc-theme-dark {
  color: #f3f4f6;
}

.gc-raster.gc-theme-dark .gc-cell {
  background: #1f2937;
  border-color: rgba(255,255,255,.15);
}


/* === Content === */

.gc-raster.gc-content-compact .gc-cell {
  min-height: 4rem;
  padding: .5rem;
}

.gc-raster.gc-content-spacious .gc-cell {
  min-height: 7rem;
  padding: 1rem;
}

.gc-raster.gc-content-center .gc-cell {
  text-align: center;
}

/* =========================================================
   Mobile Feinschliff (optional minimal)
   ========================================================= */

@media (max-width: 480px) {
  .gc-grid {
    padding: .75rem;
    --gc-gap: 1rem;
  }
}