
/* Front page css */

/* Hero image */
.hero-section {
  position: relative;
  background: url('../images/space-bg.jpg') no-repeat center center/cover;
  height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  position: relative;
}

/* Hero logo */
.hero-logo img {
  padding-top: 15%;
  height: 150px;
}

/* Hero tittle */
.hero-text p {
  font-size: 1.1rem;
  max-width: 500px;
  margin: 1rem auto 0;
}

/* Responsive override for smaller screens */
@media (max-width: 768px) {
  .hero-logo img {
    height: 100px;
  }

  .hero-text p {
    font-size: 1rem;
    padding: 0 1rem;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-logo img {
    height: 80px;
  }

  .hero-text p {
    font-size: 0.95rem;
  }
}

/* News cards section */
.news-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: stretch; /* Ensures all cards align */
}

/* News card design */
.news-card {
  background: var(--color-white);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  width: 350px;
  display: flex;
  flex-direction: column;
  height: 575px; /* Fixed height for all cards */
}

/* News card image */
.news-image img {
  width: 100%;
  overflow: hidden;
}

.news-card .news-image {
  width: 100%;
  height: 225px; /* Fixed image height */
  overflow: hidden;
  flex-shrink: 0;
  margin-bottom: 0;
}

.news-card .news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin-bottom: 0;
}

/* News card content */
.news-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
}

/* News card tittle */
.news-content h3 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 0 0 0.5rem 0;         /* remove top margin to pull it closer to image */
  min-height: 2.6em;            /* ≈ height of 2 lines */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;        /* limit to 2 lines */
  -webkit-box-orient: vertical;
}

/* News card description */
.news-content p {
  font-size: 1rem;
  margin: 0 0 0.5rem 0; 
  color: var(--color-grey);
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 6;          /* now showing up to 6 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  max-height: calc(1.4em * 6);
}

/* News card button */
.news-button {
  margin-top: 0;
  background: var(--color-blue);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 5px;
  text-align: center;
  display: inline-block;
}

.news-button:hover {
  background: var(--color-dark-blue);
}