
/* News page css */

/* Hero image */
.news-hero {
  position: relative;
  background: url('../images/space-bg.jpg') no-repeat center center/cover;
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  position: relative;
}

/* News card layout */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* News card design */
.news-card-horizontal {
  display: flex;
  height: 300px;
  background: var(--color-white);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* News card image */
.news-card-horizontal .news-image {
  width: 40%;         /* fixed width */
  height: 100%;        /* fixed height to match the card */
  flex-shrink: 0;
  overflow: hidden;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.news-card-horizontal .news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* News card tittle and description */
.news-info {
  flex-grow: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* News card tittle */
.news-info h3 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 0 0 0.5rem 0;
  min-height: 2.6em;            /* height of 2 lines */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;        /* limit to 2 lines */
  -webkit-box-orient: vertical;
}

/* News card description */
.news-info p {
  font-size: 1rem;  
  margin: 0;
  color: var(--color-grey);
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 5;          /* showing up to 6 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  max-height: calc(1.4em * 5);
}

/* News card date and button */
.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* News card date */
.news-date {
  font-size: 0.95rem;
  color: var(--color-light-grey);
  margin-top: 0.5rem;
}

/* News card button */
.news-button {
  align-self: flex-start;
  margin-top: 1rem;
  background: var(--color-blue);
  color: var(--color-white);
  padding: 0.6rem 2.5rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  font-size: 0.9rem;
}

.news-button:hover {
  background: var(--color-dark-blue);
}

/* Pagination */
.news-pagination {
  text-align: center;
  margin-top: 2rem;
}

.news-pagination .page-numbers {
  display: inline-block;
  margin: 0 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  background: var(--color-white);
  color: var(--color-black);
  text-decoration: none;
}

.news-pagination .page-numbers.current {
  background: var(--color-blue);
  color: var(--color-white);
}
