/* ========== NEWS HERO ============ */

.news-hero {
  position: relative;
  width: 100%;
  height: 420px;
  margin-bottom: 60px;

  display: flex;
  align-items: center;
  justify-content: center;

  background-image: url("../../img/news/news_hero.png");
  background-size: cover;
  background-position: center;
}

.news-hero-overlay {
  width: calc(100% - 32px);
  max-width: 960px;
  padding: 40px 48px;

  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #f5c518;
  border-radius: 24px;
  backdrop-filter: blur(6px);

  text-align: left;
}

.news-hero-overlay h1 {
  margin-bottom: 16px;
  font-size: 42px;
  font-weight: 700;
  color: #f5c518;
}

.news-hero-overlay p {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: #ffffff;
}


/* ============= NEWS FILTER ================= */

.news-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.news-filter a {
  padding: 6px 18px;
  font-size: 14px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.news-filter a:hover,
.news-filter-btn.active {
  background-color: #f5c518;
  color: #000;
}


/* ======= NEWS CARD ==== */

.news-card {
  background-color: #0e0e0e;
  border: 1px solid #222;
  border-radius: 18px;
  overflow: hidden;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.news-card img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
}


/* ======== Card Content ========== */

.news-card h5 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: #ffffff;
}

.news-card p {
  margin-bottom: 12px;
  font-size: 14px;
  color: #cfcfcf;
}

.news-card small {
  font-size: 12px;
  color: #9a9a9a;
}

.news-card a {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.news-card a:hover {
  text-decoration: underline;
}

/* ============== NEWS OVERLAY ===================== */

.news-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.news-overlay.active {
  display: block;
}

.news-overlay-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.news-overlay-content {
  position: relative;
  z-index: 1;

  max-width: 960px;
  max-height: 90vh;
  margin: 5vh auto;
  padding: 32px;

  background: #0e0e0e;
  border: 2px solid #f5c518;
  border-radius: 24px;

  overflow-y: auto;

  scrollbar-width: none;           /* Firefox */
  -ms-overflow-style: none;        /* IE / Edge legacy */
}

.news-overlay-content::-webkit-scrollbar {
  display: none;                   /* Chrome / Safari */
}

.news-overlay-close {
  position: absolute;
  top: 16px;
  right: 20px;

  background: none;
  border: none;
  font-size: 24px;
  color: #f5c518;
  cursor: pointer;
}

.news-detail-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;

  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

.pagination button {
  min-width: 44px;
  height: 44px;
  padding: 0 18px;

  background: #141414;               /* สว่างกว่าพื้นหลัง */
  border: 1px solid #2a2a2a;         /* ขอบชัดขึ้น */
  border-radius: 999px;

  font-size: 14px;
  font-weight: 600;
  color: #e5e5e5;                    /* ตัวอักษรสว่างขึ้น */

  box-shadow: 
    0 0 0 1px rgba(255,255,255,0.03),
    0 6px 18px rgba(0,0,0,0.6);

  transition: all 0.25s ease;
}

.pagination button:hover {
  background: #f5c518;
  color: #000;
  border-color: #f5c518;
  box-shadow: 0 0 0 2px rgba(16,163,127,0.35);
}

.pagination button.active {
  background: #f5c518;
  color: #000;
  border-color: #f5c518;
  box-shadow: 0 0 0 2px rgba(16,163,127,0.45);
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination button:active {
  transform: scale(0.96);
}

/* ========= RESPONSIVE =========*/

@media (max-width: 1024px) {

  .news-hero {
    height: 320px;
  }

  .news-hero-overlay {
    padding: 24px;
  }

  .news-hero-overlay h1 {
    font-size: 28px;
  }

  .news-hero-overlay p {
    font-size: 15px;
  }

  .news-card img {
    height: 180px;
  }

  .news-card h5 {
    font-size: 16px;
  }

  .news-filter {
    justify-content: center;
  }

  .news-overlay-content {
    margin: 0;
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }
}