/* === CSS Custom Properties === */
:root {
  /* Colors - Light Mode */
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #3B82F6;
  --accent: #06B6D4;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  
  --bg-color: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --border-color: #E2E8F0;
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  --code-bg: #1E293B;
  --code-text: #F8FAFC;
  
  /* Fonts */
  --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, monospace;
  
  /* Layout */
  --container-width: 1280px;
  --sidebar-width: 320px;
  --header-height: 64px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  
  /* Transitions */
  --transition: all 0.3s ease;
  --transition-fast: all 0.2s ease;
}

body.dark-mode,
html.dark-mode body,
.dark-mode {
  --bg-color: #0F172A;
  --surface: #1E293B;
  --surface-alt: #334155;
  --border-color: #334155;
  
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --code-bg: #0F172A;
  --code-text: #E2E8F0;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -2px rgba(0,0,0,0.2);
}

html.dark-mode {
  --bg-color: #0F172A;
  --surface: #1E293B;
  --surface-alt: #334155;
  --border-color: #334155;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --code-bg: #0F172A;
  --code-text: #E2E8F0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -2px rgba(0,0,0,0.2);
}

/* === Base/Reset === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

a:hover, a:focus {
  text-decoration: underline;
  outline: none;
}

img, picture, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75em;
  margin-top: 1.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1.5em;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* === Layout === */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.site-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 0;
}

/* Homepage should not apply flex layout from header wrapper */
.site-content > .front-page-content,
.site-content > main.front-page-content {
  width: 100%;
  display: block;
}

.front-page-content {
  padding-top: 0;
}

.front-page-content .section {
  padding: 2rem 0;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.front-page-content .section:first-child {
  padding-top: 1rem;
}

@media (min-width: 1024px) {
  .site-content {
    flex-direction: row;
  }
}

.content-area {
  flex: 1;
  min-width: 0;
}

.sidebar-area {
  width: 100%;
}

@media (min-width: 1024px) {
  .sidebar-area {
    width: var(--sidebar-width);
    flex-shrink: 0;
  }
}

.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* === Header === */
.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  z-index: 1000;
  position: relative;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header > .container {
  height: 100%;
}

.site-header.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  background-color: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: slideDown 0.3s ease forwards;
}

html.dark-mode .site-header.is-sticky,
.dark-mode .site-header.is-sticky {
  background-color: rgba(30,41,59,0.95);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

/* Admin bar offset when logged in */
.admin-bar .site-header.is-sticky {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header.is-sticky {
    top: 46px;
  }
}

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

.site-branding {
  flex-shrink: 0;
}

.site-branding a {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.site-branding a:hover {
  opacity: 0.8;
  text-decoration: none;
}

.site-branding img {
  max-height: 38px;
  width: auto;
  display: inline-block;
}

.site-title-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.footer-logo-text {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.footer-widget__logo {
  margin-bottom: 16px;
}

.footer-widget__logo img {
  max-height: 40px;
  width: auto;
}

.header-right,
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.main-nav {
  display: none;
}

@media (min-width: 1024px) {
  .main-nav {
    display: flex;
    gap: 4px;
    align-items: center;
  }
}

.main-nav a {
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 16px;
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.main-nav a:hover,
.main-nav a:focus {
  background-color: var(--surface-alt);
  color: var(--primary);
}

}

/* Dropdown icon (SVG chevron) */
.dropdown-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  vertical-align: middle;
  margin-left: 2px;
  stroke: currentColor;
  fill: none;
  transition: transform 0.2s ease;
  opacity: 0.6;
}

.has-children:hover .dropdown-icon {
  transform: rotate(180deg);
  opacity: 1;
}

/* Submenu toggle button - hide on desktop, show on mobile */
.main-nav .submenu-toggle {
  display: none;
}

.has-children {
  position: relative;
}

.has-children > .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 100;
}

.has-children:hover > .sub-menu,
.has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu li {
  display: block;
}

.sub-menu a {
  display: block;
  padding: 9px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0;
  transition: var(--transition-fast);
}

.sub-menu a:hover {
  background-color: var(--surface-alt);
  color: var(--primary);
}

/* Mega Menu */
.mega-menu-content {
  width: 600px;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Header Buttons */
.btn-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.btn-icon:hover {
  background-color: var(--surface-alt);
  color: var(--primary);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.mobile-menu-toggle,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
}

.menu-toggle:hover {
  background-color: var(--surface-alt);
}

@media (min-width: 1024px) {
  .mobile-menu-toggle,
  .menu-toggle,
  .d-md-none {
    display: none;
  }
}

/* === Mobile Menu === */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 300px;
  max-width: 80%;
  background-color: var(--surface);
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

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

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu-close {
  margin-left: auto;
}

.mobile-nav ul {
  list-style: none;
}

.mobile-nav > ul > li > a,
.mobile-nav > ul > li > .submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 16px;
  text-decoration: none;
  font-weight: 500;
}

.mobile-nav .has-children {
  position: relative;
}

.mobile-nav .submenu-toggle {
  cursor: pointer;
}

.mobile-nav .submenu-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.mobile-nav .submenu-toggle.is-active svg {
  transform: rotate(180deg);
}

.mobile-nav .sub-menu {
  display: none;
  background-color: var(--surface-alt);
}

.mobile-nav .sub-menu.is-open {
  display: block;
}

.mobile-nav .sub-menu a {
  display: block;
  padding: 10px 20px 10px 40px;
  color: var(--text-secondary);
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
}

/* === Components === */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none !important;
  transition: var(--transition-fast);
  cursor: pointer;
  line-height: 1;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-inverse);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-dark);
  color: var(--text-inverse);
}

.btn-secondary {
  border-color: var(--border-color);
  background-color: transparent;
  color: var(--text-primary);
}

.btn-secondary:hover, .btn-secondary:focus {
  background-color: var(--surface-alt);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--text-inverse);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn svg {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Post Cards */
.post-card {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border-color);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-card__image {
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
  display: block;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card__image img {
  transform: scale(1.03);
}

.post-card__content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__category {
  display: inline-block;
  background-color: var(--primary);
  color: var(--text-inverse);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
  align-self: flex-start;
  text-decoration: none !important;
}

.post-card__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__title a {
  color: var(--text-primary);
}

.post-card__title a:hover {
  color: var(--primary);
  text-decoration: none;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: auto;
}

.post-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-card__meta svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

@media (min-width: 768px) {
  .post-card--horizontal {
    flex-direction: row;
  }
  .post-card--horizontal .post-card__image {
    width: 40%;
    aspect-ratio: auto;
  }
  .post-card--horizontal .post-card__content {
    width: 60%;
    padding: 24px;
  }
}

/* Tool Card */
.tool-card {
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: var(--primary);
}

.tool-card__icon img,
.tool-card__icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.tool-card__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.tool-card__desc {
  font-size: 14px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.tool-card__button {
  margin-top: auto;
  width: 100%;
}

/* Software Card */
.software-card {
  display: flex;
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: var(--transition);
  gap: 16px;
  align-items: center;
}

.software-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.software-card__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.software-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.software-card__info {
  flex: 1;
  min-width: 0;
}

.software-card__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.software-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.badge--platform {
  background-color: var(--surface-alt);
  color: var(--text-secondary);
}

.badge--version {
  background-color: rgba(6, 182, 212, 0.1);
  color: var(--accent);
}

.badge--free {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.badge--paid {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.software-card__action {
  flex-shrink: 0;
}

.software-card__excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 10px 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Breadcrumb */
.vnpanda-breadcrumb,
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding: 10px 16px;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
}

.breadcrumb-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.vnpanda-breadcrumb a,
.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
  font-weight: 500;
}

.vnpanda-breadcrumb a:hover,
.breadcrumb a:hover {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb-sep,
.breadcrumb .separator,
.breadcrumb .sep {
  display: inline-flex;
  align-items: center;
  margin: 0 6px;
  color: var(--text-muted);
  opacity: 0.5;
}

.breadcrumb-sep svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.vnpanda-breadcrumb .current,
.breadcrumb .current {
  font-weight: 600;
  color: var(--text-primary);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

/* Table of Contents - Tinhte "Xem nhanh" style */
.toc, #toc-container {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 28px;
  overflow: hidden;
}

.toc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--surface);
}

.toc__title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.toc__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: 1;
}

.toc__toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.toc__toggle-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  transition: transform 0.3s ease;
}

.toc.is-collapsed .toc__toggle-icon {
  transform: rotate(180deg);
}

.toc.is-collapsed .toc__header {
  border-bottom: none;
}

.toc__list {
  list-style: none;
  margin: 0;
  padding: 12px 20px 16px;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.toc.is-collapsed .toc__list {
  display: none;
}

.toc__list li {
  position: relative;
  padding: 0 0 0 16px;
  margin: 0;
  line-height: 1;
}

.toc__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  background: var(--text-muted);
  border-radius: 50%;
}

.toc__list a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 400;
  display: block;
  padding: 7px 0;
  transition: color 0.2s ease;
  line-height: 1.5;
}

.toc__list a:hover {
  color: var(--primary);
  text-decoration: none;
}

.toc__list ul {
  list-style: none;
  padding-left: 16px;
  margin: 0;
}

.toc__list ul li::before {
  width: 4px;
  height: 4px;
  background: var(--border-color);
}

/* Dark mode TOC */
html.dark-mode .toc,
.dark-mode .toc {
  background: var(--surface);
  border-color: var(--border-color);
}

html.dark-mode .toc__header,
.dark-mode .toc__header {
  background: var(--surface-alt);
}

/* Code Blocks */
.code-block-wrapper {
  position: relative;
  margin: 1.5em 0;
}

pre {
  background-color: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.code-block-wrapper:hover .code-copy-btn {
  opacity: 1;
}

.code-copy-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

:not(pre) > code {
  background-color: var(--surface-alt);
  color: var(--danger);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Download Box */
.download-box {
  border: 2px solid var(--primary);
  border-radius: var(--radius-xl);
  padding: 24px;
  background-color: var(--surface);
  margin: 32px 0;
}

.download-box__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.download-box__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background-color: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-box__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.download-box__title {
  margin: 0;
  font-size: 20px;
}

.download-box__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background-color: var(--surface-alt);
  border-radius: var(--radius-md);
}

.download-meta-item {
  display: flex;
  flex-direction: column;
}

.download-meta-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.download-meta-value {
  font-weight: 500;
  color: var(--text-primary);
}

.download-box__action {
  text-align: center;
}

.download-box__note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Sidebar Widgets */
.widget {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.sidebar-area .widget_search,
.sidebar-area .widget_block:has(.wp-block-search) {
  display: none !important;
}

.widget-title {
  font-weight: 600;
  font-size: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-top: 0;
  margin-bottom: 16px;
}

.widget ul {
  padding: 0;
  margin: 0;
}

.widget li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

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

.widget a {
  color: var(--text-secondary);
}

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

.sidebar-sticky {
  position: sticky;
  top: 80px;
}

/* Footer */
.site-footer {
  background-color: #0F172A;
  color: #F8FAFC;
  margin-top: 48px;
}

.footer-widgets {
  padding: 48px 0;
  border-bottom: none;
}

.footer-widget .widget-title {
  color: #FFFFFF;
  border-color: #334155;
}

.footer-widget a {
  color: #94A3B8;
}

.footer-widget a:hover {
  color: #FFFFFF;
}

.footer-widget li {
  border-color: transparent;
}

.footer-bottom {
  padding: 20px 0;
  font-size: 14px;
  color: #94A3B8;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Search Dropdown Bar */
.search-dropdown {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  z-index: 999;
  background: var(--surface);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease,
              visibility 0.3s ease;
}

.search-dropdown.is-active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Admin bar offset */
.admin-bar .search-dropdown {
  top: calc(var(--header-height) + 32px);
}

@media screen and (max-width: 782px) {
  .admin-bar .search-dropdown {
    top: calc(var(--header-height) + 46px);
  }
}

/* Sticky header offset */
.site-header.is-sticky ~ .search-dropdown {
  position: fixed;
}

.search-dropdown__form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.search-dropdown__input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-dropdown__input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-dropdown__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  stroke: currentColor;
  fill: none;
}

.search-dropdown__input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  width: 100%;
}

.search-dropdown__input::placeholder {
  color: var(--text-muted);
}

.search-dropdown__btn {
  flex-shrink: 0;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}

.search-dropdown__btn:hover {
  background: var(--primary-dark);
}

.search-dropdown__btn:active {
  transform: scale(0.97);
}

/* Dark mode */
html.dark-mode .search-dropdown,
.dark-mode .search-dropdown {
  background: var(--surface);
  border-color: var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Mobile search dropdown */
@media (max-width: 767px) {
  .search-dropdown__form {
    padding: 10px 0;
    gap: 8px;
  }

  .search-dropdown__input-wrap {
    padding: 0 12px;
  }

  .search-dropdown__input {
    font-size: 14px;
    padding: 10px 0;
  }

  .search-dropdown__btn {
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* === Homepage Sections === */
.section {
  margin-bottom: 48px;
}

.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section__title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  position: relative;
  padding-left: 12px;
}

.section__title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background-color: var(--accent);
  border-radius: 4px;
}

.section__more {
  color: var(--primary);
  font-weight: 500;
  font-size: 14px;
}
/* === Hero Section (ZingNews-style) === */
.hero-section {
  margin-bottom: 2rem;
}

.hero-top {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-bottom: 20px;
}

@media (min-width: 1024px) {
  .hero-top {
    grid-template-columns: 5fr 4fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-top {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Hero Card Base --- */
.hero-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.hero-card:hover {
  box-shadow: var(--shadow-md);
}

.hero-card__image {
  display: block;
  overflow: hidden;
}

.hero-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-card:hover .hero-card__image img {
  transform: scale(1.03);
}

.hero-card__body {
  padding: 16px;
}

.hero-card__category {
  display: inline-block;
  margin-bottom: 8px;
}

.hero-card__category a {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
}

.hero-card__title {
  margin: 0 0 8px 0;
  font-weight: 700;
  line-height: 1.35;
}

.hero-card__title a {
  color: var(--text-primary);
  text-decoration: none;
}

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

.hero-card__author {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

.hero-card__meta {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-card__excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Large Featured Card --- */
.hero-card--large .hero-card__image {
  aspect-ratio: 16/10;
}

.hero-card--large .hero-card__title {
  font-size: 20px;
}

@media (min-width: 768px) {
  .hero-card--large .hero-card__title {
    font-size: 22px;
  }
}

/* --- Medium Card --- */
.hero-card--medium .hero-card__image {
  aspect-ratio: 16/9;
}

.hero-card--medium .hero-card__title {
  font-size: 17px;
}

/* --- Bottom Row Cards --- */
.hero-bottom {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 767px) {
  .hero-bottom {
    grid-template-columns: 1fr;
  }
}

.hero-card--bottom .hero-card__image {
  aspect-ratio: 16/10;
}

.hero-card--bottom .hero-card__title {
  font-size: 15px;
}

.hero-card__title--sm {
  font-size: 15px !important;
}

/* --- Quick View Sidebar --- */
.hero-quick {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hero-quick__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.hero-quick__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.hero-quick__more {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.hero-quick__more:hover {
  text-decoration: underline;
}

.hero-quick__list {
  display: flex;
  flex-direction: column;
}

.hero-quick__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.hero-quick__item:last-child {
  border-bottom: none;
}

.hero-quick__item:hover {
  background-color: var(--surface-alt);
}

.hero-quick__item-text {
  flex: 1;
  min-width: 0;
}

.hero-quick__item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.hero-quick__item-thumb {
  width: 80px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.hero-quick__item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-secondary {
  display: grid;
  gap: 20px;
  grid-template-rows: 1fr 1fr;
}

.tools-section {
  background-color: var(--surface-alt);
  padding: 48px;
  border-radius: var(--radius-xl);
}

@media (max-width: 767px) {
  .tools-section {
    padding: 24px;
  }
}

/* === Single Post === */
.single-post-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.entry-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.entry-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .entry-title {
    font-size: 36px;
  }
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.entry-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.entry-meta svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.featured-image {
  margin-bottom: 32px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 16/9;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.entry-content {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-primary);
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.entry-content > * {
  margin-bottom: 1.5em;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.entry-content h2, 
.entry-content h3, 
.entry-content h4 {
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  scroll-margin-top: 80px;
}

.entry-content h2 {
  font-size: 1.6rem;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.entry-content h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--accent));
}

.entry-content h3 {
  font-size: 1.35rem;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.entry-content h4 {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.entry-content img {
  border-radius: var(--radius-lg);
  margin: 24px auto;
}

.entry-content a {
  color: var(--primary);
  text-decoration: none;
  background-image: linear-gradient(var(--primary), var(--primary));
  background-size: 0% 1.5px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s ease, color 0.3s ease;
  padding-bottom: 1px;
}

.entry-content a:hover {
  background-size: 100% 1.5px;
  color: var(--primary-dark);
  text-decoration: none;
}

.entry-content strong, .entry-content b {
  font-weight: 700;
  color: var(--text-primary);
}

.entry-content p {
  margin-bottom: 1.6em;
}

.entry-content ul {
  list-style: none;
  padding-left: 1.5em;
}

.entry-content ul > li {
  position: relative;
  padding-left: 8px;
}

.entry-content ul > li::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 11px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.entry-content ol {
  list-style: decimal;
  padding-left: 1.5em;
  counter-reset: ol-counter;
}

.entry-content ol > li {
  padding-left: 4px;
}

.entry-content ol > li::marker {
  color: var(--primary);
  font-weight: 700;
}

.entry-content li {
  margin-bottom: 0.6em;
  line-height: 1.7;
}

.entry-content blockquote {
  border-left: 4px solid var(--primary);
  background-color: var(--surface-alt);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--border-color);
  padding: 12px;
  text-align: left;
}

.entry-content th {
  background-color: var(--surface-alt);
  font-weight: 600;
}

/* Notice Boxes */
.notice, .warning, .tip, .danger {
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  border-left: 4px solid;
  background-color: var(--surface-alt);
}

.notice {
  border-color: var(--primary);
  background-color: rgba(37, 99, 235, 0.05);
}

.warning {
  border-color: var(--warning);
  background-color: rgba(245, 158, 11, 0.05);
}

.tip {
  border-color: var(--success);
  background-color: rgba(16, 185, 129, 0.05);
}

.danger {
  border-color: var(--danger);
  background-color: rgba(239, 68, 68, 0.05);
}

/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.post-tags a {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--surface-alt);
  color: var(--text-secondary);
  border-radius: 16px;
  font-size: 14px;
  text-decoration: none;
}

.post-tags a::before {
  content: '#';
  margin-right: 2px;
  color: var(--text-muted);
}

.post-tags a:hover {
  background-color: var(--primary);
  color: var(--text-inverse);
}

.post-tags a:hover::before {
  color: var(--text-inverse);
}

/* Author Box */
.author-box {
  display: flex;
  gap: 20px;
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 32px;
}

.author-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info h4 {
  margin: 0 0 8px 0;
}

.author-bio {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 12px;
}

/* Post Nav */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 32px;
  border-top: 1px solid var(--border-color);
  padding-top: 32px;
}

.nav-previous, .nav-next {
  flex: 1;
}

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

.post-navigation a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
}

.nav-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.nav-title {
  font-weight: 600;
  color: var(--text-primary);
}

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

/* === Archive === */
.archive-header {
  text-align: center;
  margin-bottom: 48px;
  padding: 48px 20px;
  background-color: var(--surface-alt);
  border-radius: var(--radius-xl);
}

.archive-title {
  margin: 0 0 16px 0;
  font-size: 32px;
}

.archive-description {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.pagination .page-numbers:hover,
.pagination .page-numbers:focus {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination .current {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-inverse);
}

.pagination .current:hover {
  color: var(--text-inverse);
}

/* === Ads === */
.ad-container {
  margin: 24px auto;
  text-align: center;
  clear: both;
}

.ad-container--reserved {
  min-height: 90px;
  background-color: var(--surface-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-label {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 4px;
  display: block;
}

@media (max-width: 767px) {
  .ad-container--desktop-only {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .ad-container--mobile-only {
    display: none !important;
  }
}

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.animate-fadeIn { animation: fadeIn 0.3s ease forwards; }
.animate-slideDown { animation: slideDown 0.3s ease forwards; }
.animate-slideUp { animation: slideUp 0.3s ease forwards; }

/* === Utilities === */
.sr-only, .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 32px !important; }
.mt-5 { margin-top: 48px !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }
.mb-5 { margin-bottom: 48px !important; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

@media (min-width: 768px) {
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
}

@media (min-width: 1024px) {
  .d-md-none { display: none !important; }
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
}

/* Header mobile/tablet (below 1024px where desktop nav appears) */
@media (max-width: 1023px) {
  /* --- Header Mobile (ZingNews style) --- */
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    gap: 0;
    height: 100%;
  }

  .site-branding {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
  }

  .site-branding img {
    max-height: 34px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
    order: -1;
    flex-shrink: 0;
    z-index: 2;
  }

  .menu-toggle svg {
    width: 22px;
    height: 22px;
  }

  .main-nav {
    display: none !important;
  }

  .header-actions {
    gap: 4px;
    flex-shrink: 0;
    z-index: 2;
  }

  .header-actions .dark-mode-toggle {
    display: none;
  }
}

/* Phone-specific overrides */
@media (max-width: 767px) {
  :root {
    --header-height: 56px;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-branding img {
    max-height: 30px;
  }

  .btn-icon {
    width: 40px;
    height: 40px;
  }

  .btn-icon svg {
    width: 20px;
    height: 20px;
  }

  /* --- Breadcrumb Mobile --- */
  .vnpanda-breadcrumb,
  .breadcrumb {
    font-size: 12px;
    padding: 8px 12px;
    margin-bottom: 16px;
  }

  .breadcrumb-sep {
    margin: 0 4px;
  }

  .breadcrumb-sep svg {
    width: 12px;
    height: 12px;
  }

  .vnpanda-breadcrumb .current,
  .breadcrumb .current {
    max-width: 200px;
    font-size: 12px;
  }

  /* --- Category badges --- */
  .category-badge {
    padding: 2px 8px;
    font-size: 10px;
    letter-spacing: 0.3px;
  }

  .entry-categories {
    gap: 6px;
    margin-bottom: 12px;
  }

  /* --- Entry Header Mobile --- */
  .entry-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .entry-title {
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: -0.01em;
  }

  .entry-meta {
    font-size: 12px;
    gap: 10px;
  }

  .entry-meta svg {
    width: 14px;
    height: 14px;
  }

  /* --- Featured Image --- */
  .featured-image {
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
  }

  /* --- TOC Mobile --- */
  .toc, #toc-container {
    margin-bottom: 20px;
    border-radius: var(--radius-md);
  }

  .toc__header {
    padding: 12px 16px;
  }

  .toc__title {
    font-size: 15px;
  }

  .toc__toggle {
    font-size: 12px;
    padding: 3px 8px;
    gap: 3px;
  }

  .toc__toggle-icon {
    width: 12px;
    height: 12px;
  }

  .toc__list {
    padding: 10px 16px 14px;
  }

  .toc__list li {
    padding-left: 14px;
  }

  .toc__list li::before {
    width: 4px;
    height: 4px;
  }

  .toc__list a {
    font-size: 13.5px;
    padding: 5px 0;
  }

  /* --- Entry Content Mobile --- */
  .entry-content {
    font-size: 15.5px;
    line-height: 1.75;
  }

  .entry-content > * {
    margin-bottom: 1.2em;
  }

  .entry-content p {
    margin-bottom: 1.3em;
  }

  .entry-content h2 {
    font-size: 1.3rem;
    margin-top: 2em;
    padding-bottom: 8px;
  }

  .entry-content h2::after {
    width: 40px;
  }

  .entry-content h3 {
    font-size: 1.15rem;
    margin-top: 1.8em;
    padding-left: 10px;
  }

  .entry-content h4 {
    font-size: 1.05rem;
    margin-top: 1.5em;
  }

  .entry-content ul,
  .entry-content ol {
    padding-left: 1.2em;
  }

  .entry-content ul > li::before {
    width: 5px;
    height: 5px;
    top: 10px;
    left: -12px;
  }

  .entry-content li {
    margin-bottom: 0.4em;
    font-size: 15px;
    line-height: 1.65;
  }

  .entry-content blockquote {
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 14px;
  }

  .entry-content pre {
    padding: 14px;
    font-size: 12.5px;
    border-radius: var(--radius-md);
  }

  .entry-content img {
    margin: 16px auto;
    border-radius: var(--radius-md);
  }

  .entry-content table {
    font-size: 13px;
    margin: 16px 0;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .entry-content th,
  .entry-content td {
    padding: 8px 10px;
  }

  /* --- Post Card Mobile --- */
  .post-card__content {
    padding: 12px;
  }

  .post-card__title {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .post-card__meta {
    font-size: 11px;
    gap: 8px;
  }

  .post-card__category {
    font-size: 10px;
    padding: 1px 6px;
    margin-bottom: 8px;
  }

  .post-card--featured {
    min-height: 240px;
  }

  .post-card--featured .post-card__overlay {
    padding: 20px 16px 16px;
  }

  .post-card--featured .post-card__overlay .post-card__title a {
    font-size: 18px;
  }

  /* --- Section Mobile --- */
  .section {
    margin-bottom: 32px;
  }

  .section__header {
    margin-bottom: 16px;
  }

  .section__title {
    font-size: 19px;
    padding-left: 10px;
  }

  .section__title::before {
    width: 3px;
  }

  .section__more {
    font-size: 13px;
  }

  .front-page-content .section {
    padding: 1.2rem 16px;
  }

  /* --- Grid Mobile --- */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* --- Hero Mobile --- */
  .hero-section__inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-sidebar-posts {
    gap: 12px;
  }

  /* --- Site Content Mobile --- */
  .site-content {
    padding: 1rem 16px;
    gap: 1rem;
  }

  .site-content.container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .content-area {
    min-width: 0;
    overflow-x: hidden;
  }

  /* --- Footer Mobile --- */
  .site-footer {
    margin-top: 32px;
  }

  .footer-widgets {
    padding: 32px 0;
  }

  .footer-widgets__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-widget__title {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .footer-bottom__inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 16px 0 12px;
  }

  /* --- Single Post Mobile --- */
  .single-post-wrapper {
    max-width: 100%;
  }

  .entry-footer {
    padding-top: 16px;
    margin-top: 24px;
  }

  .entry-tags {
    gap: 6px;
    margin-bottom: 16px;
  }

  .tag-pill {
    font-size: 12px;
    padding: 3px 10px;
  }

  .entry-share {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .share-btn {
    width: 32px;
    height: 32px;
  }

  .share-btn svg {
    width: 16px;
    height: 16px;
  }

  /* --- Post Navigation Mobile --- */
  .post-navigation {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 24px 0;
    padding-top: 16px;
  }

  .post-navigation__title {
    font-size: 14px;
  }

  .post-navigation__link {
    padding: 12px;
  }

  /* --- Author Box Mobile --- */
  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    gap: 12px;
    margin: 24px 0;
  }

  .author-box__avatar img,
  .author-box__img,
  .author-avatar img {
    width: 64px;
    height: 64px;
  }

  /* --- Related Posts Mobile --- */
  .related-posts {
    margin: 24px 0;
  }

  .related-posts__title {
    font-size: 18px;
    margin-bottom: 16px;
  }

  /* --- Sidebar Mobile --- */
  .sidebar-area {
    margin-top: 16px;
  }

  .widget {
    margin-bottom: 24px;
    padding: 16px;
  }



  /* --- Download Box Mobile --- */
  .download-box__header {
    padding: 10px 16px;
  }

  .download-box__title {
    font-size: 16px;
  }

  .download-box__info {
    padding: 0 16px;
  }

  .download-box__row {
    flex-direction: column;
    gap: 2px;
    padding: 10px 0;
    font-size: 13px;
  }

  .download-box__actions {
    padding: 16px;
    flex-direction: column;
  }

  .download-box__actions .btn {
    width: 100%;
  }

  /* --- Tool Card Mobile --- */
  .tool-card {
    padding: 16px;
  }

  .tool-card__icon {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
  }

  .tool-card__title {
    font-size: 14px;
  }

  .tool-card__desc {
    font-size: 13px;
  }

  /* --- Software Card Mobile --- */
  .software-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .software-card__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
  }

  .software-card__info {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .software-card__badges {
    justify-content: center;
  }

  .software-card__title {
    font-size: 14px;
  }

  .software-card__excerpt {
    font-size: 12px;
  }

  /* --- Tools Section Mobile --- */
  .tools-section {
    padding: 20px;
    border-radius: var(--radius-lg);
  }

  /* --- Pagination Mobile --- */
  .pagination {
    margin: 24px 0;
  }

  .pagination .page-numbers {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
  }

  /* --- Comments Mobile --- */
  .comments-area {
    margin-top: 24px;
    padding-top: 20px;
  }

  .comment-list .comment-body {
    gap: 12px;
  }

  .comment-list .avatar {
    width: 40px;
    height: 40px;
  }

  /* --- Mobile Menu Improvements --- */
  .mobile-menu {
    width: 280px;
  }

  /* --- Contact Page Mobile --- */
  .contact-page__grid {
    grid-template-columns: 1fr;
  }

  /* --- Page Title Mobile --- */
  .page-title {
    font-size: 24px;
  }

  /* --- 404 Mobile --- */
  .no-results__title {
    font-size: 22px;
  }

  /* --- Ad Containers Mobile --- */
  .ad-container {
    margin: 16px 0;
  }

  .ad-container--reserved {
    min-height: 60px;
  }
}

/* Small phone screens */
@media (max-width: 374px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .entry-title {
    font-size: 20px;
  }

  .entry-content {
    font-size: 14.5px;
  }

  .section__title {
    font-size: 17px;
  }

  .post-card--featured {
    min-height: 200px;
  }

  .post-card--featured .post-card__overlay .post-card__title a {
    font-size: 16px;
  }

  .toc, #toc-container {
    padding: 12px 14px;
  }

  .toc__list, #toc-container ol, #toc-container ul {
    font-size: 12px;
    padding-left: 14px;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .sidebar-area,
  .post-navigation,
  .ad-container,
  .author-box,
  .download-box__action,
  .btn {
    display: none !important;
  }
  
  body {
    color: #000;
    background: #fff;
  }
  
  a {
    text-decoration: none;
    color: #000;
  }
  
  .content-area {
    width: 100% !important;
  }
}

/* ==========================================================================
   ADDITIONAL STYLES - Template Part Classes
   ========================================================================== */

/* === Nav Menu === */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.nav-menu > li > a {
  display: block;
  padding: 8px 16px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  text-decoration: none;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
  background-color: var(--surface-alt);
  color: var(--primary);
  text-decoration: none;
}



/* Mobile nav menu */
.mobile-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-menu li a {
  display: block;
  padding: 12px 20px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav-menu li a:hover {
  background-color: var(--surface-alt);
  color: var(--primary);
}

.mobile-nav-menu .has-children {
  position: relative;
}

.mobile-nav-menu .has-children > a {
  padding-right: 50px;
}

.mobile-nav-menu .submenu-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-left: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
}

.mobile-nav-menu .submenu-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  transition: transform 0.3s ease;
}

.mobile-nav-menu .submenu-toggle.is-active svg {
  transform: rotate(180deg);
}

.mobile-nav-menu .sub-menu {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: var(--surface-alt);
}

.mobile-nav-menu .sub-menu.is-open {
  display: block;
}

.mobile-nav-menu .sub-menu a {
  padding-left: 40px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* Mobile menu parts */
.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
}

.mobile-menu__close:hover {
  background-color: var(--surface-alt);
}

.mobile-menu__search {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu__footer {
  padding: 16px 20px;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
}

.mobile-dark-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
}

.mobile-dark-toggle:hover {
  background-color: var(--surface-alt);
}

/* === Dark Mode Icons === */
.dark-mode .icon-sun { display: none !important; }
.dark-mode .icon-moon { display: block !important; }
html.dark-mode .icon-sun { display: none !important; }
html.dark-mode .icon-moon { display: block !important; }
/* Logo light/dark mode toggle */
.site-logo__dark { display: none !important; }
.site-logo__light { display: inline-block !important; }

.dark-mode .site-logo__light,
html.dark-mode .site-logo__light { display: none !important; }
.dark-mode .site-logo__dark,
html.dark-mode .site-logo__dark { display: inline-block !important; }

/* === Hero Section Inner === */
.hero-section__inner {
  display: grid;
  gap: 20px;
}

@media (min-width: 1024px) {
  .hero-section__inner {
    grid-template-columns: 3fr 2fr;
  }
}

.hero-featured {
  position: relative;
}

.hero-sidebar-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Featured card overlay */
.post-card--featured {
  position: relative;
  min-height: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 768px) {
  .post-card--featured {
    min-height: 420px;
  }
}

.post-card--featured .post-card__image {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}

.post-card--featured .post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card--featured .post-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 24px 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: #fff;
  z-index: 2;
}

.post-card--featured .post-card__overlay .post-card__category a {
  color: #fff;
}

.post-card--featured .post-card__overlay .post-card__title {
  margin: 0 0 8px 0;
}

.post-card--featured .post-card__overlay .post-card__title a {
  color: #fff;
  font-size: 22px;
}

@media (min-width: 768px) {
  .post-card--featured .post-card__overlay .post-card__title a {
    font-size: 28px;
  }
}

.post-card--featured .post-card__overlay .post-card__meta {
  color: rgba(255,255,255,0.8);
}

.post-card--featured .post-card__overlay .post-card__author {
  margin-left: 8px;
}

/* Small horizontal card */
.post-card--sm {
  min-height: auto;
}

.post-card--horizontal.post-card--sm {
  flex-direction: row;
  align-items: stretch;
}

.post-card--sm .post-card__image {
  width: 120px;
  min-width: 120px;
  flex-shrink: 0;
  aspect-ratio: 3/2;
  overflow: hidden;
}

.post-card--sm .post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card--sm .post-card__content {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
}

.post-card--sm .post-card__title {
  font-size: 14px;
  margin-bottom: 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.post-card--sm .post-card__category a {
  font-size: 10px;
}

.post-card--sm .post-card__meta {
  font-size: 12px;
}

/* === Section variants === */
.section__header--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section__header--center .section__title::before {
  display: none;
}

.section__subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 8px;
  margin-bottom: 0;
}

.section__footer {
  text-align: center;
  margin-top: 32px;
}

/* === Entry (Single Post) === */
.entry-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.category-badge {
  display: inline-block;
  background-color: var(--primary);
  color: #fff;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none !important;
  letter-spacing: 0.5px;
}

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

.entry-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.entry-meta__updated {
  font-style: italic;
  opacity: 0.8;
}

.entry-thumbnail {
  margin: 24px 0 32px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.entry-thumbnail img {
  width: 100%;
  height: auto;
}

.entry-thumbnail figcaption {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0;
}

/* === Entry Footer === */
.entry-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  margin-top: 32px;
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.entry-tags__label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
}

.tag-pill {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--surface-alt);
  color: var(--text-secondary);
  font-size: 13px;
  border-radius: 20px;
  text-decoration: none !important;
  transition: var(--transition-fast);
}

.tag-pill:hover {
  background-color: var(--primary);
  color: #fff;
}

/* Share buttons */
.entry-share {
  display: flex;
  align-items: center;
  gap: 12px;
}

.entry-share__label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
}

.entry-share__buttons {
  display: flex;
  gap: 8px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: var(--transition-fast);
  text-decoration: none !important;
}

.share-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.share-btn--facebook:hover { color: #1877F2; border-color: #1877F2; }
.share-btn--twitter:hover { color: #1DA1F2; border-color: #1DA1F2; }
.share-btn--telegram:hover { color: #0088cc; border-color: #0088cc; }

.share-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* === Post Navigation === */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 40px 0;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.post-navigation__link {
  display: block;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-decoration: none !important;
  transition: var(--transition-fast);
}

.post-navigation__link:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.post-navigation__next {
  text-align: right;
}

.post-navigation__label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.post-navigation__next .post-navigation__label {
  justify-content: flex-end;
}

.post-navigation__title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.post-navigation__label svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* === Author Box === */
.author-box {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin: 32px 0;
}

.author-box__avatar img,
.author-box__img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.author-box__info {
  flex: 1;
}

.author-box__name {
  font-size: 18px;
  margin: 0 0 8px 0;
}

.author-box__name a {
  color: var(--text-primary);
  text-decoration: none;
}

.author-box__bio {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.author-box__link {
  font-size: 14px;
  font-weight: 500;
}

/* === Related Posts === */
.related-posts {
  margin: 40px 0;
}

.related-posts__title {
  font-size: 22px;
  margin: 0 0 20px 0;
  padding-left: 12px;
  position: relative;
}

.related-posts__title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background-color: var(--accent);
  border-radius: 4px;
}

/* === Search Results === */
.search-result {
  margin-bottom: 24px;
}

.search-result__inner {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
}

.search-result__inner:hover {
  box-shadow: var(--shadow-sm);
}

.search-result__image {
  width: 160px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.search-result__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result__content {
  flex: 1;
}

.search-result__type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  font-weight: 600;
}

.search-result__title {
  font-size: 18px;
  margin: 4px 0 6px;
}

.search-result__title a {
  color: var(--text-primary);
}

.search-result__url {
  font-size: 12px;
  color: var(--success);
  margin-bottom: 6px;
}

.search-result__excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.search-result__meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

/* === Tools Filter === */
.tools-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.tools-filter__btn {
  padding: 6px 16px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none !important;
  transition: var(--transition-fast);
}

.tools-filter__btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tools-filter__btn--active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* === Tool status badges === */
.tool-card__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.tool-card__badge--soon {
  background-color: var(--warning);
  color: #000;
}

.tool-card__badge--maintenance {
  background-color: var(--danger);
  color: #fff;
}

/* === Software Grid === */
.software-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .software-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Software badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background-color: var(--surface-alt);
  color: var(--text-secondary);
}

.badge--version {
  background-color: var(--primary);
  color: #fff;
}

.badge--free {
  background-color: var(--success);
  color: #fff;
}

.badge--paid {
  background-color: var(--warning);
  color: #000;
}

/* === Download Box === */
.download-box {
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 24px 0;
}

.download-box__header {
  background: var(--primary);
  padding: 12px 20px;
}

.download-box__title {
  color: #fff;
  font-size: 18px;
  margin: 0;
}

.download-box__info {
  padding: 0 20px;
}

.download-box__row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.download-box__label {
  color: var(--text-secondary);
  font-weight: 500;
}

.download-box__value {
  color: var(--text-primary);
  font-weight: 600;
}

.download-box__actions {
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.download-box__note {
  padding: 0 20px 16px;
  font-size: 12px;
  color: var(--text-muted);
}

/* === Version Badge === */
.version-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 8px;
}

/* === Notices === */
.notice {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 14px;
}

.notice--info {
  background-color: #DBEAFE;
  border-left: 4px solid var(--primary);
  color: #1E40AF;
}

.notice--warning {
  background-color: #FEF3C7;
  border-left: 4px solid var(--warning);
  color: #92400E;
}

.notice--tip {
  background-color: #D1FAE5;
  border-left: 4px solid var(--success);
  color: #065F46;
}

.notice--danger {
  background-color: #FEE2E2;
  border-left: 4px solid var(--danger);
  color: #991B1B;
}

.dark-mode .notice--info,
html.dark-mode .notice--info { background-color: #1E3A5F; color: #93C5FD; }
.dark-mode .notice--warning,
html.dark-mode .notice--warning { background-color: #422006; color: #FCD34D; }
.dark-mode .notice--tip,
html.dark-mode .notice--tip { background-color: #064E3B; color: #6EE7B7; }
.dark-mode .notice--danger,
html.dark-mode .notice--danger { background-color: #450A0A; color: #FCA5A5; }

/* === Footer Widgets Grid === */
.footer-widgets__grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-widgets__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-widgets__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-widget__logo {
  margin-bottom: 16px;
}

.footer-widget__logo img {
  max-height: 40px;
  width: auto;
}

.footer-widget__desc {
  font-size: 14px;
  color: #94A3B8;
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-widget__title {
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #334155;
}

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

.footer-widget__list li {
  margin-bottom: 8px;
}

.footer-widget__list a {
  color: #94A3B8;
  font-size: 14px;
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-widget__list a:hover {
  color: #FFFFFF;
  text-decoration: none;
}

.footer-social {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background-color: #1E293B;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  color: #94A3B8 !important;
  font-size: 13px;
  text-decoration: none !important;
  transition: var(--transition-fast);
}

.footer-social__link:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff !important;
}

/* Footer bottom */
.footer-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 16px;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
}

.footer-bottom__copyright {
  font-size: 14px;
  color: #94A3B8;
  margin: 0;
}

/* Back to top */
.back-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  opacity: 0.8;
}

.back-to-top:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* === No Results === */
.no-results__inner {
  text-align: center;
  padding: 48px 0;
}

.no-results__title {
  font-size: 28px;
  margin-bottom: 16px;
}

.no-results__message {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.no-results__search {
  max-width: 500px;
  margin: 0 auto 32px;
}

.no-results__suggestions h3 {
  font-size: 20px;
  margin-bottom: 16px;
}

/* === Page Header === */
.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 28px;
  margin: 0 0 8px 0;
}

@media (min-width: 768px) {
  .page-title {
    font-size: 36px;
  }
}

.page-description {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

/* === Comments === */
.comments-area {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.comments-title {
  font-size: 22px;
  margin: 0 0 24px 0;
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment-list .comment {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.comment-list .comment-body {
  display: flex;
  gap: 16px;
}

.comment-list .avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
}

.comment-form {
  margin-top: 24px;
}

.comment-form label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition-fast);
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.comment-form .form-submit .submit {
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.comment-form .form-submit .submit:hover {
  background: var(--primary-dark);
}

/* === Contact Form === */
.contact-page__grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .contact-page__grid {
    grid-template-columns: 3fr 2fr;
  }
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 14px;
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.contact-info__item {
  margin-bottom: 16px;
}

.contact-info__item strong {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* === FAQ === */
.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-item__question {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item__question::-webkit-details-marker { display: none; }

.faq-item__answer {
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === Sitemap === */
.sitemap-section {
  margin-bottom: 32px;
}

.sitemap-section h2 {
  font-size: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}

.sitemap-list {
  list-style: disc;
  padding-left: 20px;
}

.sitemap-list li {
  margin-bottom: 6px;
}

.sitemap-date {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 32px 0;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none !important;
  transition: var(--transition-fast);
}

.pagination .page-numbers:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination .page-numbers.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Additional breadcrumb overrides handled above */

/* === Misc === */
.post-card__category a {
  color: #fff;
  text-decoration: none !important;
}

.post-card__excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Software sections */
.software-section {
  margin-bottom: 24px;
}

.changelog-content {
  font-size: 14px;
  line-height: 1.8;
}

.tool-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.tool-status-badge--coming-soon {
  background: var(--warning);
  color: #000;
}

.tool-status-badge--maintenance {
  background: var(--danger);
  color: #fff;
}

.tool-area {
  margin: 24px 0;
}

.tool-area--embedded iframe {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.tool-faq {
  margin-top: 32px;
}

.related-tools {
  margin: 40px 0;
}

.related-tools h2 {
  font-size: 22px;
  margin-bottom: 20px;
}

/* Software screenshot */
.software-screenshot {
  margin: 16px 0 24px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

/* Search form */
.search-form {
  display: flex;
  gap: 0;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 14px;
}

.search-form button[type="submit"] {
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  cursor: pointer;
}

/* === Content + Sidebar Layout === */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .content-with-sidebar {
    grid-template-columns: 1fr 320px;
    gap: 40px;
  }
}

/* === Sidebar === */
.sidebar-area {
  min-width: 0;
}

.sidebar-sticky {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

/* --- Sidebar: Xem nhanh (Trending posts) --- */
.sidebar-trending {
  margin-bottom: 28px;
}

.sidebar-trending__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sidebar-trending__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.sidebar-trending__more {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.sidebar-trending__more:hover {
  text-decoration: underline;
}

.sidebar-trending__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-trending__item {
  border-bottom: 1px solid var(--border-color);
}

.sidebar-trending__item:last-child {
  border-bottom: none;
}

.sidebar-trending__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  text-decoration: none;
  transition: var(--transition-fast);
  position: relative;
  padding-left: 14px;
}

.sidebar-trending__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: background 0.2s ease;
}

.sidebar-trending__link:hover::before {
  background: var(--primary);
}

.sidebar-trending__text {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.sidebar-trending__link:hover .sidebar-trending__text {
  color: var(--primary);
}

.sidebar-trending__thumb {
  flex-shrink: 0;
  width: 72px;
  height: 54px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sidebar-trending__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Sidebar: Xu hướng Tags --- */
.sidebar-tags {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-tags__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.sidebar-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-tags__tag {
  display: inline-block;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  text-decoration: none;
  transition: var(--transition-fast);
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--surface);
}

.sidebar-tags__tag:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  text-decoration: none;
}

/* Colorful tag variants */
.sidebar-tags__tag:nth-child(1) { border-color: #2563EB; color: #2563EB; }
.sidebar-tags__tag:nth-child(2) { border-color: #7C3AED; color: #7C3AED; }
.sidebar-tags__tag:nth-child(3) { border-color: #DC2626; color: #DC2626; }
.sidebar-tags__tag:nth-child(4) { border-color: #059669; color: #059669; }
.sidebar-tags__tag:nth-child(5) { border-color: #D97706; color: #D97706; }
.sidebar-tags__tag:nth-child(6) { border-color: #9333EA; color: #9333EA; }
.sidebar-tags__tag:nth-child(7) { border-color: #0891B2; color: #0891B2; }
.sidebar-tags__tag:nth-child(8) { border-color: #E11D48; color: #E11D48; }

.sidebar-tags__tag:nth-child(1):hover,
.sidebar-tags__tag:nth-child(2):hover,
.sidebar-tags__tag:nth-child(3):hover,
.sidebar-tags__tag:nth-child(4):hover,
.sidebar-tags__tag:nth-child(5):hover,
.sidebar-tags__tag:nth-child(6):hover,
.sidebar-tags__tag:nth-child(7):hover,
.sidebar-tags__tag:nth-child(8):hover {
  color: #fff;
}

.sidebar-tags__tag:nth-child(1):hover { background: #2563EB; }
.sidebar-tags__tag:nth-child(2):hover { background: #7C3AED; }
.sidebar-tags__tag:nth-child(3):hover { background: #DC2626; }
.sidebar-tags__tag:nth-child(4):hover { background: #059669; }
.sidebar-tags__tag:nth-child(5):hover { background: #D97706; }
.sidebar-tags__tag:nth-child(6):hover { background: #9333EA; }
.sidebar-tags__tag:nth-child(7):hover { background: #0891B2; }
.sidebar-tags__tag:nth-child(8):hover { background: #E11D48; }

/* Dark mode tags */
html.dark-mode .sidebar-tags__tag,
.dark-mode .sidebar-tags__tag {
  background: transparent;
}

/* --- Sidebar: Bài mới --- */
.sidebar-recent {
  margin-bottom: 24px;
}

.sidebar-recent__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--text-primary);
}

.sidebar-recent__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.sidebar-recent__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-recent__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-recent__item:first-child {
  padding-top: 0;
}

.sidebar-recent__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-recent__thumb {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sidebar-recent__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.sidebar-recent__item:hover .sidebar-recent__thumb img {
  transform: scale(1.05);
}

.sidebar-recent__content {
  flex: 1;
  min-width: 0;
}

.sidebar-recent__item-title {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  margin: 0;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-recent__item-title a {
  color: inherit;
  text-decoration: none;
}

.sidebar-recent__item-title a:hover {
  color: var(--primary);
}

/* Sidebar responsive */
@media (max-width: 1023px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }
  .sidebar-area {
    display: none;
  }
}
