/* ==========================================================================
   General-purpose skeleton loader
   Use `.skeleton` on any block-level element for a shimmering placeholder,
   or the helper shapes below (.skeleton-text, .skeleton-title, .skeleton-img,
   .skeleton-circle, .skeleton-card) for common content shapes.
   ========================================================================== */

.skeleton {
  position: relative;
  overflow: hidden;
  background-color: #e9edf1;
  border-radius: 6px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after {
    animation: none;
  }
}

.skeleton-text {
  height: 14px;
  width: 100%;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-text:last-child {
  margin-bottom: 0;
  width: 70%;
}

.skeleton-title {
  height: 22px;
  width: 50%;
  margin-bottom: 16px;
  border-radius: 4px;
}

.skeleton-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-img {
  width: 100%;
  height: 100%;
  display: block;
}

.skeleton-card {
  padding: 16px;
  border-radius: 10px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* Wraps an <img> so it can show a skeleton until the real image has loaded. */
.skeleton-img-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: #e9edf1;
}

.skeleton-img-wrap img {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.skeleton-img-wrap .skeleton {
  position: absolute;
  inset: 0;
  border-radius: 0;
  transition: opacity 0.35s ease;
}

.skeleton-img-wrap.is-loaded img {
  opacity: 1;
}

.skeleton-img-wrap.is-loaded .skeleton {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   Full-page skeleton loader shown while the initial page content loads.
   ========================================================================== */

.page-skeleton {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: #fff;
  overflow: hidden;
  transition: opacity 0.4s ease;
}

.page-skeleton.is-hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

/* Used when re-showing the skeleton for an outgoing navigation: appear at
   full opacity immediately instead of fading in. */
.page-skeleton.is-instant {
  transition: none;
}

.page-skeleton__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
  height: 100%;
  overflow: hidden;
}

.page-skeleton__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-skeleton__logo {
  width: 140px;
  height: 40px;
}

.page-skeleton__nav {
  display: flex;
  gap: 18px;
}

.page-skeleton__nav span {
  width: 70px;
  height: 14px;
}

.page-skeleton__hero {
  width: 100%;
  height: 360px;
  margin-bottom: 32px;
  border-radius: 12px;
}

.page-skeleton__row {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.page-skeleton__row > * {
  flex: 1;
  height: 130px;
  border-radius: 10px;
}

@media (max-width: 767px) {
  .page-skeleton__nav {
    display: none;
  }

  .page-skeleton__hero {
    height: 220px;
  }

  .page-skeleton__row {
    flex-direction: column;
  }

  .page-skeleton__row > * {
    height: 100px;
  }
}
