/* mod_hfwsocialwall - HFW Villach Social Wall (keine externen Ressourcen) */
.hfwsw {
  --hfwsw-red: #c00d0e;
  --hfwsw-red-hover: #a30b0c;
  --hfwsw-dark: #1f272c;
  --hfwsw-text: #2b3338;
  --hfwsw-muted: #6b7378;
  --hfwsw-surface: #f5f6f7;
  --hfwsw-border: #eceff1;
  --hfwsw-radius: 10px;
  --hfwsw-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  --hfwsw-shadow-hover: 0 10px 24px rgba(0, 0, 0, .13);
  --hfwsw-gap: 22px;
  color: var(--hfwsw-text);
  margin: 0 0 30px;
}

.hfwsw *,
.hfwsw *::before,
.hfwsw *::after { box-sizing: border-box; }

/* Masonry-artige Wand: CSS-Spalten */
.hfwsw--wall .hfwsw-list {
  column-width: 290px;
  column-count: 4;
  column-gap: var(--hfwsw-gap);
}

.hfwsw--wall .hfwsw-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 var(--hfwsw-gap);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

/* Raster: gleich breite Karten in Leserichtung */
.hfwsw--grid .hfwsw-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--hfwsw-gap);
  align-items: start;
}

.hfwsw--grid .hfwsw-media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hfwsw-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--hfwsw-border);
  border-radius: var(--hfwsw-radius);
  box-shadow: var(--hfwsw-shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.hfwsw-card:hover,
.hfwsw-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--hfwsw-shadow-hover);
}

.hfwsw-media {
  position: relative;
  display: block;
  background: var(--hfwsw-surface);
  border-radius: var(--hfwsw-radius) var(--hfwsw-radius) 0 0;
  overflow: hidden;
}

.hfwsw-media img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  transition: transform .35s ease;
}

.hfwsw-card:hover .hfwsw-media img { transform: scale(1.03); }

.hfwsw-media--video::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 50%;
  background: rgba(31, 39, 44, .72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 7v10l8-5z'/%3E%3C/svg%3E") center / 30px no-repeat;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.hfwsw-body { padding: 16px 18px 16px; }

.hfwsw-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--hfwsw-muted);
}

.hfwsw-src {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--hfwsw-dark);
}

.hfwsw-src svg { flex: 0 0 auto; display: block; }

.hfwsw-meta time { white-space: nowrap; font-variant-numeric: tabular-nums; }

.hfwsw-text {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: normal;
  color: var(--hfwsw-text);
}

.hfwsw-text a { color: var(--hfwsw-red); text-decoration: underline; text-underline-offset: 2px; }
.hfwsw-text a:hover { color: var(--hfwsw-red-hover); }

.hfwsw-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--hfwsw-border);
}

.hfwsw-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--hfwsw-red);
  text-decoration: none;
}

.hfwsw-more::after { content: " \2192"; }
.hfwsw-more:hover,
.hfwsw-more:focus { color: var(--hfwsw-red-hover); text-decoration: underline; }

.hfwsw-stats {
  display: inline-flex;
  gap: 12px;
  font-size: 13px;
  color: var(--hfwsw-muted);
}

.hfwsw-stats span { display: inline-flex; align-items: center; gap: 4px; }
.hfwsw-stats svg { display: block; }

.hfwsw-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.hfwsw-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 22px 10px 12px;
  border-radius: 999px;
  background: var(--hfwsw-red);
  color: #fff !important;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none !important;
  box-shadow: var(--hfwsw-shadow);
  transition: background-color .2s ease, transform .2s ease;
}

.hfwsw-btn:hover,
.hfwsw-btn:focus { background: var(--hfwsw-red-hover); transform: translateY(-2px); }
.hfwsw-btn svg { display: block; border-radius: 50%; }
.hfwsw-btn--instagram svg { border-radius: 6px; }

.hfwsw-empty,
.hfwsw-admin {
  padding: 14px 18px;
  border-radius: var(--hfwsw-radius);
  background: var(--hfwsw-surface);
  border: 1px solid var(--hfwsw-border);
  color: var(--hfwsw-muted);
}

.hfwsw-admin {
  margin-bottom: 18px;
  border-left: 4px solid var(--hfwsw-red);
  color: var(--hfwsw-text);
  font-size: 14px;
}

.hfwsw .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

@media (max-width: 640px) {
  .hfwsw { --hfwsw-gap: 16px; }
  .hfwsw--wall .hfwsw-list { column-count: 1; }
  .hfwsw-body { padding: 14px 15px; }
  .hfwsw-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hfwsw-card, .hfwsw-media img, .hfwsw-btn { transition: none; }
  .hfwsw-card:hover, .hfwsw-card:focus-within { transform: none; }
}
