@import url('root-styles.css');
@import url('navbar.css');
@import url('footer.css');

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--main-font);
  color: #222;
  overflow-x: hidden;
  margin: 0;
}

/* ── SCROLL TO TOP ── */
#scrollTop {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  opacity: 0;
  transition: background .3s ease, transform .2s ease, opacity .3s ease;
}
#scrollTop.show { display: flex; opacity: 1; }
#scrollTop:hover { background: var(--grey); transform: translateY(-2px); }

/* ── PAGE HERO ── */
.page-hero {
  background: var(--navy);
  padding: 4rem 0 3rem;
  text-align: center;
  color: var(--white);
}
.page-hero-label {
  color: var(--grey-accent);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: .4rem;
}
.page-hero h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 1rem;
}
.page-hero p:last-child {
  font-size: 1rem;
  color: rgba(255,255,255,.75);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── NEWS LISTING ── */
#news-listing {
  background: var(--light-bg);
  padding: 5rem 0;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.news-card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(29,70,110,.08);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(29,70,110,.15);
}
.news-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--navy);
}
.news-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--navy) 0%, var(--dark-bg) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-card-img-placeholder i {
  font-size: 3rem;
  color: rgba(252,185,0,.4);
}
.news-card-body {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-date {
  font-size: .8rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .5rem;
}
.news-card-body h6 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.45;
  margin-bottom: .7rem;
  flex: 1;
}
.news-excerpt {
  font-size: .88rem;
  color: #666;
  line-height: 1.65;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.btn-news-read {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  padding: .5rem 1.1rem;
  border-radius: 6px;
  align-self: flex-start;
  transition: background .2s, transform .15s;
}

.news-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: #888;
  grid-column: 1 / -1;
}
.news-empty i { font-size: 3rem; display: block; margin-bottom: 1rem; color: #ccc; }

/* ── RESPONSIVE ── */
@media (max-width: 991.98px) {
  #news-listing { padding: 4rem 1rem; }
  .news-grid { gap: 1.2rem; }
  .news-card-body { padding: 1.1rem; }
  .news-card-body h6 { font-size: .95rem; }
  .news-excerpt { -webkit-line-clamp: 2; line-clamp: 2; }
}

/* portrait tablets + landscape phones → single column */
@media (max-width: 767.98px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .news-excerpt { -webkit-line-clamp: 3; line-clamp: 3; }
  .page-hero { padding: 3rem 1rem 2rem; }
}

@media (max-width: 575.98px) {
  #news-listing { padding: 2rem 1rem; }
  .page-hero { padding: 2.5rem 1rem 1.5rem; }
  .news-card-body { padding: 1rem; }
  .btn-news-read {
    width: 100%;
    text-align: center;
  }
}
