/*
Theme Name: Vietnamobile News Portal
Theme URI: https://vietnamobile.info/
Author: Antigravity
Author URI: https://vietnamobile.info/
Description: Giao diện tin tức, cẩm nang dịch vụ Vietnamobile hiện đại, chuẩn SEO Onpage, tối ưu tốc độ và responsive 100% trên mọi thiết bị di động.
Version: 2.1.0
License: GNU General Public License v2 or later
Text Domain: vietnamobile
*/

/* ==========================================================================
   1. CSS VARIABLES & DESIGN TOKENS
   ========================================================================== */
:root {
  --primary-color: #ff5500;
  --primary-dark: #e04400;
  --primary-light: #fff2ea;
  --primary-gradient: linear-gradient(135deg, #ff6600 0%, #ff3b00 100%);
  
  --secondary-color: #0f172a;
  --text-main: #334155;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  
  --border-color: #e2e8f0;
  --border-focus: #ff5500;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  --font-sans: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-fast: all 0.2s ease-in-out;
  --transition-normal: all 0.3s ease-in-out;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 0.96875rem; /* ~15.5px */
  line-height: 1.65;
  color: var(--text-main);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

body.menu-open, body.search-open {
  overflow: hidden;
}

a {
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  list-style-position: inside;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

.main-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.main-content {
  flex: 1 1 65%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.main-sidebar {
  flex: 0 0 320px;
  max-width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
/* Topbar */
.site-topbar {
  background-color: #0b1120;
  color: #94a3b8;
  font-size: 0.8125rem;
  padding: 6px 0;
  border-bottom: 1px solid #1e293b;
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-date {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-date i {
  color: var(--primary-color);
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.topbar-links a {
  color: #cbd5e1;
}

.topbar-links a:hover {
  color: var(--primary-color);
}

/* Main Header */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.site-logo-img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
}

.site-logo-text {
  display: flex;
  align-items: center;
}

.site-logo-text .highlight {
  color: var(--primary-color);
  font-weight: 800;
}

.site-logo-text .subtext {
  color: var(--secondary-color);
  font-weight: 700;
}

/* Desktop Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.main-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.main-menu > li {
  position: relative;
}

.main-menu > li > a {
  display: block;
  padding: 0.6rem 0.85rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.main-menu > li:hover > a,
.main-menu > li.current-menu-item > a,
.main-menu > li.current-menu-parent > a {
  color: var(--primary-color);
  background-color: var(--primary-light);
}

/* Dropdown Menu */
.main-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 0.5rem 0;
  margin-top: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-fast);
  z-index: 999;
}

.main-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-menu .sub-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.main-menu .sub-menu li a:hover {
  color: var(--primary-color);
  background-color: var(--primary-light);
  padding-left: 1.25rem;
}

.main-menu .menu-item-has-children > a::after {
  content: '\f107';
  font-family: 'FontAwesome';
  font-size: 0.75rem;
  margin-left: 5px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition-fast);
}

.search-toggle-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.mobile-menu-toggle {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-dark);
  cursor: pointer;
}

/* ==========================================================================
   4. OFFCANVAS MOBILE DRAWER & SEARCH OVERLAY
   ========================================================================== */
.offcanvas-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  z-index: 1998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.offcanvas-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.mobile-offcanvas-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 1999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.mobile-offcanvas-menu.is-active {
  transform: translateX(0);
}

.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.offcanvas-close {
  background: var(--bg-subtle);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dark);
}

.offcanvas-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.offcanvas-search {
  margin-bottom: 1.25rem;
}

.offcanvas-search .search-form {
  position: relative;
  display: flex;
}

.offcanvas-search input {
  width: 100%;
  padding: 0.625rem 2.5rem 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  outline: none;
}

.offcanvas-search button {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.offcanvas-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.offcanvas-nav li {
  border-bottom: 1px solid #f1f5f9;
}

.offcanvas-nav li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.25rem;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.9375rem;
}

.offcanvas-nav .sub-menu {
  display: none;
  padding-left: 1rem;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.offcanvas-nav .sub-menu li {
  border-bottom: none;
}

.offcanvas-nav .sub-menu a {
  padding: 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
}

.offcanvas-nav .sub-menu-toggle {
  padding: 4px 8px;
  cursor: pointer;
  color: var(--text-muted);
}

/* Search Overlay Modal */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.search-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-inner {
  width: 100%;
  max-width: 600px;
  padding: 2rem;
  position: relative;
}

.search-overlay-close {
  position: absolute;
  top: -40px;
  right: 2rem;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.75rem;
  cursor: pointer;
}

.search-overlay-form {
  position: relative;
  display: flex;
}

.search-overlay-input {
  width: 100%;
  padding: 1.125rem 3.5rem 1.125rem 1.5rem;
  font-size: 1.125rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  background: #ffffff;
  color: var(--text-dark);
  outline: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.search-overlay-input:focus {
  border-color: var(--primary-color);
}

.search-overlay-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  bottom: 8px;
  width: 46px;
  border-radius: 50%;
  background: var(--primary-gradient);
  border: none;
  color: #ffffff;
  font-size: 1.125rem;
  cursor: pointer;
}

/* ==========================================================================
   5. HERO SPOTLIGHT & HOMEPAGE MAGAZINE
   ========================================================================== */
.hero-spotlight {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.75rem;
  align-items: stretch;
}

/* Big Hero Card (Left) */
.hero-main-card {
  position: relative;
  background: transparent;
  display: flex;
  flex-direction: column;
}

.hero-thumb-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.85rem;
  background: #f1f5f9;
}

.hero-thumb-link {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.hero-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-main-card:hover .hero-thumb-link img {
  transform: scale(1.04);
}

.hero-thumb-wrapper .category-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  margin-bottom: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.hero-main-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.category-badge {
  display: inline-block;
  background: var(--primary-color);
  color: #ffffff !important;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.category-badge:hover {
  background: var(--primary-dark);
}

.hero-main-title {
  font-size: 1.375rem; /* ~22px */
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  color: #0f172a;
}

.hero-main-title a {
  color: #0f172a;
}

.hero-main-title a:hover {
  color: var(--primary-color);
}

.post-meta-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.post-meta-inline i {
  color: var(--primary-color);
  margin-right: 4px;
}

.hero-main-excerpt {
  font-size: 0.9375rem;
  color: var(--text-main);
  line-height: 1.65;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Secondary Hero News List (Right) */
.hero-sub-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid #f1f5f9;
  padding-left: 1.75rem;
}

.hero-sub-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  transition: var(--transition-fast);
}

.hero-sub-item:first-child {
  padding-top: 0;
}

.hero-sub-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.hero-sub-thumb {
  flex: 0 0 115px;
  width: 115px;
  height: 76px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: #f1f5f9;
}

.hero-sub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hero-sub-item:hover .hero-sub-thumb img {
  transform: scale(1.06);
}

.hero-sub-info {
  flex: 1;
  min-width: 0;
}

.hero-sub-title {
  font-size: 0.9375rem; /* ~15px */
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
  color: #1e293b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-sub-title a {
  color: #1e293b;
}

.hero-sub-title a:hover {
  color: var(--primary-color);
}

.hero-sub-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hero-sub-meta i {
  color: var(--primary-color);
  margin-right: 2px;
}

.sub-category-tag {
  color: var(--primary-color);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.71875rem;
  letter-spacing: 0.3px;
}

.sub-category-tag:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.meta-dot {
  color: #cbd5e1;
  font-size: 0.75rem;
}

/* Section Header (Magazine Category Blocks) */
.section-block {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  position: relative;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dark);
  margin: 0;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.85rem;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--primary-color);
}

.section-more-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-more-link:hover {
  color: var(--primary-dark);
}

/* News Grid (2 Columns / 3 Columns) */
.news-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.news-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* Standard News Card */
.news-card {
  display: flex;
  flex-direction: column;
  transition: var(--transition-fast);
}

.news-card-thumb {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: 0.75rem;
  background: #f1f5f9;
}

.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-card-thumb img {
  transform: scale(1.05);
}

.news-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-title a:hover {
  color: var(--primary-color);
}

.news-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Category Grid on Home (2 Columns Blocks) */
.category-blocks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* ==========================================================================
   6. SIDEBAR & WIDGETS
   ========================================================================== */
.sidebar-widget, .widget {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

.widget-title {
  font-size: 1.0625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dark);
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 0.65rem;
  margin-bottom: 1rem;
  position: relative;
}

.widget-title span::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 45px;
  height: 2px;
  background: var(--primary-color);
}

/* Search Widget */
.widget-search .search-form-wrap {
  position: relative;
}

.widget-search input[type="text"],
.widget-search input[type="search"] {
  width: 100%;
  padding: 0.625rem 2.75rem 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition-fast);
}

.widget-search input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.1);
}

.widget-search .search-submit {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 42px;
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 1rem;
  cursor: pointer;
}

/* Most Viewed Widget (Numbered List) */
.ranked-posts-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ranked-post-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}

.ranked-post-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.rank-badge {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-dark);
  font-size: 0.8125rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-badge.rank-1 {
  background: var(--primary-color);
  color: #ffffff;
}

.rank-badge.rank-2 {
  background: #ea580c;
  color: #ffffff;
}

.rank-badge.rank-3 {
  background: #f97316;
  color: #ffffff;
}

.ranked-post-info {
  flex: 1;
  min-width: 0;
}

.ranked-post-title {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
}

.ranked-post-title a:hover {
  color: var(--primary-color);
}

.ranked-post-views {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Recent Posts Widget */
.widget-recent-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0.75rem;
}

.widget-recent-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
  margin-bottom: 0;
}

.widget-recent-thumb {
  flex: 0 0 80px;
  width: 80px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.widget-recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-recent-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Category List Widget */
.widget-categories ul, .widget_categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-categories li, .widget_categories li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
  font-weight: 600;
}

.widget-categories li:last-child, .widget_categories li:last-child {
  border-bottom: none;
}

.widget-categories .cat-count, .widget_categories .count {
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Tag Cloud Widget */
.tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tagcloud a {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem !important;
  color: var(--text-main);
  font-weight: 500;
  transition: var(--transition-fast);
}

.tagcloud a:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* ==========================================================================
   7. BREADCRUMBS & PAGINATION
   ========================================================================== */
.breadcrumb-wrapper {
  margin-bottom: 1.25rem;
  margin-top: 0.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  padding: 0 0.5rem;
  color: var(--text-light);
}

.breadcrumb-item a {
  color: var(--text-muted);
}

.breadcrumb-item a:hover {
  color: var(--primary-color);
}

.breadcrumb-item.active {
  color: var(--text-dark);
  font-weight: 600;
}

/* Pagination */
.news-pagination-wrapper {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.news-pagination-wrapper ul.page-numbers {
  display: flex;
  list-style: none;
  gap: 0.35rem;
  align-items: center;
  padding: 0;
  margin: 0;
}

.news-pagination-wrapper .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-dark);
  transition: var(--transition-fast);
}

.news-pagination-wrapper .page-numbers:hover,
.news-pagination-wrapper .page-numbers.current {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* ==========================================================================
   8. SINGLE POST & TYPOGRAPHY
   ========================================================================== */
.single-article {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.article-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
}

.article-title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-dark);
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.article-meta-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-meta-item i {
  color: var(--primary-color);
}

/* Share Bar */
.article-share-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  box-sizing: border-box;
}

.share-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-right: 0.5rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff !important;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.share-btn-fb {
  background: #1877f2;
}
.share-btn-fb:hover {
  background: #0d65d9;
}

.share-btn-zalo {
  background: #0068ff;
}
.share-btn-zalo:hover {
  background: #0054cc;
}

.share-btn-copy {
  background: #475569;
}
.share-btn-copy:hover {
  background: #334155;
}

/* Article Body Typography */
.article-content {
  font-size: 1.0625rem; /* ~17px */
  line-height: 1.8;
  color: #1e293b;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.article-content * {
  max-width: 100%;
}

.article-content h2 {
  font-size: 1.45rem;
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-color);
  color: #0f172a;
}

.article-content h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #1e293b;
}

.article-content h4 {
  font-size: 1.1rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content a:hover {
  color: var(--primary-dark);
}

.article-content img {
  border-radius: var(--radius-md);
  margin: 1.5rem auto;
  box-shadow: var(--shadow-sm);
  height: auto !important;
  display: block;
}

.article-content figcaption,
.article-content .wp-caption-text {
  text-align: center;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
}

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background-color: var(--primary-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: #334155;
}

.article-content iframe,
.article-content object,
.article-content embed {
  max-width: 100% !important;
  border-radius: var(--radius-md);
}

.article-content ul, .article-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.article-content li {
  margin-bottom: 0.4rem;
}

/* ==========================================================================
   TABLE RESPONSIVE (100% MOBILE COMPATIBLE)
   ========================================================================== */
.table-responsive {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  margin: 1.5rem 0 !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  background: #ffffff !important;
  box-shadow: var(--shadow-sm) !important;
  display: block !important;
  box-sizing: border-box !important;
  position: relative !important;
}

.table-scroll-hint {
  display: none;
}

.table-responsive table {
  width: 100% !important;
  min-width: 520px !important;
  max-width: none !important;
  border-collapse: collapse !important;
  text-align: left !important;
  font-size: 0.9rem !important;
  margin: 0 !important;
  display: table !important;
}

.table-responsive table th,
.table-responsive table td {
  padding: 10px 14px !important;
  border: 1px solid var(--border-color) !important;
  vertical-align: middle !important;
  height: auto !important;
  word-break: normal !important;
  box-sizing: border-box !important;
}

.table-responsive table th {
  background-color: #f1f5f9 !important;
  font-weight: 700 !important;
  color: var(--text-dark) !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.table-responsive table tr:nth-child(even) td {
  background-color: #f8fafc !important;
}

.table-responsive table td strong,
.table-responsive table td b {
  color: var(--text-dark) !important;
}

/* Article Tags */
.article-tags-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.article-tags-label {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-dark);
}

.article-tags-list a {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-main);
  font-weight: 500;
  margin-right: 4px;
}

.article-tags-list a:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* Post Navigation (Prev/Next) */
.post-navigation-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.post-nav-item {
  padding: 1rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.post-nav-item:hover {
  background: var(--primary-light);
}

.post-nav-item.next-post {
  text-align: right;
}

.post-nav-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.post-nav-title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Related Posts Section */
.related-posts-section {
  margin-top: 2rem;
}

/* ==========================================================================
   9. ARCHIVE, SEARCH & 404
   ========================================================================== */
.archive-header {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.archive-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.archive-description {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 404 Page */
.page-404-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.error-code {
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.error-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.error-description {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

/* ==========================================================================
   10. FOOTER & UTILITIES
   ========================================================================== */
.site-footer {
  background-color: #0b1120;
  color: #94a3b8;
  padding-top: 3.5rem;
  border-top: 3px solid var(--primary-color);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background: var(--primary-color);
}

.footer-about-text {
  font-size: 0.875rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.footer-social-links {
  display: flex;
  gap: 0.6rem;
}

.social-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e293b;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.social-icon-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-list li {
  margin-bottom: 0.6rem;
}

.footer-links-list a {
  color: #94a3b8;
  font-size: 0.875rem;
  transition: var(--transition-fast);
  display: inline-block;
}

.footer-links-list a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-bottom {
  background-color: #060a12;
  border-top: 1px solid #1e293b;
  padding: 1.25rem 0;
  font-size: 0.8125rem;
  text-align: center;
  color: #64748b;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: var(--transition-normal);
  z-index: 990;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* Toast Message */
.site-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background-color: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  z-index: 9999;
}

.site-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   11. RESPONSIVE MEDIA QUERIES (MOBILE FIRST SYSTEM)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .hero-sub-list {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid #f1f5f9;
    padding-top: 1.25rem;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .main-layout {
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 1rem;
    padding-bottom: 2rem;
  }
  .main-sidebar {
    flex: 1 1 100%;
    width: 100%;
  }
  .main-nav {
    display: none; /* Hidden on tablet/mobile, use offcanvas drawer */
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .category-blocks-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  html {
    font-size: 15px;
  }
  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  .site-topbar {
    display: none;
  }
  .header-inner {
    height: 56px;
  }
  .site-logo-img {
    max-height: 38px;
    max-width: 150px;
  }
  .site-logo-text {
    font-size: 1.25rem;
  }
  .news-grid-2, .news-grid-3 {
    grid-template-columns: 1fr;
  }
  
  /* Hero section on mobile */
  .hero-spotlight {
    padding: 1rem 0.85rem;
    margin-top: 1rem;
    margin-bottom: 1.25rem;
  }
  .hero-main-title {
    font-size: 1.2rem;
    line-height: 1.35;
  }
  .hero-sub-thumb {
    flex: 0 0 95px;
    width: 95px;
    height: 65px;
  }
  .hero-sub-title {
    font-size: 0.875rem;
  }
  
  /* Single Article Mobile Optimization */
  .single-article {
    padding: 1.25rem 0.85rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    overflow: hidden;
  }
  .article-title {
    font-size: 1.35rem;
    line-height: 1.35;
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    word-break: break-word;
  }
  .article-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .article-meta-left {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    font-size: 0.78rem;
  }
  .article-share-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
  }
  .share-label {
    width: 100%;
    margin-bottom: 2px;
    font-size: 0.78rem;
  }
  .share-btn {
    flex: 1 1 calc(50% - 0.4rem);
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.78rem;
  }
  .share-btn-copy {
    flex: 1 1 100%;
  }
  .article-content {
    font-size: 1rem;
    line-height: 1.75;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
  }
  .article-content h2 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.65rem;
  }
  .article-content h3 {
    font-size: 1.1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
  }
  .article-content h4 {
    font-size: 1rem;
  }
  .article-content img {
    max-width: 100% !important;
    height: auto !important;
    margin: 1rem auto;
  }
  .article-content ul, .article-content ol {
    padding-left: 1.25rem;
  }
  
  /* Mobile Responsive Table */
  .table-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--primary-light);
    border-bottom: 1px solid var(--border-color);
  }
  .table-responsive {
    margin: 1.25rem 0;
    border-radius: var(--radius-md);
  }
  .table-responsive table {
    font-size: 0.8125rem;
    min-width: 480px !important;
  }
  .table-responsive table th,
  .table-responsive table td {
    padding: 8px 10px !important;
  }
  
  .post-navigation-box {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .post-nav-item.next-post {
    text-align: left;
  }
  .related-posts-section .news-grid-3 {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .article-tags-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-sub-thumb {
    flex: 0 0 80px;
    width: 80px;
    height: 56px;
  }
  .article-share-bar {
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   Table of Contents (Mục lục bài viết)
   ========================================================================== */
.vietnamobile-toc-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #ff6600;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 24px 0 28px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
}

.vietnamobile-toc-box.is-expanded {
  background: #ffffff;
  border-color: #cbd5e1;
  border-left-color: #ff6600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.vietnamobile-toc-box .toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  gap: 12px;
}

.vietnamobile-toc-box .toc-header:hover .toc-title {
  color: #ff6600;
}

.vietnamobile-toc-box .toc-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vietnamobile-toc-box .toc-icon {
  color: #ff6600;
  font-size: 16px;
}

.vietnamobile-toc-box .toc-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.vietnamobile-toc-box .toc-toggle-btn {
  background: transparent;
  border: none;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #ff6600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.vietnamobile-toc-box .toc-toggle-btn:hover {
  background: #fff7ed;
  color: #ea580c;
}

.vietnamobile-toc-box .toc-toggle-arrow {
  font-size: 14px;
  transition: transform 0.25s ease;
}

.vietnamobile-toc-box.is-expanded .toc-toggle-arrow {
  transform: rotate(180deg);
}

.vietnamobile-toc-box .toc-content-list {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
}

.vietnamobile-toc-box .toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vietnamobile-toc-box .toc-item {
  margin-bottom: 8px;
  line-height: 1.5;
}

.vietnamobile-toc-box .toc-item:last-child {
  margin-bottom: 0;
}

.vietnamobile-toc-box .toc-level-2 {
  font-weight: 600;
  font-size: 14.5px;
}

.vietnamobile-toc-box .toc-level-3 {
  padding-left: 22px;
  font-size: 13.5px;
  font-weight: 400;
  margin-top: 4px;
}

.vietnamobile-toc-box .toc-item a {
  color: #334155;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.vietnamobile-toc-box .toc-item a:hover {
  color: #ff6600;
  transform: translateX(3px);
}

.vietnamobile-toc-box .toc-number {
  color: #ff6600;
  font-weight: 700;
  flex-shrink: 0;
}

.vietnamobile-toc-box .toc-text {
  flex: 1;
}

/* Scroll margin top for smooth navigation */
.article-content h2[id],
.article-content h3[id] {
  scroll-margin-top: 90px;
}