/* ===== DWR RSS News — Frontend Styles ===== */

/* ── Hero Banner (plugin-managed) ── */
.dwr-news-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 55px 20px 45px;
  text-align: center;
}

/* ── Divider ── */
.dwr-divider {
  width: 100%;
  max-width: 1400px;
  margin: 40px auto 0 auto;
  border-top: 2px solid #dfe8ef;
}

.dwr-news-hero-title {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 38px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-family:
    "Noto Sans Thai",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

/* Container */
.dwr-news-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 0 40px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Thai",
    sans-serif;
}

/* ── Category Tabs ── */
.dwr-news-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
}

.dwr-news-tab {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 25px;
  background: #f1f3f5;
  color: #495057;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.dwr-news-tab:hover {
  background: #e2e6ea;
  color: #212529;
  text-decoration: none !important;
}

.dwr-news-tab.active {
  background: #1a5276;
  color: #fff !important;
  border-color: #1a5276;
}

/* ── News Count ── */
.dwr-news-count {
  font-size: 13px;
  color: #868e96;
  margin-bottom: 20px;
}

/* ── News Grid ── */
.dwr-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

/* ── News Card ── */
.dwr-news-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.dwr-news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Card Image */
.dwr-news-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f0f0f0;
}

.dwr-news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.dwr-news-card:hover .dwr-news-card-img img {
  transform: scale(1.05);
}

/* Card Body */
.dwr-news-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Category Badge */
.dwr-news-card-cat {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  background: #e8f4f8;
  color: #1a5276;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Title */
.dwr-news-card-title {
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin: 0 0 10px !important;
  color: #212529;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dwr-news-card-title a {
  color: #212529 !important;
  text-decoration: none !important;
  transition: color 0.2s;
}

.dwr-news-card-title a:hover {
  color: #1a5276 !important;
}

/* Description */
.dwr-news-card-desc {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.6;
  margin: 0 0 12px !important;
  flex: 1;
}

/* Meta */
.dwr-news-card-meta {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #adb5bd;
  margin-bottom: 10px;
}

.dwr-news-card-source {
  color: #17a2b8;
}

/* Read more link */
.dwr-news-card-link {
  font-size: 13px;
  font-weight: 600;
  color: #1a5276 !important;
  text-decoration: none !important;
  transition: color 0.2s;
}

.dwr-news-card-link:hover {
  color: #2980b9 !important;
  text-decoration: underline !important;
}

/* ── Empty State ── */
.dwr-news-empty {
  text-align: center;
  padding: 60px 20px;
  color: #adb5bd;
}

.dwr-news-empty-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.dwr-news-empty p {
  font-size: 16px;
}

/* ── Pagination ── */
.dwr-news-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 30px 0 15px;
}

.dwr-news-pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  color: #495057 !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.dwr-news-pg:hover {
  background: #e9ecef;
  color: #212529 !important;
  text-decoration: none !important;
}

.dwr-news-pg.active {
  background: #1a5276;
  color: #fff !important;
  border-color: #1a5276;
}

/* ── RSS Feed Link ── */
.dwr-news-rss-link {
  text-align: center;
  margin-top: 20px;
}

.dwr-news-rss-link a {
  font-size: 13px;
  color: #868e96 !important;
  text-decoration: none !important;
  padding: 6px 16px;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  transition: all 0.2s;
}

.dwr-news-rss-link a:hover {
  background: #f8f9fa;
  color: #495057 !important;
  border-color: #adb5bd;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .dwr-news-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dwr-news-tabs {
    gap: 6px;
  }

  .dwr-news-tab {
    padding: 6px 14px;
    font-size: 13px;
  }

  .dwr-news-card-img {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .dwr-news-page {
    padding: 5px 0 30px;
  }

  .dwr-news-card-body {
    padding: 15px;
  }

  .dwr-news-card-title {
    font-size: 15px !important;
  }
}
