/* Posts Page Styles */

body {
  min-height: 100vh;
}

#posts-section-container {
  font-family: "Poppins", sans-serif;
  font-size: 1.6rem;
  line-height: 1.7;
  color: rgb(51, 51, 51);
  max-width: 1200px;
  padding: 4rem 1.5rem 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

h1 {
  font-family: "Montserrat", sans-serif;
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin: 2.5rem 0 1rem;
  color: rgb(61, 61, 61);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  border: none;
  font-size: 1.3rem;
  line-height: 1.4;

  & > * {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: baseline;
  }

  input,
  select {
    font: inherit;
    background-color: transparent;
    padding: 0 0.5rem;
    border: 1px solid var(--imp-color);
    border-radius: 4px;
    color: inherit;
    outline: none;

    &[type="number"] {
      width: 4rem;
    }

    option {
      font: inherit;
    }

    &:focus,
    &:active,
    &:focus-visible {
      outline: none;
    }
  }

  .page-btns .btn {
    width: 4rem;
    height: 3rem;
    padding: 0.5rem;
    font-size: 1.3rem;
    border-radius: 1.5rem;
  }
}

/* Posts Section */
#posts-section {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Post Cards */
.card {
  width: 100%;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  gap: 2rem;
  padding: 1.5rem;

  &:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  }

  figure {
    grid-area: 2/1/4/2;

    img {
      width: 100%;
      height: auto;
      border-top-left-radius: 8px;
      border-bottom-left-radius: 8px;
      transition: transform 0.5s ease;
    }
  }

  .meta-strip {
    grid-area: 1/2/2/3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    font-size: 1.3rem;
    line-height: 1.3;
    padding: 3px 5px;
    font-family: 'DM Sans', sans-serif;

    .category {
      background-color: var(--imp-color);
      color: white;
      padding: 0.4rem 1rem;
      border-radius: 4px;
      font-weight: 600;
      font-size: 1.2rem;
      letter-spacing: 0.5px;
    }

    .date-updated::before {
      content: "📅";
      margin-right: 0.5rem;
    }
  }

  .link {
    grid-area: 2/2/3/3;

    &:hover {
      text-decoration: underline;
      text-decoration-color: var(--impact-color);
    }

    h2 {
      font-size: 2rem;
      font-weight: 700;
      line-height: 1.2;
    }
  }

  .excerpt {
    grid-area: 3/2/4/3;
  }
}