@use "../../../../styles/abstracts/variables";
@use "../../../../styles/abstracts/mixins";

.blog {
  @include mixins.pageBase;

  img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-top-right-radius: 6px;
    border-top-left-radius: 6px;
    margin-bottom: 1rem;
    display: block;
  }

  h1 {
    font-size: 1.5rem;
    font-weight: 800;
    padding-top: 1rem;
  }

  &__details {
    padding-top: 2rem;
    position: relative;

    span {
      position: absolute;
      background: variables.$col-orange;
      z-index: 100;
      top: 3rem;
      left: 1rem;
      border-radius: 6px;
      padding: .2rem .6rem;
      font-size: .8rem;
      font-weight: 500;
      color: #000;
    }

    &__header {
      margin-top: 1.3rem;
      margin-bottom: 2rem;
      background: linear-gradient(
        to right,
        rgba(20, 19, 22, 0.9),
        rgba(49, 42, 20, 0.9)
      ),
      url("/assets/images/waves.svg");
      background-position: center;
      background-repeat: no-repeat;
      background-size: cover;
      border-radius: 10px;
      text-align: center;
      padding: 2rem 4rem;
      color: #fff;
      font-size: 1.5rem;
      font-weight: 800;
      text-transform: capitalize;

      @media only screen and (max-width: 1000px) {
        padding: 4rem 2rem;
        font-size: 1.2rem;
      }
    }

    &__meta {
      p {
        color: variables.$col-orange !important;
        font-weight: 500 !important;
        opacity: 1 !important;
      }
    }

    p {
      font-size: 0.82rem;
      color: variables.$col-white;
      line-height: 2.4;
      font-weight: 400 !important;
      opacity: 0.85;
    }
  }
}

/* Skeleton styles */
@keyframes pulse {
  0% {
    background-color: #2a2a2a;
  }
  50% {
    background-color: #3b3b3b;
  }
  100% {
    background-color: #2a2a2a;
  }
}

.skeleton-back {
  width: 80px;
  height: 24px;
  background: #2a2a2a;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  animation: pulse 1.5s infinite ease-in-out;
}

/* NEW — matches the category <span> */
.skeleton-category {
  width: 120px;
  height: 20px;
  background: #2a2a2a;
  border-radius: 6px;
  margin-bottom: 1rem;
  animation: pulse 1.5s infinite ease-in-out;
}

/* NEW — matches the image size */
.skeleton-image {
  width: 100%;
  height: 200px;
  background: #2a2a2a;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  margin-bottom: 1rem;
  animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-title {
  width: 100%;
  height: 150px;
  border-radius: 10px;
  background: #2a2a2a;
  animation: pulse 1.5s infinite ease-in-out;
  margin-bottom: 2rem;
}

.skeleton-meta {
  width: 60%;
  height: 16px;
  background: #2a2a2a;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-paragraph {
  width: 100%;
  line-height: 2;
  height: 14px;
  background: #2a2a2a;
  border-radius: 4px;
  margin-bottom: 1rem;
  animation: pulse 1.5s infinite ease-in-out;
}
