/* =====================================================================
 *  KHỐI CHÍNH SÁCH (Liên hệ) & HƯỚNG DẪN ĐÓNG GÓI (Tin tức)
 *  Thẻ tóm tắt + chi tiết xếp gọn. Rộng đúng khung .nt-container (thẳng mép header);
 *  đoạn văn tối đa 760px cho dễ đọc. Tắt JS: hiện toàn bộ, mục <details> vẫn bấm mở được.
 * ===================================================================== */
.ntp {
  --ntp-navy: #0b2a5b;
  --ntp-red: #d71920;
  --ntp-ink: #334155;
  --ntp-line: #dfe6f0;
  font-size: 1rem;
  line-height: 1.7;
}
.ntp .nt-section-head { max-width: none; }
.ntp .nt-section-title { color: var(--ntp-navy); }
.ntp [hidden] { display: none !important; }

/* --- Biểu tượng --- */
.ntp-ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #fdecee;
  color: var(--ntp-red);
}
.ntp-ico svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ntp-ico--sm { width: 44px; height: 44px; border-radius: 12px; }
.ntp-ico--sm svg { width: 22px; height: 22px; }

/* --- Thẻ tóm tắt: 3 cột / 2 cột / 1 cột --- */
.ntp-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.ntp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--ntp-line);
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(11, 42, 91, .05);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ntp-card:hover { border-color: #b9c8de; box-shadow: 0 12px 28px rgba(11, 42, 91, .1); }
.ntp-card.is-active { border-color: var(--ntp-navy); box-shadow: 0 0 0 2px var(--ntp-navy) inset, 0 12px 28px rgba(11, 42, 91, .1); }
.ntp-card__title { margin: 4px 0 0; font-size: 1.25rem; line-height: 1.35; color: var(--ntp-navy); }
.ntp-card__sum {
  margin: 0;
  color: var(--ntp-ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.ntp-card__btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 4px;
  padding: 0 18px;
  border: 1.5px solid var(--ntp-navy);
  border-radius: 10px;
  color: var(--ntp-navy);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.ntp-card__btn::after { content: ""; position: absolute; inset: 0; border-radius: 18px; } /* cả thẻ bấm được */
.ntp-card__btn:hover, .ntp-card.is-active .ntp-card__btn { background: var(--ntp-navy); color: #fff; }
.ntp-card__btn:focus-visible, .ntp-tool:focus-visible, .ntp-acc__item > summary:focus-visible {
  outline: 3px solid #f2b8bb;
  outline-offset: 2px;
}
.ntp-card__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.ntp-card.is-active .ntp-card__btn svg { transform: rotate(90deg); }

/* --- Phần chi tiết: cùng lưới với thẻ, chiếm cả hàng, nằm sau mọi thẻ (order) --- */
.ntp-cards > .ntp-panel { grid-column: 1 / -1; order: 1; }
.ntp-panel,
.ntp-pack {
  background: #fff;
  border: 1px solid var(--ntp-line);
  border-radius: 18px;
  padding: 28px 32px;
  scroll-margin-top: var(--nt-header-offset, 96px);
}
.ntp-panel { position: relative; }
.ntp-alias { position: absolute; top: 0; left: 0; }
/* Script riêng chạy được (gắn .ntp-js): chỉ hiện phần đang mở. Không JS hoặc script lỗi: hiện tất cả. */
.ntp-js .ntp-panel:not(.is-open) { display: none; }
.ntp-panel__head,
.ntp-pack__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 16px;
  margin-bottom: 16px;
}
.ntp-panel__head h3 { flex: 1; margin: 0; font-size: 1.375rem; color: var(--ntp-navy); }
.ntp-pack__text { flex: 1; min-width: 240px; }
.ntp-pack__text .nt-section-title { margin-bottom: 4px; }
.ntp-pack__text .nt-section-desc { margin: 0; }
.ntp-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.ntp-tool {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ntp-line);
  border-radius: 10px;
  background: #f5f8fc;
  color: var(--ntp-navy);
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
}
.ntp-tool:hover { border-color: var(--ntp-navy); background: #fff; }
.ntp-panel__intro { max-width: 760px; color: var(--ntp-ink); margin-bottom: 8px; }
.ntp-panel__intro p, .ntp-acc__body p { margin: 0 0 12px; }

/* --- Mục xếp gọn --- */
.ntp-acc { border-top: 1px solid var(--ntp-line); }
.ntp-acc__item { border-bottom: 1px solid var(--ntp-line); scroll-margin-top: var(--nt-header-offset, 96px); }
.ntp-acc__item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 4px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ntp-navy);
  cursor: pointer;
  list-style: none;
}
.ntp-acc__item > summary::-webkit-details-marker { display: none; }
.ntp-acc__item > summary:hover { color: var(--ntp-red); }
.ntp-acc__item > summary svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.ntp-acc__item[open] > summary svg { transform: rotate(180deg); color: var(--ntp-red); }
.ntp-acc__body { max-width: 760px; padding: 0 4px 16px; color: var(--ntp-ink); }
.ntp-note { margin-top: 24px; }

/* --- Máy tính bảng / điện thoại --- */
@media (max-width: 1023px) {
  .ntp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .ntp-cards { grid-template-columns: 1fr; gap: 16px; }
  .ntp-cards > .ntp-panel { order: 0; }            /* điện thoại: chi tiết ngay dưới thẻ vừa bấm */
  .ntp-pack__head { flex-direction: column; align-items: flex-start; }
  .ntp-pack__text { min-width: 0; }
  .ntp-card { padding: 20px; }
  .ntp-panel, .ntp-pack { padding: 20px 16px; border-radius: 14px; }
  .ntp-panel__head h3 { font-size: 1.2rem; }
  .ntp-pack__head .ntp-ico { width: 48px; height: 48px; }
  .ntp-acc__item > summary { font-size: 1.0625rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ntp-card, .ntp-card__btn svg, .ntp-acc__item > summary svg { transition: none; }
}

/* --- In trang: mở hết, bỏ nút --- */
@media print {
  .ntp .ntp-panel { display: block !important; break-inside: auto; }
  .ntp-card__btn, .ntp-tools { display: none !important; }
  .ntp-card__sum { -webkit-line-clamp: unset; display: block; }
  .ntp-acc__item > summary svg { display: none; }
}
