/* Align content to left and limit width to 80% */
.content-wrapper {
  max-width: 80%;
  margin: 0 auto; /* Center the content horizontally */
  padding: 2rem 0;
}

/* Page Header */
.page-header {
  text-align: start;
  background-color: transparent;
  color: var(--primary);
  padding: 2rem 1rem;
  margin-left: 30px;
}

.page-header h1 {
  font-family: var(--heading);
  font-size: 3.5rem;
}

/* Vertical List */
.article-list {
  display: flex;
  flex-direction: column;
  padding: 0 1rem; /* Balanced space left and right */
}

.list-item {
  height: 150px; /* Fixed height for each article card */
  overflow: hidden;
  display: flex;
  gap: 1.5rem; /* Increased gap for better spacing */
  align-items: center; /* Center items vertically */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: transparent;
  padding: 0.5rem 0; /* Added padding for breathing room */
}

.list-item:not(:last-child) {
  border-bottom: 1px solid var(--primary);
  margin-bottom: 1.5rem; /* Slightly more margin for separation */
}

.list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow on hover */
}

/* Article Image */
.list-item .article-image {
  width: 190px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Article Content */
.item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center content vertically */
}

/* Title and description */
.item-content h3 {
  font-family: var(--heading);
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.2rem; /* Slightly larger for emphasis */
  display: -webkit-box;
  -webkit-line-clamp: 1; /* Limit to 1 line */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  max-height: 1.5em; /* 1 line × 1.5 line-height */
}

.item-content p {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  max-height: 3em; /* 2 lines × 1.5 line-height */
  margin-bottom: 0.5rem;
  font-size: 0.95rem; /* Slightly smaller for balance */
}

/* Category */
.item-content .category {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.article-link {
    text-decoration: none; /* Remove default underline from link */
    display: inline-block; /* Ensure the link wraps the container tightly */
}
.read-more-container {
    display: flex; /* Use Flexbox to align items horizontally */
    align-items: center; /* Vertically center the image and text */
    gap: 8px; /* Add space between the image and text */
}
.read-more-text {
    font-size: 0.95rem; /* Adjust font size as needed */
    color: #7AC64D; /* Example color, adjust to match your design */
    
    line-height: 1; /* Match line height to image for alignment */
}
/* “Read more” icon BELOW the text */
.article-link-image {
  width: 24px; /* Adjust size as needed */
    height: 24px;
    vertical-align: middle; /* Fallback alignment */
  opacity: 0.7;
  transition: opacity 0.3s ease;
  align-self: flex-start; /* Align to the left under text */
}

.article-link-image:hover {
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .content-wrapper {
    max-width: 90%; /* Slightly wider for smaller screens */
    margin: 0 auto;
    padding: 1.5rem 0;
  }

  .article-list {
    padding: 0 0.5rem;
  }

  .list-item {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    height: auto; /* Allow flexible height for smaller screens */
    min-height: 120px;
  }

  .list-item .article-image {
    width: 120px;
    height: 80px;
    min-width: 120px;
    min-height: 80px;
    object-fit: cover;
  }

  .item-content {
    align-items: flex-start;
    text-align: left;
  }

  .item-content h3 {
    font-size: 1.1rem;
    -webkit-line-clamp: 2; /* Reduced to 2 lines for smaller screens */
  }

  .item-content p {
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
  }

  .article-link-image {
    width: 30px;
    height: 24px;
    margin-top: 0.3rem;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 2.2rem;
  }

  .list-item {
    gap: 0.75rem;
  }

  .item-content h3 {
    font-size: 1rem;
  }

  .item-content p {
    font-size: 0.85rem;
  }

  .article-link-image {
    width: 24px;
    height: 20px;
  }
}

/* Pagination */
.pagination {
    margin-top: 1.5rem;
    text-align: center;
}

.pagination a {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    margin: 0 0.2rem;
    border: 1px solid var(--primary);
    border-radius: 4px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.pagination a.active {
    background: var(--primary);
    color: var(--text-light);
}

.pagination a:hover {
    background: var(--accent);
    color: var(--text-light);
}