@use "../abstracts" as vars;

/* ===========================
   Blog Section
   =========================== */

.blog-section {
  padding: vars.rem(120) 0;
  background-color: #ffffff;
}

.section-top {
  text-align: center;
  margin-bottom: vars.rem(50);

  @media (max-width: 991.98px) {
    margin-bottom: vars.rem(30);
  }

  &__subtitle {
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0;
    text-transform: uppercase;
    color: vars.$footer-accent; // #0073E6
    margin-bottom: vars.rem(10);
    display: block;

    @media (max-width: 991.98px) {
      font-size: 14px;
      margin-bottom: 5px;
    }

    .text {
      color: vars.$color-text2;
    }

    &.dark {
      span {
        color: vars.$color-heading;
      }
    }
  }

  &__title {
    font-family: "DM Sans", sans-serif;
    font-weight: 700;
    font-size: 45px;
    line-height: 130%;
    letter-spacing: -2%;
    color: vars.$color-heading;
    margin-bottom: 0;

    @media (max-width: 1399px) {
      font-size: 35px;
    }

    @media (max-width: 992px) {
      font-size: 32px;

      br {
        display: none;
      }
    }
  }

  &__description {
    font-family: vars.$font-family-base;
    font-weight: 500;
    font-size: clamp(14px, 0.5vw + 0.75rem, 16px);
    line-height: 28px;
    letter-spacing: 0%;
    color: vars.$color-text2;
  }
}

.blog-card {
  margin-bottom: vars.rem(30);

  &__image-box {
    position: relative;
    border-radius: vars.rem(10);
    overflow: hidden;
    margin-bottom: vars.rem(25);
  }

  &__image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
  }

  &:hover &__image {
    transform: scale(1.1);
  }

  &__date {
    position: absolute;
    top: vars.rem(20);
    left: vars.rem(20);
    width: vars.rem(65);
    height: vars.rem(90);
    background-color: #ffffff;
    border-radius: 50%; // User specified border-radius: 50% for 65x90
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;

    span {
      display: block;
      color: vars.$footer-accent;
      line-height: vars.rem(22);
      letter-spacing: -0.02em;
      text-align: center;
    }

    &-day {
      font-family: "DM Sans", sans-serif;
      font-weight: 700;
      font-size: clamp(18px, 2vw + 0.5rem, 24px);
    }

    &-month {
      font-family: "DM Sans", sans-serif;
      font-weight: 600;
      font-size: clamp(14px, 0.5vw + 0.75rem, 16px);
    }
  }

  &__content {
    padding: 0;
  }

  &__meta {
    display: flex;
    align-items: center;
    gap: vars.rem(8);
    margin-bottom: vars.rem(15);
  }

  &__author {
    font-family: "DM Sans", sans-serif;
    font-weight: 500;
    font-size: clamp(14px, 0.5vw + 0.75rem, 16px);
    line-height: vars.rem(26);
    color: #555555;
    display: flex;
    align-items: center;
    gap: vars.rem(8);

    i {
      color: vars.$footer-accent;
    }
  }

  &__title {
    font-family: "DM Sans", sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 2vw + 1rem, 26px);
    line-height: vars.rem(36);
    letter-spacing: -0.01em;
    color: vars.$color-heading;
    text-transform: capitalize;
    margin-bottom: vars.rem(20);

    a {
      color: inherit;
      text-decoration: none;
      transition: color 0.3s ease;

      &:hover {
        color: vars.$footer-accent;
      }
    }
  }

  &__link {
    font-family: "DM Sans", sans-serif;
    font-weight: 700;
    font-size: clamp(14px, 0.5vw + 0.75rem, 16px);
    line-height: vars.rem(26);
    color: vars.$color-heading;
    text-decoration: none;
    text-transform: capitalize;
    display: flex;
    align-items: center;
    gap: vars.rem(10);
    transition: color 0.3s ease;

    i {
      font-size: clamp(12px, 0.5vw + 0.75rem, 14px);
      transition: transform 0.3s ease;
    }

    &:hover {
      color: vars.$footer-accent;

      i {
        transform: translateX(5px);
      }
    }
  }
}

// Responsive (Spacing only, font-size handled by clamp)
@media (max-width: 991.98px) {
  .blog-section {
    padding: vars.rem(80) 0;
  }
}

@media (max-width: 767.98px) {
  .blog-section {
    padding: vars.rem(60) 0;
  }
}