/* ============================================================================
   Blog — news index and article pages
   ========================================================================= */

/* ------------------------------------------------------------ news index - */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.post-card {
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--t), transform var(--t);
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.post-card-media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--surface-3);
}
.post-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow);
}
.post-card:hover .post-card-media img { transform: scale(1.05); }

.post-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1 1 auto; }

.post-cat {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), .08);
  padding: 3px 9px;
  margin-bottom: 10px;
}

.post-card h3 {
  font-size: 16.56px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
}
.post-card h3 a:hover { color: var(--primary); }
.post-card p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-3);
  margin: 0 0 14px;
}
.post-meta {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.post-meta .dot { opacity: .5; }
.post-meta-head { margin-top: 6px; gap: 10px; }
.post-meta-head .post-cat { margin-bottom: 0; }

/* ------------------------------------------------------------- article --- */

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}

.post-body {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 780px;
}
.post-hero {
  width: 100%;
  height: auto;
  margin-bottom: 26px;
}
.post-body h2 {
  font-size: 23px;
  line-height: 1.35;
  color: var(--ink);
  margin: 34px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.post-body h3 {
  font-size: 18.5px;
  color: var(--ink);
  margin: 26px 0 10px;
}
.post-body h4 { font-size: 16.5px; color: var(--ink); margin: 22px 0 8px; }
.post-body p { margin: 0 0 1.05em; }
.post-body a { color: var(--primary); text-decoration: underline; }

.post-list { margin: 0 0 1.2em; padding-left: 0; list-style: none; }
.post-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  line-height: 1.75;
}
.post-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.post-figure { margin: 22px 0; }
.post-figure img { width: 100%; height: auto; }

/* --------------------------------------------------------------- sidebar - */

.post-side { display: flex; flex-direction: column; gap: 22px; }
.side-box {
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 18px;
}
.side-box h5 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
}
.side-product {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.side-product:last-child { border-bottom: 0; }
.side-product img { width: 60px; height: 60px; object-fit: cover; background: #fff; flex-shrink: 0; }
.side-product-title {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
  margin-bottom: 3px;
}
.side-product:hover .side-product-title { color: var(--primary); }
.side-product-price { font-size: 13px; font-weight: 700; color: var(--price); }
.side-post {
  display: block;
  font-size: 13.5px;
  line-height: 1.5;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.side-post:last-child { border-bottom: 0; }
.side-post:hover { color: var(--primary); }
.side-cta p { font-size: 13.5px; color: var(--ink-3); margin: 0; line-height: 1.6; }
.side-cta a { color: var(--primary); font-weight: 700; }

/* ------------------------------------------------------------ responsive - */

@media (max-width: 1100px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 26px; }
}
@media (max-width: 849px) {
  .post-grid { grid-template-columns: 1fr; gap: 22px; }
  .post-layout { grid-template-columns: 1fr; gap: 30px; }
  .post-side { position: static; }
  .post-body { font-size: 15px; }
  .post-body h2 { font-size: 20px; }
}

/* ---- news index, matched to the source layout ---- */
.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 34px;
  align-items: start;
  padding-bottom: 50px;
}
.news-main .post-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-main .post-card-body { text-align: center; }
.news-main .post-card h3 { font-size: 15px; }
.news-main .is-divider {
  width: 46px;
  height: 2px;
  background: var(--line-2);
  margin: 8px auto 10px;
}
.news-main .post-card p .more { color: var(--ink-3); }
.news-main .post-card p .more:hover { color: var(--primary); }

.side-box-gold h5 {
  background: var(--cat-trigger-bg);
  color: #fff;
  margin: -18px -18px 14px;
  padding: 10px 16px;
  border-bottom: 0;
  text-align: center;
}
.side-news {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
}
.side-news:last-child { border-bottom: 0; }
.side-news img { width: 60px; height: 60px; object-fit: cover; flex-shrink: 0; background: #f4f4f4; }
.side-news:hover { color: var(--primary); }

@media (max-width: 1100px) {
  .news-main .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 849px) {
  .news-layout { grid-template-columns: 1fr; }
  .news-main .post-grid { grid-template-columns: 1fr; }
}

/* ---- post head, centred like the source ---- */
.post-head {
  padding: 34px 0 8px;
  text-align: center;
}
.post-head-cat {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.post-head h1 {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 auto 10px;
  max-width: 860px;
  color: var(--ink);
}
.post-head-meta {
  font-size: 11.5px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ============================================================================
   "Tin tức mới nhất" sidebar widget — measured from the source:
   column 300px with 30px side padding → widget 240px; title is a 44px
   gradient bar (16px/600 uppercase white, padding 15px 0 12px); each item is a
   flex row with a 45×45 thumbnail, a 15px gap and a 16px/19.2px link.
   ========================================================================= */

.post-side,
.static-side { padding: 0 30px; }

.side-widget { margin-bottom: 24px; }
.side-widget ul { padding: 0 6px; }
.side-widget li { list-style: none; }

.side-widget-title {
  display: block;
  width: 100%;
  padding: 15px 0 12px;
  background: linear-gradient(to right top, #f1d04f, #c38b3b, #f1d04f);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 16.8px;
  text-transform: uppercase;
  text-align: center;
}

.side-news-row {
  display: flex;
  align-items: flex-start;
  padding: 10px 0;
}
.side-news-thumb {
  width: 45px;
  height: 45px;
  margin-right: 15px;
  flex-shrink: 0;
}
.side-news-img {
  width: 45px;
  height: 45px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface-3);
}
.side-news-text { flex: 1 1 auto; min-width: 0; }
.side-news-text a {
  display: block;
  font-size: 16px;
  line-height: 19.2px;
  margin-bottom: 6px;
  color: var(--ink);
}
.side-news-text a:hover { color: var(--primary); }

@media (max-width: 849px) {
  .post-side, .static-side { padding: 0; }
}

/* Sidebar column keeps the source's 30px bottom padding. */
.post-side, .static-side { padding: 0 30px 30px; }
@media (max-width: 849px) {
  .post-side, .static-side { padding: 0 0 24px; }
}

/* ---- single post: 1200px row, shadowed article card, news rail ---- */
.post-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 0 60px;
}
.post-main { min-width: 0; padding: 0 30px; }
.post-card {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  padding: 30px;
}
.post-head { text-align: center; margin-bottom: 26px; }
.post-head h1 { margin-bottom: 8px; }
.post-body {
  font-size: 16px;
  line-height: 25.6px;
  color: var(--ink);
  max-width: none;
}
.post-body p { margin: 0 0 20.8px; }

@media (max-width: 1100px) {
  .post-shell { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 849px) {
  .post-shell { grid-template-columns: 1fr; gap: 26px; }
  .post-main { padding: 0 15px; }
  .post-card { padding: 20px 18px 22px; }
}
