.article {
  margin-bottom: 20px;
}
.article-header {
  margin-bottom: 10px;
}
.article-banner {
  display: flex;
  height: 200px;
  width: 980px;
  flex-direction: column;
  align-items: left;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  transition: height 0.3s ease-in-out;
}
.article-banner-img {
  border-radius: 10px 10px 0 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}
.article-banner::before {
  content: "Hover to see the full banner";
  position: absolute;
  padding: 10px;
  font-weight: bold;
  color: black;
  background-color: rgba(255, 255, 255, 0.5);
  opacity: 0.8;
  border-radius: 10px 0px 10px 0px;
  font-size: 0.9em;
}
.article,
.article:hover {
  transition: height 0.3s ease-in-out;
}
.article-header:hover .article-banner {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  height: 551.25px; /* 16:9 aspect ratio */
  transition: height 0.3s ease-in-out;
}
.article-title {
  background-color: var(--primary-color);
  padding: 10px;
  border-radius: 0 0 10px 10px;
  font-size: 1em;
}
.article-subtitle {
  font-size: 0.9em;
  margin-top: 10px;
  font-style: italic;
  font-weight: lighter;
}
.article-date::before {
  content: "Posted on: ";
  font-weight: bold;
  font-size: 1em;
}
.article-date {
  font-size: 0.9em;
  color: #ccc;
  margin-top: 5px;
  display: block;
  text-align: right;
  font-weight: bold;
  font-style: italic;
}
.article-content {
  margin-top: 15px;
  font-size: 1.1em;
  line-height: 1.6;
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
}
.home-feed-heading {
  font-size: 1.5em;
  background-color: white;
  padding: 10px;
  border-radius: 10px 10px 0px 10px;
  color: black;
  text-align: center;
}
.view-all-link {
  color: var(--secondary-color);
  background-color: white;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  width: fit-content;
  padding: 5px;
  float: right;
  border-radius: 0px 0px 10px 10px;
}

@media (max-width: 1200px) {
  .article-banner,
  .article-banner-img {
    width: 100%;
    height: auto;
  }
  .article-header {
    flex-direction: column;
    align-items: center;
  }
  .article-title,
  .article-subtitle,
  .article-date {
    text-align: center;
  }
  .article-content {
    padding: 10px;
  }
  .article-banner::before {
    display: none; /* Hide the hover text on smaller screens */
  }
  .article-header:hover .article-banner {
    height: auto; /* Allow the banner to adjust height automatically */
    aspect-ratio: auto;
  }
}
