/* ============================================================
   BILDPLATZHALTER-SYSTEM
   Grauer Farbverlauf für alle Bild-Platzhalter
   ============================================================ */

/* --- BASE PLACEHOLDER --- */
.img-placeholder {
  position: relative;
  width: 100%;
  background: var(--gradient-platzhalter);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(255, 255, 255, 0.02) 10px,
      rgba(255, 255, 255, 0.02) 20px
    );
  pointer-events: none;
}

/* --- ASPECT RATIOS --- */

/* Hero Images (16:9) */
.img-placeholder--hero {
  aspect-ratio: 16 / 9;
}

/* Square (1:1) */
.img-placeholder--square {
  aspect-ratio: 1 / 1;
}

/* Teaser Kacheln (4:3) */
.img-placeholder--card {
  aspect-ratio: 4 / 3;
}

/* Portrait (3:4) */
.img-placeholder--portrait {
  aspect-ratio: 3 / 4;
}

/* Wide Banner (21:9) */
.img-placeholder--banner {
  aspect-ratio: 21 / 9;
}

/* --- PLATZHALTER-VARIANTEN --- */

/* Heller Platzhalter */
.img-placeholder--light {
  background: var(--gradient-platzhalter-hell);
}

/* Mit subtiler Animation */
.img-placeholder--animated::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* --- HOVER EFFEKTE --- */

/* Aufhellen bei Hover (für interaktive Kacheln) */
.img-placeholder--hover:hover {
  background: linear-gradient(135deg, #d1d5db 0%, #b0b5bd 50%, #8b919d 100%);
  transition: all var(--transition-base);
}

/* Skalierung bei Hover */
.img-placeholder--scale {
  transition: transform var(--transition-base);
}

.img-placeholder--scale:hover {
  transform: scale(1.02);
}

/* --- BORDER RADIUS --- */
.img-placeholder--rounded {
  border-radius: var(--radius-md);
}

.img-placeholder--rounded-lg {
  border-radius: var(--radius-xl);
}

.img-placeholder--rounded-full {
  border-radius: var(--radius-full);
}

/* --- ICON PLATZHALTER --- */
.icon-placeholder {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--gradient-platzhalter);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-placeholder--sm {
  width: 48px;
  height: 48px;
}

.icon-placeholder--lg {
  width: 96px;
  height: 96px;
}

/* --- RESPONSIVE PLATZHALTER --- */

/* Mobile: Höhere Platzhalter */
@media (max-width: 767px) {
  .img-placeholder--hero {
    aspect-ratio: 4 / 3;
  }
}

/* Desktop: Breitere Platzhalter */
@media (min-width: 768px) {
  .img-placeholder--banner {
    aspect-ratio: 24 / 9;
  }
}

/* --- LOADING STATE --- */
.img-placeholder--loading {
  position: relative;
  overflow: hidden;
}

.img-placeholder--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* --- ACCESSIBILITY --- */

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .img-placeholder--animated::before,
  .img-placeholder--loading::after {
    animation: none;
  }
}
