/* ============================================================
   FWP — Blog stylesheet
   Kế thừa design system của fwp.vn
   Lưu ý: Bebas Neue KHÔNG hỗ trợ dấu tiếng Việt.
   → Chỉ dùng Bebas cho chữ Latin không dấu (vd "BLOG").
   → Toàn bộ tiêu đề tiếng Việt dùng DM Sans.
   ============================================================ */

:root {
  --blue: #1C2FE8;
  --blue-light: #3A50FF;
  --black: #0A0A0A;
  --white: #F5F4F0;
  --gray: #8A8A8A;
  --gray-light: #1A1A1A;
  --line: rgba(245, 244, 240, 0.06);
  --line-strong: rgba(245, 244, 240, 0.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

/* ---------------- NAV ---------------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 28px 60px;
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: center;
  align-items: center;
}
nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.6) 60%, transparent 100%);
  z-index: -1;
}
.nav-logo img { height: 64px; width: auto; display: block; }
.nav-links {
  display: -webkit-flex;
  display: flex;
  gap: 40px;
  list-style: none;
  -webkit-align-items: center;
  align-items: center;
}
.nav-links a {
  color: rgba(245,244,240,0.65);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--white); }
.nav-cta {
  background: var(--blue);
  color: var(--white) !important;
  padding: 10px 22px !important;
  border-radius: 2px;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--blue-light) !important; }

/* ---------------- SHARED ---------------- */
.wrap { padding: 0 60px; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-light);
  font-weight: 500;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--blue);
  display: inline-block;
}

/* ---------------- BLOG INDEX HERO ---------------- */
.blog-hero {
  padding: 180px 60px 64px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse 60% 70% at 85% 20%, rgba(28,47,232,0.10) 0%, transparent 60%), var(--black);
}
.blog-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(64px, 9vw, 132px);
  line-height: 0.92;
  letter-spacing: 0.005em;
  margin-top: 20px;
}
.blog-hero p {
  margin-top: 20px;
  max-width: 620px;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(245,244,240,0.62);
}

/* ---------------- FILTER ---------------- */
.blog-filter {
  padding: 28px 60px;
  border-bottom: 1px solid var(--line);
  display: -webkit-flex;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.blog-filter button {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: rgba(245,244,240,0.6);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
}
.blog-filter button:hover { color: var(--white); border-color: rgba(245,244,240,0.35); }
.blog-filter button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* ---------------- POST GRID ---------------- */
.blog-grid {
  padding: 64px 60px 120px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}
.post-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #101010;
  transition: transform 0.28s ease, border-color 0.28s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(28,47,232,0.5);
}
.post-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #161616;
}
.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.post-card:hover .post-card-media img { transform: scale(1.04); }
.post-card-media .no-img {
  position: absolute;
  inset: 0;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 40px;
  color: rgba(245,244,240,0.14);
  letter-spacing: 0.08em;
}
.post-card-cat {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(10,10,10,0.82);
  border: 1px solid rgba(245,244,240,0.14);
  color: var(--white);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 2px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.post-card-info { padding: 22px 22px 26px; }
.post-card-meta {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.34);
  margin-bottom: 12px;
}
.post-card-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0.005em;
  color: var(--white);
  margin-bottom: 10px;
}
.post-card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(245,244,240,0.52);
}
.blog-empty {
  padding: 120px 60px;
  text-align: center;
  color: rgba(245,244,240,0.4);
}

/* ---------------- POST PAGE ---------------- */
.post-hero {
  padding: 160px 60px 0;
  max-width: 860px;
  margin: 0 auto;
}
.post-back {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.45);
  text-decoration: none;
  transition: color 0.2s;
}
.post-back:hover { color: var(--white); }
.post-hero h1 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.16;
  letter-spacing: -0.005em;
  margin: 24px 0 20px;
}
.post-meta {
  display: -webkit-flex;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.38);
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.post-meta .cat { color: var(--blue-light); }

.post-cover {
  width: 100%;
  margin: 48px 0 0;
  padding: 0;
}
.post-cover img {
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: cover;
  display: block;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Nội dung bài viết */
.post-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 60px 96px;
  font-size: 17px;
  line-height: 1.75;
  color: rgba(245,244,240,0.82);
}
.post-body > * + * { margin-top: 1.3em; }
.post-body h2 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.3;
  color: var(--white);
  margin-top: 2.4em;
  letter-spacing: 0.002em;
}
.post-body h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 21px;
  line-height: 1.35;
  color: var(--white);
  margin-top: 2em;
}
.post-body p { font-weight: 300; }
.post-body strong { font-weight: 500; color: var(--white); }
.post-body a {
  color: var(--blue-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(58,80,255,0.4);
}
.post-body a:hover { border-bottom-color: var(--blue-light); }
.post-body ul, .post-body ol { padding-left: 24px; }
.post-body li + li { margin-top: 0.5em; }
.post-body img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* ---- Media tràn rộng hơn cột chữ ---- */
.post-body .video-embed,
.post-body p > img,
.post-body figure {
  width: min(1040px, 100vw - 48px);
  margin-left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  margin-top: 2.4em;
  margin-bottom: 2.4em;
}

.post-body .video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.post-body .video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Chú thích ảnh: dùng alt text */
.post-body p > img + em,
.post-body figcaption {
  display: block;
  font-size: 13px;
  color: rgba(245, 244, 240, 0.4);
  margin-top: 10px;
  font-style: normal;
}
.post-body blockquote {
  border-left: 2px solid var(--blue);
  padding: 4px 0 4px 24px;
  color: var(--white);
  font-size: 20px;
  line-height: 1.55;
  font-weight: 300;
}
.post-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.6em 0;
}
.post-body code {
  background: var(--gray-light);
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 15px;
}
.post-body pre {
  background: var(--gray-light);
  padding: 20px;
  border-radius: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
}
.post-body pre code { background: none; padding: 0; }
.post-body figure figcaption {
  font-size: 13px;
  color: rgba(245,244,240,0.4);
  margin-top: 10px;
}

.post-tags {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 60px 80px;
  display: -webkit-flex;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.post-tags span {
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.45);
  border: 1px solid var(--line-strong);
  padding: 6px 12px;
  border-radius: 2px;
}

/* CTA cuối bài */
.post-cta {
  padding: 72px 60px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  background: radial-gradient(ellipse 50% 100% at 50% 0%, rgba(28,47,232,0.10) 0%, transparent 70%);
}
.post-cta h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  margin-bottom: 18px;
}
.post-cta p {
  color: rgba(245,244,240,0.55);
  max-width: 480px;
  margin: 0 auto 28px;
  font-size: 16px;
  line-height: 1.6;
}
.btn-primary {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
  padding: 15px 34px;
  border-radius: 2px;
  font-size: 13px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--blue-light); }

/* Bài liên quan */
.related {
  padding: 80px 60px 110px;
}
.related h2 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 24px;
  margin: 18px 0 36px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ---------------- FOOTER ---------------- */
footer {
  padding: 48px 60px;
  border-top: 1px solid var(--line);
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: center;
  align-items: center;
}
.footer-left img { height: 24px; width: auto; display: block; }
.footer-right {
  font-size: 12px;
  color: rgba(245,244,240,0.3);
  text-align: right;
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1024px) {
  .blog-grid, .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  nav { padding: 18px 24px; }
  .nav-logo img { height: 42px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 11px; letter-spacing: 0.05em; }
  .nav-links .hide-sm { display: none; }
  .nav-cta { padding: 8px 14px !important; }

  .wrap, .blog-filter, .post-cta, .related { padding-left: 24px; padding-right: 24px; }
  .blog-hero { padding: 130px 24px 48px; }
  .blog-grid { padding: 44px 24px 80px; grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .post-hero { padding: 120px 24px 0; }
  .post-body { padding: 40px 24px 72px; font-size: 16px; }
  .post-tags { padding: 0 24px 60px; }
  .post-body h2 { font-size: 24px; }
  .post-body h3 { font-size: 19px; }

  .post-body .video-embed,
  .post-body p > img,
  .post-body figure { width: calc(100vw - 48px); }

  footer { flex-direction: column; gap: 16px; text-align: center; }
  .footer-right { text-align: center; }
}

@media (max-width: 600px) {
  nav { padding: 14px 18px; }
  .nav-logo img { height: 32px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 10px; }
  .nav-links .hide-xs { display: none; }
  .nav-cta { padding: 7px 12px !important; }

  .blog-hero { padding: 110px 20px 40px; }
  .blog-hero h1 { font-size: clamp(52px, 16vw, 80px); }
  .blog-hero p { font-size: 15px; }
  .blog-grid { padding: 36px 20px 64px; gap: 28px; }
  .post-hero { padding: 100px 20px 0; }
  .post-body { padding: 36px 20px 64px; }
  .post-tags { padding: 0 20px 48px; }
  .post-cta { padding: 56px 20px; }
  .related { padding: 60px 20px 80px; }
  .blog-filter { padding: 22px 20px; }
  .post-cover img { max-height: 56vh; }
  .post-body .video-embed,
  .post-body p > img,
  .post-body figure { width: calc(100vw - 40px); }
}
