/* ============================================================
   PLACEHOLDERS.CSS — سنتر الأستاذ
   Skeleton loaders + broken image fallbacks
   ============================================================ */

/* ---- Broken image fallback ---- */
img {
  background: var(--clr-bg-alt);
  position: relative;
}

img::after {
  content: attr(alt);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-bg-alt);
  color: var(--clr-text-light);
  font-size: var(--font-size-sm);
  font-family: var(--font-primary);
  text-align: center;
  padding: var(--space-4);
}

/* ---- Skeleton shimmer ---- */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--clr-bg-alt) 25%,
    var(--clr-border-light) 50%,
    var(--clr-bg-alt) 75%
  );
  background-size: 600px 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-md);
}

/* ---- Teacher card placeholder image ---- */
.teacher-card__img:not(:has(img[src])),
.teacher-card__img img[src=''],
.teacher-card__img img[src='images/placeholder-teacher.jpg'] {
  background: linear-gradient(135deg, var(--clr-bg-alt) 0%, var(--clr-border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Student card placeholder ---- */
.student-card__img-wrap img[src='images/placeholder-student.jpg'],
.student-card__img-wrap img[src=''] {
  background: linear-gradient(135deg, var(--clr-bg-alt) 0%, var(--clr-border) 100%);
}

/* ---- Gallery placeholder ---- */
.gallery-item img[src='images/placeholder-gallery.jpg'],
.gallery-item img[src=''] {
  background: linear-gradient(135deg, #04785722 0%, #04785711 100%);
}
