/* ============================================================
 *  News pages — list & detail
 * ============================================================ */

/* ===== Category filters (pill row) ===== */
.news-cat-filters {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 28px;
}
.news-cat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 244, 220, .06);
  border: 1.5px solid rgba(255, 244, 220, .1);
  border-radius: 999px;
  color: var(--text-muted, rgba(232, 227, 213, .65));
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all .2s;
}
.news-cat-pill:hover {
  border-color: var(--cat-color, var(--accent-orange, #f1b94f));
  color: var(--cat-color, var(--accent-orange, #f1b94f));
  background: rgba(255, 244, 220, .08);
}
.news-cat-pill.active {
  background: var(--cat-color, var(--accent-orange, #f1b94f));
  border-color: var(--cat-color, var(--accent-orange, #f1b94f));
  color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--cat-color, #f1b94f) 30%, transparent);
}

/* ===== News grid (list page) ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.news-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 244, 220, .04);
  border: 1.5px solid rgba(255, 244, 220, .08);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all .25s cubic-bezier(.2, .8, .2, 1);
  position: relative;
  overflow: hidden;
}
/* Card có thumbnail: bỏ padding trên cùng để ảnh tràn viền */
.news-card-has-thumb {
  padding: 0;
}
.news-card-thumb {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: rgba(255, 244, 220, 0.05);
}
.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.news-card-has-thumb:hover .news-card-thumb img {
  transform: scale(1.06);
}
.news-card-thumb-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: color-mix(in srgb, var(--cat-color) 88%, black 12%);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  backdrop-filter: blur(2px);
}
.news-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg,
    transparent 60%,
    rgba(241, 185, 79, .08) 100%);
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(241, 185, 79, .4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
  color: inherit;
}
.news-card:hover::before { opacity: 1; }

.news-card-cat {
  display: inline-flex; align-items: center; gap: 5px;
  align-self: flex-start;
  padding: 4px 12px;
  background: color-mix(in srgb, var(--cat-color) 18%, transparent);
  color: var(--cat-color);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: 12px;
}
.news-card-title {
  font-family: 'Bungee', cursive;
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--text, #e8e3d5);
}
.news-card-excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(232, 227, 213, .7);
  margin: 0 0 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 244, 220, .06);
  font-size: 12px;
}
.news-card-date {
  color: rgba(232, 227, 213, .5);
}
.news-card-readmore {
  color: var(--accent-gold, #ffc94a);
  font-weight: 700;
  transition: transform .2s;
}
.news-card:hover .news-card-readmore {
  transform: translateX(3px);
}

/* ===== Pagination ===== */
.news-pagination {
  display: flex; justify-content: center; gap: 6px;
  flex-wrap: wrap;
  margin: 30px 0;
}
.news-page-link {
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(255, 244, 220, .06);
  color: rgba(232, 227, 213, .7);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all .2s;
}
.news-page-link:hover {
  background: rgba(241, 185, 79, .15);
  color: var(--accent-gold, #ffc94a);
}
.news-page-link.active {
  background: var(--accent-orange, #f1b94f);
  color: #fff;
}

/* ===== Empty state ===== */
.news-empty {
  text-align: center;
  padding: 60px 20px;
}
.news-empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: .6;
}
.news-empty h2 {
  font-family: 'Bungee', cursive;
  font-size: 22px;
  margin: 0 0 8px;
}
.news-empty p {
  color: rgba(232, 227, 213, .6);
  margin: 0;
}

/* =====================================================
 *  Detail page
 * ===================================================== */

.news-detail {
  max-width: 760px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(26, 23, 51, 0.88) 0%, rgba(11, 10, 35, 0.95) 100%);
  border: 1px solid rgba(255, 244, 220, .12);
  border-radius: 18px;
  padding: 38px 44px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 244, 220, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.news-back-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 auto 18px;
  max-width: 760px;
  width: 100%;
  color: rgba(232, 227, 213, .7);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}
.news-back-link:hover { color: var(--accent-gold, #ffc94a); }

.news-detail-header {
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 244, 220, .08);
}

.news-detail-category {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px;
  background: color-mix(in srgb, var(--cat-color) 18%, transparent);
  color: var(--cat-color);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: 16px;
}

.news-detail-title {
  font-family: 'Bungee', cursive;
  font-size: clamp(26px, 4.5vw, 38px);
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--text, #e8e3d5);
}

.news-detail-excerpt {
  font-size: 17px;
  line-height: 1.55;
  color: rgba(232, 227, 213, .8);
  margin: 0 0 20px;
  font-weight: 500;
}

.news-detail-meta {
  display: flex; flex-wrap: wrap; gap: 18px;
  color: rgba(232, 227, 213, .55);
  font-size: 13px;
}
.news-detail-meta span {
  display: inline-flex; align-items: center; gap: 6px;
}

/* Article content (HTML từ admin) */
.news-detail-content {
  font-size: 16px;
  line-height: 1.75;
  color: rgba(232, 227, 213, .88);
}
.news-detail-content p {
  margin: 0 0 18px;
}
.news-detail-content h2,
.news-detail-content h3 {
  font-family: 'Bungee', cursive;
  color: var(--accent-gold, #ffc94a);
  margin: 30px 0 14px;
  line-height: 1.3;
}
.news-detail-content h2 { font-size: 24px; }
.news-detail-content h3 { font-size: 19px; }
.news-detail-content strong { color: var(--text, #e8e3d5); }
.news-detail-content em { color: var(--accent-orange-light, #ff8b3d); font-style: normal; }

.news-detail-content ul,
.news-detail-content ol {
  margin: 0 0 18px;
  padding-left: 24px;
}
.news-detail-content li {
  margin-bottom: 8px;
}

.news-detail-content a {
  color: var(--accent-gold, #ffc94a);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(241, 185, 79, .4);
}
.news-detail-content a:hover {
  text-decoration-color: var(--accent-gold, #ffc94a);
}

.news-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 14px 0;
}

.news-detail-content blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--accent-orange, #f1b94f);
  background: rgba(241, 185, 79, .06);
  border-radius: 0 8px 8px 0;
  color: rgba(232, 227, 213, .85);
  font-style: italic;
}

.news-detail-content code {
  background: rgba(7, 17, 32, 0.6);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 14px;
  color: var(--accent-gold, #ffc94a);
}

.news-detail-content hr {
  border: 0;
  border-top: 1px solid rgba(255, 244, 220, .12);
  margin: 28px 0;
}

/* ===== Styles cho output từ Quill editor ===== */
.news-detail-content u { text-decoration: underline; }
.news-detail-content s { text-decoration: line-through; opacity: 0.7; }
.news-detail-content .ql-align-center { text-align: center; }
.news-detail-content .ql-align-right { text-align: right; }
.news-detail-content .ql-align-justify { text-align: justify; }

.news-detail-content h1 {
  font-family: 'Bungee', cursive;
  font-size: 28px;
  color: var(--accent-gold, #ffc94a);
  margin: 30px 0 14px;
  line-height: 1.3;
}

.news-detail-content pre.ql-syntax {
  background: rgba(7, 17, 32, 0.6);
  padding: 14px 18px;
  border-radius: 8px;
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 13px;
  color: var(--accent-gold, #ffc94a);
  overflow-x: auto;
  line-height: 1.5;
  margin: 16px 0;
  white-space: pre-wrap;
}

/* Indent levels (Quill) */
.news-detail-content .ql-indent-1 { padding-left: 3em; }
.news-detail-content .ql-indent-2 { padding-left: 6em; }
.news-detail-content .ql-indent-3 { padding-left: 9em; }

/* Color styles từ Quill - inline style sẽ override */

/* Footer share */
.news-detail-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 244, 220, .08);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}
.btn-outline {
  display: inline-block;
  padding: 10px 18px;
  border: 1.5px solid rgba(255, 244, 220, .15);
  border-radius: 8px;
  color: var(--text-muted, rgba(232, 227, 213, .7));
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all .2s;
}
.btn-outline:hover {
  border-color: var(--accent-gold, #ffc94a);
  color: var(--accent-gold, #ffc94a);
}
.news-share-text {
  text-align: right;
  font-size: 13px;
  color: rgba(232, 227, 213, .55);
}
.news-share-buttons {
  display: flex; gap: 8px;
}
.news-share-btn {
  width: 38px; height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 244, 220, .08);
  color: var(--text, #e8e3d5);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.news-share-btn:hover {
  background: var(--accent-orange, #f1b94f);
  color: #fff;
  transform: translateY(-2px);
}

/* Related news */
.news-related {
  max-width: 1100px;
  margin: 50px auto 0;
}
.news-related .section-title {
  font-family: 'Bungee', cursive;
  font-size: 22px;
  margin: 0 0 20px;
}
.news-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.news-related-card {
  display: flex; flex-direction: column;
  padding: 16px;
  background: rgba(255, 244, 220, .04);
  border: 1.5px solid rgba(255, 244, 220, .08);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all .2s;
}
.news-related-has-thumb {
  padding: 0;
  overflow: hidden;
}
.news-related-thumb {
  width: 100%;
  height: 120px;
  overflow: hidden;
  background: rgba(255, 244, 220, 0.05);
}
.news-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.news-related-has-thumb:hover .news-related-thumb img {
  transform: scale(1.06);
}
.news-related-has-thumb .news-related-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}
.news-related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(241, 185, 79, .4);
  color: inherit;
}
.news-related-cat {
  display: inline-flex; align-self: flex-start;
  padding: 3px 10px;
  background: color-mix(in srgb, var(--cat-color) 18%, transparent);
  color: var(--cat-color);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 10px;
}
.news-related-title {
  font-family: 'Bungee', cursive;
  font-size: 15px;
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--text, #e8e3d5);
}
.news-related-excerpt {
  font-size: 13px;
  color: rgba(232, 227, 213, .6);
  line-height: 1.5;
  margin: 0 0 10px;
  flex: 1;
}
.news-related-date {
  font-size: 11px;
  color: rgba(232, 227, 213, .45);
}

/* 404 */
.news-not-found {
  text-align: center;
  padding: 80px 20px;
}
.news-not-found h1 {
  font-family: 'Bungee', cursive;
  font-size: 32px;
  margin-bottom: 12px;
}
.news-not-found p {
  color: rgba(232, 227, 213, .65);
  margin-bottom: 26px;
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .news-detail {
    padding: 26px 22px;
    border-radius: 14px;
  }
  .news-detail-title { font-size: 24px; }
  .news-detail-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .news-share-text { text-align: center; }
  .news-share-buttons { justify-content: center; }
  .news-grid { grid-template-columns: 1fr; }
}
