/* =========================================================
   CREDENT - Trang Chi tiết bài viết (PC)
   Dùng chung cho tin tức & lĩnh vực hoạt động
   Dùng lại: .page-banner (gioi-thieu.css), .ld-post (chi-tiet-luat-su.css), .slider/.dots/.btn (style.css)
   ========================================================= */

.post-page { padding: 82px 0 120px; }
.post-page__inner { width: 1200px; margin-left: calc(50% - 596px); }
.post-layout { display: flex; align-items: flex-start; gap: 24px; }

/* ---------- Nội dung bài viết ---------- */
.post { flex: none; width: 792px; display: flex; flex-direction: column; gap: 48px; }
.post__hero { height: 469px; overflow: hidden; border-radius: 8px; background: #fffffe; }
.post__hero img { width: 100%; height: 100%; object-fit: cover; }
.post__content { display: flex; flex-direction: column; gap: 24px; }
.post__head { display: flex; flex-direction: column; gap: 12px; }
.post__cat { font-size: 16px; font-weight: 500; line-height: 21px; letter-spacing: .16px; color: #a0a0a0; }
.post__title { font-size: 36px; font-weight: 600; line-height: 47px; color: var(--black); }
.post__sapo { margin-top: 11px; padding: 15px 30px; border-radius: 6px; background: #f3f3f3; }
.post__sapo p { width: 730px; font-size: 18px; font-weight: 600; font-style: italic; line-height: 23px; color: #565656; }
.post__lead { margin-top: 8px; width: 788px; font-size: 14px; line-height: 18px; color: #565656; text-align: justify; }
.post__figure { margin: 0; aspect-ratio: 1984 / 1116; overflow: hidden; }
.post__figure img { width: 100%; height: 100%; object-fit: cover; }
.post__body { display: flex; flex-direction: column; gap: 24px; }
.post__body p { font-size: 13px; line-height: 18px; color: #726c68; text-align: justify; }
.post__body p + p { margin-top: -6px; }
.post__body h3 { font-size: 22px; font-weight: 600; line-height: 26px; color: var(--black); }
.post__body .post__text-md { margin-top: 0; font-size: 14px; }
.post__share { display: flex; align-items: center; gap: 16px; font-size: 12px; font-weight: 500; line-height: 14px; letter-spacing: .6px; color: #726c68; }
.post__share > span { width: 95px; }
.post__share-btn {
  width: 16.5px;
  height: 16.5px;
  margin-right: -11px;
  background: url("../images/chi-tiet-bai-viet/share.svg") 0 0 / 38px 16.5px no-repeat;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.post__share-btn--zalo { background-position: -21.5px 0; }
.post__share-btn:hover { opacity: .75; transform: translateY(-2px); }

/* ---------- Sidebar ---------- */
.post-side { flex: none; width: 384px; display: flex; flex-direction: column; gap: 63px; }
.post-side__top { display: flex; flex-direction: column; gap: 20px; }

.zalo-card { position: relative; height: 334px; }
.zalo-card__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 2px;
  height: 161px;
}
.zalo-card__grid::after { content: ""; position: absolute; inset: 0; background: rgba(17, 34, 58, .35); }
.zalo-card__g { position: relative; overflow: hidden; background: #d9d9d9; }
.zalo-card__g img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.zalo-card__g--1 { grid-area: 1 / 1; }
.zalo-card__g--2 { grid-area: 1 / 2 / span 2; }
.zalo-card__g--3 { grid-area: 2 / 1; }
.zalo-card__g--4 { grid-area: 1 / 3 / span 2 / span 2; }
.zalo-card__g--5 { grid-area: 3 / 4; }
.zalo-card__g--6 { grid-area: 3 / 1 / auto / span 2; }
.zalo-card__g--7 { grid-area: 3 / 3; }
.zalo-card::after { content: ""; display: block; height: 173px; border-bottom-left-radius: 20px; background: var(--navy-12); }
.zalo-card__qr { position: absolute; left: 20px; top: 17px; z-index: 1; width: 128px; height: 128px; image-rendering: pixelated; }
.zalo-card__text { position: absolute; left: 20px; top: 182px; z-index: 1; width: 345px; display: flex; flex-direction: column; gap: 4px; color: #fffffe; }
.zalo-card__title { font-size: 26px; font-weight: 700; line-height: 34px; }
.zalo-card__desc { font-size: 16px; line-height: 21px; text-align: justify; }
.zalo-card__desc a { font-weight: 700; text-decoration: underline; text-decoration-thickness: .05em; transition: color .3s var(--ease); }
.zalo-card__desc a:hover { color: var(--gold); }

.post-side__actions { display: flex; align-items: center; gap: 27px; }
.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 100px;
  background: var(--navy-12);
  font-size: 15px;
  font-weight: 600;
  line-height: 19px;
  color: var(--white);
  white-space: nowrap;
  transition: background-color .3s var(--ease);
}
.call-btn img { width: 16px; height: 16px; }
.call-btn:hover { background: var(--gold); }
.post-side__links { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 500; line-height: 17px; white-space: nowrap; }
.post-side__links a { color: var(--gold); text-decoration: underline; text-decoration-thickness: .05em; transition: color .3s var(--ease); }
.post-side__links a:hover { color: var(--gold-15); }

.post-side__bottom { display: flex; flex-direction: column; gap: 32px; }
.side-cats { display: flex; flex-direction: column; gap: 22px; padding: 22px; border: 1px solid var(--gold); border-radius: 6px; background: var(--white); }
.side-cats__title { height: 31px; font-size: 26px; font-weight: 600; line-height: 34px; color: var(--n-1400); }
.side-cats__list { width: 206px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.side-cats__list a { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; line-height: 17px; color: #1c1c1c; transition: color .3s var(--ease); }
.side-cats__item--1 a { align-items: flex-end; }
.side-cats__list a:hover { color: var(--gold); }
.side-cats__icon { position: relative; flex: none; width: 15px; height: 15px; overflow: hidden; }
.side-cats__icon img { position: absolute; display: block; max-width: none; width: auto; height: auto; }
.side-cats__item--1 .side-cats__icon { margin-bottom: 0; }

/* Form đăng ký */
.side-form { display: flex; flex-direction: column; align-items: flex-end; gap: 32px; }
.side-form__box { width: 100%; height: 502px; padding: 30px 20px; display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--gold); border-radius: 6px; }
.side-form__title { font-size: 26px; font-weight: 600; line-height: 34px; color: var(--n-1400); text-align: center; }
.side-form__title em { display: block; font-family: var(--serif); font-weight: 400; font-style: italic; color: var(--gold); }
.side-form__fields { display: flex; flex-direction: column; gap: 8px; }
.side-field { display: flex; flex-direction: column; gap: 8px; padding: 5px 0; border-bottom: .5px solid #a0a0a0; }
.side-field__label { font-size: 13px; font-weight: 500; line-height: 17px; color: #373737; }
.side-field input,
.side-field textarea {
  width: 100%;
  height: 14.7px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: .22px;
  color: var(--n-1400);
  outline: none;
  resize: none;
}
.side-field input::placeholder { color: rgba(0, 0, 0, .45); }
.side-field--area textarea { height: 32.7px; font-size: 12px; line-height: 16px; letter-spacing: .6px; }
.side-field--area textarea::placeholder { font-style: italic; color: rgba(0, 0, 0, .45); }
.side-field:focus-within { border-bottom-color: var(--gold); }
.side-field--select { gap: 12px; border-bottom: 0; }
.side-field--select select {
  width: 130px;
  height: 35px;
  padding: 0 24px 0 12px;
  border: 0;
  border-radius: 40px;
  background: #f3f3f3 url("../images/chi-tiet-bai-viet/down.svg") right 14.5px center / 5.6px 3.2px no-repeat;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 17px;
  color: #5e5e5e;
  text-align: center;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: background-color .3s var(--ease);
}
.side-field--select select:hover { background-color: #ebebeb; }

/* ---------- Tin tức nổi bật ---------- */
.post-hot { margin-top: 73px; display: flex; flex-direction: column; gap: 38px; }
.post-hot__title,
.post-related__title { font-size: 32px; font-weight: 500; line-height: 38px; color: var(--n-1400); }
.post-hot__box { width: 1196px; padding: 29px 49px; display: flex; align-items: center; gap: 24px; border: 1px solid var(--gold); border-radius: 8px; }
.post-hot__item { flex: none; width: 534px; display: flex; align-items: center; gap: 24px; }
.post-hot__item--2 { width: 538px; }
.post-hot__num { flex: none; font-family: var(--serif); font-size: 64px; font-weight: 900; font-style: italic; line-height: 90px; color: var(--gold); white-space: nowrap; }
.post-hot__name { width: 436px; height: 93px; display: flex; align-items: center; font-size: 26px; font-weight: 600; line-height: 34px; color: var(--navy-12); transition: color .3s var(--ease); }
.post-hot__item--2 .post-hot__name { width: 443px; }
.post-hot__item:hover .post-hot__name { color: var(--gold); }

/* ---------- Bài viết liên quan ---------- */
.post-related { margin-top: 80px; display: flex; flex-direction: column; gap: 40px; }
.post-related__slider { width: 1200px; }
.post-related__slider .slider__track { align-items: flex-start; }
.post-related .ld-post__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }

/* =========================================================
   RESPONSIVE - Trang Chi tiết bài viết
   ========================================================= */
@media (max-width: 1239px) {
  .post-page__inner { width: calc(100% - 64px); margin: 0 auto; }
  .post { flex: 1; width: auto; min-width: 0; }
  .post-side { width: 340px; }
  .post__sapo p,
  .post__lead { width: auto; }
  .zalo-card__text { right: 20px; width: auto; }
  .zalo-card__desc { font-size: 15px; line-height: 20px; }
  .post-side__actions { flex-wrap: wrap; gap: 14px 20px; }
  .side-cats__list { width: auto; }
  .post-hot__box { width: auto; padding: 29px 32px; }
  .post-hot__item,
  .post-hot__item--2 { flex: 1; width: auto; min-width: 0; }
  .post-hot__name,
  .post-hot__item--2 .post-hot__name { flex: 1; width: auto; min-width: 0; height: auto; font-size: 22px; line-height: 29px; }
  .post-related__slider { width: 100%; }
  .post-related .ld-post:nth-child(n+4) { display: flex; }
}

@media (max-width: 1023px) {
  /* Xếp dọc: bài viết → tin nổi bật → liên quan → sidebar */
  .post-page__inner { display: flex; flex-direction: column; }
  .post-layout { display: contents; }
  .post { order: 1; flex: none; width: 100%; }
  .post-hot { order: 2; margin-top: 100px; }
  .post-related { order: 3; margin-top: 58px; }
  .post-side {
    order: 4;
    width: 100%;
    margin-top: 100px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .post-side__bottom { gap: 24px; }
  .post-hot__box { flex-direction: column; align-items: stretch; padding: 16px 24px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .post-side__top { gap: 20px; }
}

/* ---------- MOBILE (Figma 402px) ---------- */
@media (max-width: 767px) {
  .post-page { padding: 0 0 120px; }
  .post-page__inner { width: calc(100% - 32px); }
  .post { gap: 58px; }
  .post__hero { height: auto; aspect-ratio: 402 / 239; margin: 0 -16px; }
  .post__title { font-size: 26px; line-height: 34px; }
  .post__sapo { padding: 12px; }
  .post__body h3 { font-size: 22px; line-height: 26px; }

  .post-hot { gap: 40px; }
  .post-related .ld-post:nth-child(n+4) { display: none; }
  .post-hot__box { gap: 24px; padding: 15px 11px; border-radius: 6px; }
  .post-hot__item,
  .post-hot__item--2 { flex: none; gap: 24px; }
  .post-hot__name,
  .post-hot__item--2 .post-hot__name { height: 93px; font-size: 18px; line-height: 23px; }

  .post-side { display: flex; flex-direction: column; gap: 58px; }
  .post-side__bottom { gap: 32px; }
  .zalo-card__grid { grid-template-columns: 91fr 91fr 91fr 91fr; }
  .zalo-card__qr { left: 23px; top: 24px; width: 107px; height: 107px; image-rendering: auto; }
  .zalo-card__text { left: 18px; top: 181px; right: 21px; }
  .zalo-card__desc { font-size: 16px; line-height: 21px; }
  .post-side__actions { flex-wrap: nowrap; gap: 26px; }
  .call-btn { padding: 8px 12px; }
  .post-side__links { gap: 12px; }
}
@media (max-width: 400px) {
  .post-side__actions { flex-wrap: wrap; gap: 14px 20px; }
}
