/* News Detail User Styles - Clean Single-Column Centered Reading Layout */
@import '../common/reset.css';
@import '../common/variables.css';
@import '../common/header.css';
@import '../common/footer.css';
@import '../common/components.css';

.news-detail-section {
  padding: 55px 0 85px;
  background: #ffffff;
}

/* ── 1 Cột Căn Giữa Chuẩn ── */
.news-detail-article {
  max-width: 860px;
  margin: 0 auto;
}

/* ── Meta: Ngày đăng, Tác giả, Lượt xem ── */
.news-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #d97706;
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 16px;
}

.news-detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.news-detail-meta-sep {
  color: #cbd5e1;
  font-weight: 400;
  margin: 0 3px;
}

/* ── Tiêu đề bài viết ── */
.news-detail-title {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 32px;
  font-weight: 800;
  color: var(--primary-navy, #0f172a);
  line-height: 1.35;
  margin: 0 0 22px 0;
  letter-spacing: -0.3px;
}

/* ── Đoạn mở đầu / Tóm tắt ── */
.news-detail-lead {
  font-size: 16.5px;
  font-weight: 500;
  color: #334155;
  line-height: 1.75;
  font-style: italic;
  background: #f8fafc;
  border-left: 4px solid var(--accent-gold, #f59e0b);
  padding: 16px 22px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 28px;
}

/* ── Ảnh đại diện bài viết ── */
.news-detail-featured-media {
  margin-bottom: 34px;
}

.news-detail-img {
  width: 100%;
  max-height: 480px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  display: block;
}

/* ── Nội dung chi tiết bài viết ── */
.news-detail-body {
  font-size: 16.5px;
  color: #1e293b;
  line-height: 1.85;
  margin-bottom: 30px;
}

.news-detail-body h2,
.news-detail-body h3,
.news-detail-body h4 {
  color: var(--primary-navy, #0f172a);
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-weight: 700;
  margin: 28px 0 14px;
  line-height: 1.4;
}

.news-detail-body h2 {
  font-size: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
}

.news-detail-body h3 {
  font-size: 20px;
}

.news-detail-body p {
  margin-bottom: 18px;
}

.news-detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 24px auto;
  display: block;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.news-detail-body ul,
.news-detail-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.news-detail-body li {
  margin-bottom: 8px;
}

.news-detail-body blockquote {
  border-left: 4px solid var(--accent-gold, #f59e0b);
  background: #f8fafc;
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #475569;
}

.news-detail-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14.5px;
}

.news-detail-body th,
.news-detail-body td {
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  text-align: left;
}

.news-detail-body th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--primary-navy, #0f172a);
}

/* ── Nút quay lại & Chia sẻ ── */
.news-detail-actions {
  margin-top: 45px;
  padding-top: 25px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.news-detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #f1f5f9;
  color: var(--primary-navy, #0f172a);
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.news-detail-back-btn:hover {
  background: var(--accent-gold, #f59e0b);
  color: var(--primary-navy, #0f172a);
  transform: translateX(-3px);
}

.news-detail-share {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-share-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.news-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-share-btn:hover {
  transform: translateY(-2px);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.news-share-btn--fb {
  background: #1877f2;
}

.news-share-btn--zalo {
  background: #0068ff;
}

/* ── Bài viết liên quan ở bên dưới ── */
.news-detail-related {
  max-width: 1100px;
  margin: 70px auto 0;
  padding-top: 50px;
  border-top: 1px solid #e2e8f0;
}

.news-related-header {
  text-align: center;
  margin-bottom: 40px;
}

.news-related-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: #d97706;
  background: rgba(245, 158, 11, 0.12);
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 1px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.news-related-title {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-navy, #0f172a);
  text-transform: uppercase;
  margin: 0 0 12px 0;
}

.news-related-divider {
  width: 50px;
  height: 3.5px;
  background: var(--accent-gold, #f59e0b);
  border-radius: 2px;
  margin: 0 auto;
}

/* ── Lưới thẻ bài viết liên quan (Chuẩn 3 cột như news.php) ── */
.srv-grid {
  display: grid;
  gap: 28px;
}

.srv-grid--3cols {
  grid-template-columns: repeat(3, 1fr);
}

.srv-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
  height: 100%;
}

.srv-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
}

.srv-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1e293b;
}

.srv-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.srv-card:hover .srv-card__media img {
  transform: scale(1.08);
}

.srv-card__badge-code {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--accent-gold, #f59e0b);
  border: 1px solid rgba(245, 158, 11, 0.5);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 5px 11px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.srv-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(3px);
  z-index: 3;
  pointer-events: none;
}

.srv-card:hover .srv-card__overlay {
  opacity: 1;
  visibility: visible;
}

.srv-card__overlay-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-gold, #f59e0b);
  color: var(--primary-navy, #0f172a);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 8px;
  transform: translateY(12px);
  transition: all 0.3s ease;
}

.srv-card:hover .srv-card__overlay-btn {
  transform: translateY(0);
}

.srv-card__body {
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.srv-card__title {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-navy, #0f172a);
  text-transform: uppercase;
  letter-spacing: 0.2px;
  margin: 0 0 10px 0;
  line-height: 1.45;
  min-height: 46px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.srv-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.srv-card:hover .srv-card__title a {
  color: var(--accent-gold, #f59e0b);
}

.srv-card__desc {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 18px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 64px;
  flex: 1;
}

.srv-card__footer {
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.srv-card__action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #d97706;
  text-decoration: none;
  background: rgba(245, 158, 11, 0.12);
  padding: 5px 11px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.srv-card:hover .srv-card__action-btn {
  background: var(--accent-gold, #f59e0b);
  color: var(--primary-navy, #0f172a);
}

.srv-card__proj-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s ease;
}

.srv-card:hover .srv-card__proj-btn {
  color: var(--primary-navy, #0f172a);
  gap: 8px;
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .news-detail-section {
    padding: 45px 0 65px;
  }
  .srv-grid--3cols {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .news-detail-section {
    padding: 34px 0 50px;
  }
  .news-detail-title {
    font-size: 24px;
    margin-bottom: 16px;
  }
  .news-detail-lead {
    font-size: 15px;
    padding: 12px 16px;
    margin-bottom: 22px;
  }
  .news-detail-img {
    max-height: 280px;
    margin-bottom: 24px;
    border-radius: 10px;
  }
  .news-detail-body {
    font-size: 15.5px;
    line-height: 1.75;
  }
  .news-detail-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .news-detail-share {
    width: 100%;
    justify-content: flex-start;
  }
  .srv-grid--3cols {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .news-related-title {
    font-size: 20px;
  }
  .news-detail-related {
    margin-top: 50px;
    padding-top: 36px;
  }
}
