/* ==========================================================
   socialfeed-Modul — Feed-Wand (Theme-konform via CSS-Variablen)
   ========================================================== */

.socialfeed {
  padding: 2.5rem 0 3rem;
}
.socialfeed.is-compact {
  padding: 1.5rem 0;
}

/* ----- "Folge uns"-Kopf -------------------------------------------------- */
.socialfeed__follow {
  text-align: center;
  margin-bottom: 1.75rem;
}
.socialfeed__follow-heading {
  margin: 0 0 1rem;
  color: var(--color-primary, #0a6ebd);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}
.socialfeed__profiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .65rem;
}
.socialfeed__profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  text-decoration: none;
  background: var(--sf-platform-color, #64748b);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.socialfeed__profile-link:hover,
.socialfeed__profile-link:focus-visible {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  filter: brightness(1.08);
}
.socialfeed__profile-icon {
  /* Emoji-Icons monochrom-weiß wirken lassen, ohne Glyphe zu verlieren */
  display: inline-block;
}

/* ----- Kachel-Wand (Grid) ------------------------------------------------ */
.socialfeed__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .6rem;
  grid-template-columns: repeat(var(--socialfeed-cols, 4), 1fr);
}
@media (max-width: 900px) {
  .socialfeed__grid { grid-template-columns: repeat(min(var(--socialfeed-cols, 4), 3), 1fr); }
}
@media (max-width: 600px) {
  .socialfeed__grid { grid-template-columns: repeat(2, 1fr); gap: .4rem; }
}
@media (max-width: 360px) {
  .socialfeed__grid { grid-template-columns: 1fr; }
}

.socialfeed__item {
  margin: 0;
  padding: 0;
}

.socialfeed__tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: .5rem;
  background: color-mix(in srgb, var(--color-text, #1f2937) 8%, transparent);
  text-decoration: none;
  color: inherit;
}
a.socialfeed__tile { cursor: pointer; }

.socialfeed__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
a.socialfeed__tile:hover .socialfeed__img,
a.socialfeed__tile:focus-visible .socialfeed__img {
  transform: scale(1.06);
}

/* Platzhalter (kein Bild): farbiger Hintergrund + großes Plattform-Icon */
.socialfeed__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 25%,
      color-mix(in srgb, var(--sf-platform-color, #64748b) 75%, #fff) 0%,
      var(--sf-platform-color, #64748b) 70%);
}
.socialfeed__placeholder-icon {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1;
  opacity: .92;
}

/* Plattform-Badge oben rechts (immer sichtbar) */
.socialfeed__badge {
  position: absolute;
  top: .5rem;
  right: .5rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sf-platform-color, #64748b);
  color: #fff;
  font-size: .85rem;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

/* Hover-Overlay mit Plattform + gekürzter Caption */
.socialfeed__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .25rem;
  padding: .7rem .75rem;
  background: linear-gradient(to top, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .25) 55%, rgba(0, 0, 0, 0) 100%);
  color: #fff;
  opacity: 0;
  transition: opacity .25s ease;
}
.socialfeed__tile:hover .socialfeed__overlay,
.socialfeed__tile:focus-visible .socialfeed__overlay,
.socialfeed__tile:focus-within .socialfeed__overlay {
  opacity: 1;
}
/* Bei reinem Platzhalter (kein Bild) Overlay dezent dauerhaft zeigen */
.socialfeed__placeholder + .socialfeed__badge + .socialfeed__overlay {
  opacity: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 70%);
}
.socialfeed__overlay-platform {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.socialfeed__overlay-caption {
  font-size: .82rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.socialfeed__overlay-date {
  font-size: .72rem;
  opacity: .85;
}

/* Compact-Variante (Hook-Platzierung): dichteres Raster, kein Caption-Text */
.socialfeed.is-compact .socialfeed__overlay-caption { display: none; }
.socialfeed.is-compact .socialfeed__grid { gap: .4rem; }

/* Leerer Zustand */
.socialfeed--empty {
  padding: 1.5rem 0;
  text-align: center;
}
.socialfeed__empty {
  color: var(--color-text, #1f2937);
  opacity: .6;
  font-size: .95rem;
}
