/* Latest Posts Section */
.latest-posts {
  max-width: 1200px;
  padding: 15px 30px;
  margin: 0 auto;
}

.latest-posts-title {
  max-width: fit-content;
}

.latest-posts h2 {
  font-size: 5vh;
  background: linear-gradient(90deg, #26c997 0%, #015caf 25%);
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--main-font-family);
  font-style: normal;
  font-weight: 600;
  margin-bottom: 0;
}

.latest-posts p {
  font-size: 3vh;
  margin-bottom: 3vh;
  margin-top: 0;
  color: var(--main-subtext-color);
  font-family: var(--secondary-font-family);
  font-weight: var(--main-font-weight);
}

/* Grid Layout for the Posts */
.latest-posts-grid {
  display: grid;
  grid-template-columns: auto; /* Two columns: big column for the latest post, smaller column for the other 3 */
  grid-template-rows: auto;
  gap: 2rem; /* Gap between columns and rows */
  align-items: start;
  height: auto; /* Allow the grid to adjust its height */
}

/* Big Post (Most Recent) */
.big-post {
  grid-column: 1; /* Occupies the first (large) column */
  position: relative;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.big-post:hover {
  transform: scale(1.02);
}

.big-post img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.big-post h3 {
  font-size: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
  color: var(--main-title-color);
}

.big-post p {
  font-size: 0.8rem;
  color: var(--main-subtext-color);
  margin: 0.5rem 0 0.2rem 0;
}

.big-post .read-more {
  color: var(--main-green-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
}

/* Small Posts Container (Holds all small posts) */
.small-posts-container {
  grid-column: 2; /* This container occupies the second column */
  display: flex;
  flex-direction: column;
  gap: 2vh;
}

/* Small Posts (Other 3) */
.small-post {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: start;
  gap: 1rem;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.small-post:hover {
  transform: scale(1.02);
}

.small-post img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0.5rem;
}

.small-post h4 {
  font-size: 1rem;
  color: var(--main-title-color);
  margin: 0;
}

.small-post p {
  font-size: 0.8rem;
  color: var(--main-subtext-color);
  margin: 0.5rem 0;
}

.small-post .read-more {
  color: var(--main-green-color);
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: bold;
}

@media (min-width: 1200px) {
  .latest-posts-title {
    max-width: 30vw;
  }
}

/* Responsive Adjustments for Tablet Screens */
@media (max-width: 1100px) {
  .latest-posts-grid {
    grid-template-columns: 1fr; /* One column layout for smaller screens */
    gap: 1.5rem; /* Reduced gap for smaller screens */
  }

  .small-post {
    align-items: center;
  }
  .small-posts-container {
    grid-column: 1;
  }

  .big-post h3 {
    font-size: 2.2rem;
  }

  .big-post p {
    font-size: 1.4rem;
  }

  .small-post h4 {
    font-size: 1.4rem;
  }

  .small-post p {
    font-size: 1.2rem;
  }

  .continue-reading-btn {
    font-size: 1.2rem;
    padding: 0.8rem 1.2rem;
  }
}

/* Responsive Adjustments for Mobile Screens */
@media (max-width: 600px) {
  .latest-posts-grid {
    grid-template-columns: 1fr; /* One column layout for mobile screens */
    gap: 1rem; /* Reduced gap for mobile screens */
  }

  .latest-posts h2 {
    font-size: 4vh; /* Smaller heading for mobile screens */
    margin: 0;
  }

  .latest-posts p {
    font-size: 2.5vh; /* Smaller text for mobile screens */
  }

  .big-post h3 {
    font-size: 1.4rem; /* Smaller title for mobile screens */
  }

  .big-post p {
    font-size: 1.1rem; /* Smaller excerpt for mobile */
  }

  .small-posts-container {
    gap: 1.5vh; /* Adjusted gap for mobile */
  }

  .small-post {
    grid-template-columns: auto;
  }

  .small-post h4 {
    font-size: 1.4rem;
  }

  .small-post p {
    font-size: 1.1rem;
  }

  .post-thumbnail img,
  .small-post img {
    border-radius: 0.4rem; /* Slightly smaller border radius for mobile */
  }

  .big-post .read-more {
    font-size: 1.2rem;
  }

  .continue-reading-btn {
    font-size: 1.1rem; /* Smaller button text for mobile */
    padding: 0.6rem 1rem;
  }
}
