/* ========= Banner Skeleton ========== */
.banner-skeleton {
  background-color: #ddd;
  height: 400px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.skeleton-icon {
  width: 24px;
  height: 24px;
  background-color: #bbb;
  border-radius: 50%;
  margin-right: 10px;
}

.skeleton-text {
  background-color: #ccc;
  border-radius: 6px;
}

.skeleton-text.short {
  width: 180px;
  height: 14px;
}

.skeleton-text.medium {
  width: 60%;
  height: 18px;
  margin-top: 12px;
}

.skeleton-text.large {
  width: 80%;
  height: 32px;
  margin-top: 12px;
}

.skeleton-button {
  width: 150px;
  height: 40px;
  margin-top: 20px;
  background-color: #c2c2c2;
  border-radius: 8px;
}

/* ========= Recent Posts Skeleton ========== */
.recent-posts-loader {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
}

.recent-post-inner.skeleton {
  display: flex;
  gap: 12px;
  padding: 10px 0;
}

.skeleton-img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
}

.recent-post-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

/* ========= Shared Skeleton Animations ========== */
.skeleton-line,
.skeleton-img,
.skeleton-text,
.banner-skeleton {
  background-image: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  background-repeat: no-repeat;
}

.skeleton-line {
  height: 10px;
  width: 100%;
  border-radius: 4px;
}

.skeleton-line.title {
  height: 16px;
  width: 70%;
}

.skeleton-line.date {
  height: 12px;
  width: 40%;
}

/* Coach-specific layout (minimal) */
.coach-skeleton-img {
  width: 100%;
  height: 250px;
  border-radius: 8px;
}

.coach-skeleton-title {
  width: 70%;
  height: 18px;
  margin: 10px auto 5px;
}

.coach-skeleton-subtitle {
  width: 50%;
  height: 14px;
  margin: 5px auto;
}

.skeleton-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skeleton-tag {
  width: 100px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    #e0e0e0 25%,
    #f5f5f5 50%,
    #e0e0e0 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.category-skeleton {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.skeleton-img {
  width: 16px;
  height: 16px;
  background-color: #ddd;
  border-radius: 50%;
  animation: pulse 0.1s infinite ease-in-out;
}

.skeleton-text {
  width: 100px;
  height: 12px;
  background-color: #ddd;
  border-radius: 4px;
  animation: pulse 0.1s infinite ease-in-out;
}


.coach-skeleton {
  position: relative;
  overflow: hidden;
  background-color: #e0e0e0;
}

.coach-skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150px;
  height: 100%;
  width: 150px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: coach-skeleton-loading 1.2s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    background-color: #e0e0e0;
  }
  50% {
    background-color: #f5f5f5;
  }
  100% {
    background-color: #e0e0e0;
  }
}

/* Skeleton Base */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #e2e2e2; /* fallback color */
  border-radius: 12px;
  min-height: 250px; /* adjust for your shop-box height */
}

/* Shimmer animation */
.skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150px;
  height: 100%;
  width: 150px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -150px;
  }
  100% {
    left: 100%;
  }
}

/* ========= Keyframes ========== */
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes coach-skeleton-loading {
  0% {
    left: -150px;
  }
  100% {
    left: 100%;
  }
}
