/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Visually hidden H1 for SEO (screen readers + crawlers can see it) */
.vh-h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #1a1a2e;
  background: #f8f9fb;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== VARIABLES ===== */
:root {
  --primary: #ea580c;
  --primary-dark: #c2410c;
  --accent: #fbbf24;
  --accent-dark: #d97706;
  --green: #10b981;
  --red: #ef4444;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 8px rgba(0,0,0,.06);
  --shadow-hover: 0 8px 28px rgba(0,0,0,.12);
  --max-w: 1200px;
}

/* ===== LAYOUT ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }

/* ===== TYPOGRAPHY ===== */
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { color: var(--text-muted); }

/* ===== HEADER / NAV ===== */
header {
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
nav { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 1.25rem; font-weight: 900; color: var(--primary); display: flex; align-items: center; gap: 6px; }
.logo span { color: var(--accent-dark); }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  font-size: .875rem; font-weight: 500; color: var(--text-muted);
  padding: 6px 12px; border-radius: 8px; transition: all .2s;
}
.nav-links a:hover { color: var(--primary); background: #fff7ed; }
.hamburger { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; font-size: 1.1rem; cursor: pointer; padding: 6px 10px; color: var(--text); }

/* ===== HERO (NEW DARK DESIGN) ===== */
.hero {
  background: #0f172a;
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(234,88,12,.18) 0%, transparent 65%);
  top: -200px; right: -100px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(251,191,36,.07) 0%, transparent 65%);
  bottom: -150px; left: -50px;
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-left {}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(234,88,12,.12);
  border: 1px solid rgba(234,88,12,.25);
  color: #fb923c;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 50px;
  margin-bottom: 22px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: #fb923c; }
.hero-desc {
  color: rgba(255,255,255,.6);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 440px;
}
.hero-pills {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.hero-pill {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.75);
  padding: 7px 16px; border-radius: 50px;
  font-size: .82rem; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.hero-pill strong { color: #fb923c; }

/* Hero right — floating article cards */
.hero-right {
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
}
.hero-float-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 16px 18px;
  backdrop-filter: blur(4px);
  transition: all .3s;
}
.hero-float-card:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(234,88,12,.35);
  transform: translateX(4px);
}
.hfc-tag { font-size: .72rem; font-weight: 700; color: #fb923c; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; }
.hfc-vs {
  font-size: .95rem; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.hfc-vs em { font-style: normal; font-size: .72rem; background: rgba(234,88,12,.25); color: #fb923c; padding: 2px 8px; border-radius: 50px; font-weight: 900; }
.hfc-meta { font-size: .78rem; color: rgba(255,255,255,.45); display: flex; align-items: center; gap: 8px; }
.hfc-winner { color: #34d399; font-weight: 600; }

/* ===== FILTER BAR ===== */
.filter-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 60px; z-index: 90;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.filter-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.ftab {
  padding: 14px 18px;
  font-size: .85rem; font-weight: 600;
  color: var(--text-muted);
  border: none; border-bottom: 2px solid transparent;
  background: none; cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  display: flex; align-items: center; gap: 5px;
}
.ftab span {
  font-size: .72rem; background: #f1f5f9; color: var(--text-muted);
  padding: 1px 7px; border-radius: 50px; font-weight: 700;
}
.ftab:hover { color: var(--primary); background: #fff7ed; }
.ftab.active { color: var(--primary); border-bottom-color: var(--primary); }
.ftab.active span { background: #fff7ed; color: var(--primary); }

/* ===== ARTICLES SECTION ===== */
.articles-section { padding: 40px 0 64px; }
.articles-section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px;
}
.articles-section-head h2 { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.articles-section-head p { font-size: .85rem; color: var(--text-muted); margin-top: 3px; }
.result-count { font-size: .85rem; color: var(--text-muted); font-weight: 500; }

/* ===== ARTICLE CARDS (NEW COMPACT) ===== */
/* ===== HERO COVER IMAGE ===== */
.hero-cover-img {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  aspect-ratio: 14/5;
}
.hero-cover-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* ===== ARTICLE THUMB BANNER ===== */
.article-thumb-banner {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  aspect-ratio: 16/6;
  background: #0f172a;
}
.article-thumb-banner img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* ===== CARD THUMBNAIL ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all .22s;
  display: flex; flex-direction: column;
  cursor: pointer;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: rgba(234,88,12,.2);
}
.card.hidden { display: none; }

/* Card thumbnail image */
.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #0f172a;
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .35s ease;
}
.card:hover .card-thumb img { transform: scale(1.04); }

/* Card top strip — color by category */
.card-strip {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--border);
  min-height: 62px;
}
.card-ab {
  display: flex; align-items: center; gap: 8px;
  flex: 1;
}
.card-ab .pa, .card-ab .pb {
  font-size: .8rem; font-weight: 700; color: var(--text);
  max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-ab .vsb {
  font-size: .65rem; font-weight: 900; color: var(--primary);
  background: #fff7ed; border: 1px solid #fed7aa;
  padding: 2px 7px; border-radius: 50px; flex-shrink: 0;
}
.card-winner {
  font-size: .72rem; font-weight: 700; color: #059669;
  background: #d1fae5; padding: 3px 10px; border-radius: 50px;
  flex-shrink: 0; margin-left: 8px;
  display: flex; align-items: center; gap: 3px;
}

/* Category color accents */
.card[data-cat="gia-dung"] .card-strip { background: linear-gradient(135deg,#fff7ed,#fef9ec); }
.card[data-cat="me-va-be"] .card-strip { background: linear-gradient(135deg,#fdf4f8,#fce7f3); }
.card[data-cat="cong-nghe"] .card-strip { background: linear-gradient(135deg,#eff6ff,#ebf5ff); }
.card[data-cat="tai-chinh"] .card-strip { background: linear-gradient(135deg,#f0fdf4,#ecfdf5); }
.card[data-cat="phan-mem"] .card-strip { background: linear-gradient(135deg,#f5f3ff,#f0effe); }
.card[data-cat="lam-dep"] .card-strip { background: linear-gradient(135deg,#fff1f2,#ffeef1); }
.card[data-cat="xe-co"] .card-strip { background: linear-gradient(135deg,#f0f9ff,#e8f4ff); }

.card-body-wrap {
  padding: 14px 16px 12px;
  flex: 1; display: flex; flex-direction: column;
}
.card-body-wrap h3 {
  font-size: .9rem; font-weight: 700; color: var(--text);
  line-height: 1.4; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
}
.cat-badge {
  font-size: .72rem; font-weight: 600; color: var(--text-muted);
  background: #f1f5f9; padding: 3px 10px; border-radius: 50px;
}
.card-views { font-size: .72rem; color: var(--text-muted); }
.card-cta {
  display: flex; align-items: center; gap: 5px;
  background: var(--primary); color: #fff;
  font-size: .78rem; font-weight: 700;
  padding: 6px 14px; border-radius: 8px;
  transition: background .2s; flex-shrink: 0;
}
.card-cta:hover { background: var(--primary-dark); }

/* ===== TRUST SECTION ===== */
.trust-section {
  background: #0f172a;
  padding: 60px 0;
}
.trust-head { text-align: center; margin-bottom: 40px; }
.trust-head h2 { color: #fff; font-size: 1.5rem; }
.trust-head p { color: rgba(255,255,255,.45); margin-top: 8px; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: rgba(255,255,255,.06);
  border-radius: 16px;
  overflow: hidden;
}
.trust-item {
  padding: 32px 24px;
  text-align: center;
  background: #0f172a;
  transition: background .2s;
}
.trust-item:hover { background: rgba(234,88,12,.08); }
.trust-icon { font-size: 2.2rem; margin-bottom: 14px; }
.trust-item h3 { color: #fff; font-size: .95rem; font-weight: 700; margin-bottom: 8px; }
.trust-item p { color: rgba(255,255,255,.45); font-size: .82rem; line-height: 1.6; }

/* ===== FOOTER ===== */
footer { background: #080e1a; color: #64748b; padding: 48px 0 24px; }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 24px;
}
.footer-brand .logo { color: #f8fafc; margin-bottom: 10px; font-size: 1.1rem; }
.footer-brand p { font-size: .83rem; line-height: 1.7; max-width: 260px; }
.footer-col h4 { color: #f1f5f9; font-size: .88rem; font-weight: 700; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: .83rem; color: #64748b; transition: color .2s; }
.footer-col ul li a:hover { color: #f8fafc; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: .78rem; }
.footer-disclaimer { font-size: .72rem; color: #475569; max-width: 500px; text-align: right; }

/* ===== ARTICLE PAGE COMPONENTS ===== */
.comparison-table-wrapper { overflow-x: auto; margin: 24px 0; }
.comparison-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.comparison-table thead th { background: var(--primary); color: #fff; padding: 10px 14px; text-align: left; font-weight: 600; }
.comparison-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: #374151; }
.comparison-table tr:nth-child(even) td { background: #fafafa; }
.comparison-table tr:hover td { background: #fff7ed; }

.score-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.score-card h3 { font-size: 1rem; margin-bottom: 14px; color: var(--text); border-bottom: 2px solid var(--primary); padding-bottom: 8px; display: inline-block; }
.score-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.score-bar .label { width: 160px; font-size: .83rem; color: var(--text); font-weight: 500; flex-shrink: 0; }
.score-bar .bar { flex: 1; background: #e2e8f0; height: 9px; border-radius: 50px; overflow: hidden; }
.score-bar .bar .fill { height: 100%; background: var(--primary); border-radius: 50px; width: 0; transition: width .7s ease; }
.score-bar .score { width: 44px; text-align: right; font-size: .83rem; font-weight: 700; color: var(--text); }

.toc { background: #fff7ed; border: 1px solid #fed7aa; border-left: 4px solid var(--primary); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 28px; }
.toc-title { font-weight: 700; color: var(--text); margin-bottom: 10px; font-size: .93rem; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc ul li { margin-bottom: 5px; }
.toc ul li a { color: var(--primary); font-size: .87rem; }
.toc ul li a:hover { text-decoration: underline; }

.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.faq-question { background: #fafafa; padding: 14px 16px; font-size: .93rem; font-weight: 600; color: var(--text); }
.faq-answer { padding: 14px 16px; }
.faq-answer p { color: #374151; margin: 0; font-size: .9rem; line-height: 1.7; }

.verdict-box { border-radius: var(--radius); padding: 20px 24px; margin: 14px 0; background: #f0fdf4; border: 1px solid #86efac; }
.verdict-box .verdict-winner { font-weight: 700; color: #065f46; margin-bottom: 8px; font-size: .93rem; }
.verdict-box p { color: #14532d; margin: 0; font-size: .9rem; line-height: 1.7; }
.verdict-box.loser { background: #fff7ed; border-color: #fdba74; }
.verdict-box.loser .verdict-winner { color: #9a3412; }
.verdict-box.loser p { color: #7c2d12; }
.verdict-final { background: #1e293b; color: #f1f5f9; border-radius: var(--radius); padding: 20px 24px; margin-top: 16px; font-size: .9rem; line-height: 1.75; }
.verdict-final strong { color: var(--accent); }

.sidebar-widget { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.widget-title { font-weight: 700; font-size: .82rem; color: var(--text); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: .05em; }
.mini-score { font-size: .88rem; color: var(--text-muted); padding: 4px 0; }

.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; padding: 40px 0 80px; }
.article-main { min-width: 0; }
.article-sidebar { position: sticky; top: 80px; height: fit-content; }
.article-main section { margin-bottom: 36px; }
.article-main section h2 { color: var(--text); font-size: 1.3rem; margin: 0 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); display: inline-block; }
.article-main section h3 { color: var(--text); font-size: 1rem; margin: 18px 0 8px; }
.article-main section p { color: #374151; line-height: 1.8; margin-bottom: 14px; }
.article-main section ul { margin: 10px 0 16px 20px; list-style: disc; }
.article-main section ul li { color: #374151; margin-bottom: 6px; font-size: .9rem; }

.breadcrumb { display: flex; gap: 8px; align-items: center; margin-bottom: 24px; font-size: .83rem; color: var(--text-muted); }
.breadcrumb a { color: var(--primary); }
.article-header { margin-bottom: 32px; }
.article-header .category-tag { background: #fff7ed; color: var(--primary); font-size: .78rem; font-weight: 700; padding: 4px 14px; border-radius: 50px; display: inline-block; margin-bottom: 14px; text-transform: uppercase; }
.article-header h1 { color: var(--text); margin-bottom: 16px; }
.article-meta { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.article-meta .author { display: flex; align-items: center; gap: 10px; }
.article-meta .author-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.article-meta .author-info .name { font-weight: 600; font-size: .88rem; color: var(--text); }
.article-meta .author-info .role { font-size: .75rem; color: var(--text-muted); }
.article-meta .meta-item { font-size: .8rem; color: var(--text-muted); }

.vs-hero { display: flex; align-items: center; background: linear-gradient(135deg,#f8faff,#f0f9ff); border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; border: 1px solid var(--border); }
.vs-hero-side { flex: 1; padding: 28px; text-align: center; }
.vs-hero-side.winner { background: rgba(16,185,129,.05); }
.vs-hero-icon { font-size: 3.5rem; margin-bottom: 10px; }
.vs-hero-name { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.vs-hero-score { font-size: 2.2rem; font-weight: 900; margin: 8px 0; }
.vs-hero-verdict { font-size: .83rem; font-weight: 600; }
.vs-hero-verdict.win { color: var(--green); }
.vs-hero-verdict.lose { color: var(--text-muted); }
.vs-hero-divider { width: 56px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vs-hero-divider .vs-text { font-size: .8rem; font-weight: 900; color: var(--primary); background: #fff7ed; padding: 6px 10px; border-radius: 8px; border: 1px solid #fed7aa; }

.related-list li { border-bottom: 1px solid var(--border); padding: 9px 0; }
.related-list li:last-child { border: none; }
.related-list a { font-size: .85rem; font-weight: 600; color: var(--text); transition: color .2s; }
.related-list a:hover { color: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-right { display: grid; grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .trust-grid { grid-template-columns: repeat(2,1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.nav-open {
    display: flex; flex-direction: column; position: absolute;
    top: 60px; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--border); padding: 16px 20px;
    gap: 12px; z-index: 99; box-shadow: 0 4px 16px rgba(0,0,0,.1);
  }
  .hamburger { display: block; }
  .hero { padding: 56px 0 48px; }
  .hero-right { grid-template-columns: 1fr; }
  .hero-right .hero-float-card:nth-child(2) { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2,1fr); }
  .vs-hero { flex-direction: column; }
  .vs-hero-divider { flex-direction: row; width: 100%; justify-content: center; padding: 10px 0; }
  .ftab { padding: 12px 14px; font-size: .8rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner .footer-col:last-child { display: none; }
}
@media (max-width: 480px) {
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .hero-pills { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .footer-disclaimer { text-align: center; }
}
