@keyframes skeleton-loading {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg,
      #e0e0e0 0%,
      #f0f0f0 20%,
      #e0e0e0 40%,
      #e0e0e0 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}


.skeleton-text {
  height: 1rem;
  margin: 0.5rem 0;
  border-radius: 4px;
}

.skeleton-title {
  height: 1.5rem;
  width: 80%;
  margin: 0.5rem 0;
  border-radius: 4px;
}

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

.skeleton-rect {
  width: 100%;
  height: 200px;
  border-radius: 6px;
}


.news-tile-placeholder .news-item {
  position: relative;
  overflow: hidden;
}

.news-tile-placeholder .news-thumb {
  background: linear-gradient(90deg,
      #e0e0e0 0%,
      #f0f0f0 20%,
      #e0e0e0 40%,
      #e0e0e0 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  min-height: 200px;
  border-radius: 6px 6px 0 0;
}

.news-tile-placeholder h3 {
  background: linear-gradient(90deg,
      #e0e0e0 0%,
      #f0f0f0 20%,
      #e0e0e0 40%,
      #e0e0e0 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  color: transparent;
  height: 1.5rem;
  width: 80%;
  border-radius: 4px;
  margin: 1rem auto 0.5rem auto;
}

.news-tile-placeholder .date {
  background: linear-gradient(90deg,
      #e0e0e0 0%,
      #f0f0f0 20%,
      #e0e0e0 40%,
      #e0e0e0 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  color: transparent;
  height: 1rem;
  width: 60%;
  border-radius: 4px;
  margin: 0.5rem auto;
}


.page-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

.page-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}


.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(39, 39, 87, 0.1);
  border-top-color: var(--teal, #272757);
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.content-loading {
  position: relative;
  min-height: 200px;
  pointer-events: none;
  opacity: 0.6;
}

.content-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(39, 39, 87, 0.1);
  border-top-color: var(--teal, #272757);
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
}


@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fade-in 0.4s ease-out;
}


.fade-in-stagger>* {
  opacity: 0;
  animation: fade-in 0.4s ease-out forwards;
}

.fade-in-stagger>*:nth-child(1) {
  animation-delay: 0.05s;
}

.fade-in-stagger>*:nth-child(2) {
  animation-delay: 0.1s;
}

.fade-in-stagger>*:nth-child(3) {
  animation-delay: 0.15s;
}

.fade-in-stagger>*:nth-child(4) {
  animation-delay: 0.2s;
}

.fade-in-stagger>*:nth-child(5) {
  animation-delay: 0.25s;
}

.fade-in-stagger>*:nth-child(6) {
  animation-delay: 0.3s;
}


@media (prefers-reduced-motion: reduce) {

  .skeleton,
  .news-tile-placeholder .news-thumb,
  .news-tile-placeholder h3,
  .news-tile-placeholder .date,
  .spinner,
  .content-loading::after {
    animation: none;
  }

  .fade-in,
  .fade-in-stagger>* {
    animation: none;
    opacity: 1;
    transform: none;
  }
}