/* ==========================================================================
   Nosomovo Tech Theme - Main Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & Color Variables
   -------------------------------------------------------------------------- */
:root {
  /* Light Theme Palette */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.85);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  
  --accent-primary: #0284c7;
  --accent-hover: #0369a1;
  --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  --accent-gradient-hover: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  --accent-light: #e0f2fe;
  
  --badge-bg: #f0f9ff;
  --badge-text: #0369a1;
  --code-bg: #0f172a;
  --code-text: #38bdf8;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.25);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;

  --max-width-container: 1280px;
  --max-width-article: 840px;
  --header-height: 72px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --bg-body: #0b0f19;
  --bg-surface: #151d2a;
  --bg-surface-hover: #1e293b;
  --bg-glass: rgba(21, 29, 42, 0.85);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-color: #1e293b;
  --border-hover: #334155;
  
  --accent-primary: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  --accent-gradient-hover: linear-gradient(135deg, #7dd3fc 0%, #a5b4fc 100%);
  --accent-light: rgba(56, 189, 248, 0.15);
  
  --badge-bg: rgba(56, 189, 248, 0.12);
  --badge-text: #38bdf8;
  --code-bg: #030712;
  --code-text: #7dd3fc;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.3);
}

/* --------------------------------------------------------------------------
   2. Reset & General Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width-container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   3. Header & Navigation Bar
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

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

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.site-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.site-title a {
  color: var(--text-primary);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Navigation Links */
.main-navigation {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
}

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

/* Caret indicator for menu items with children */
.nav-menu li.menu-item-has-children > a::after,
.nav-menu li.page_item_has_children > a::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 0.2rem;
  margin-top: -3px;
  transition: transform var(--transition-fast);
}

.nav-menu li.menu-item-has-children:hover > a::after,
.nav-menu li.menu-item-has-children.is-open > a::after,
.nav-menu li.page_item_has_children:hover > a::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}

/* 2-Level & Multi-Level Dropdown Sub-menu */
.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 1000;
  list-style: none;
}

/* Hover Bridge element to prevent closing when moving cursor */
.sub-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu,
.nav-menu li.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu li {
  width: 100%;
}

.sub-menu a {
  display: block;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0;
  transition: all var(--transition-fast);
  width: 100%;
}

.sub-menu a:hover,
.sub-menu li.current-menu-item > a {
  color: var(--accent-primary);
  background-color: var(--bg-surface-hover);
  padding-left: 1.5rem;
}

/* Nested 3rd Level Sub-menu (Pops to side on desktop) */
.sub-menu .sub-menu {
  top: 0;
  left: 100%;
  margin-top: -0.5rem;
  margin-left: 0.25rem;
}

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

/* Action Buttons (Search & Theme Toggle) */
.header-action-btn,
.theme-toggle-btn {
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.header-action-btn:hover,
.theme-toggle-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: scale(1.05);
}

/* Search Form Component */
.search-form {
  position: relative;
  width: 100%;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-field {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
}

.search-field:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-light);
  background: var(--bg-surface);
}

.search-submit {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-submit:hover {
  background: var(--accent-hover);
}

/* Live Search Results Dropdown Popup */
.live-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  display: none;
  overflow: hidden;
}

.live-search-results.has-results {
  display: block;
  animation: dropdown-slide-down 0.25s ease-out;
}

@keyframes dropdown-slide-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.live-search-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.live-search-item {
  border-bottom: 1px solid var(--border-color);
}

.live-search-item:last-child {
  border-bottom: none;
}

.live-search-item a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.live-search-item a:hover {
  background-color: var(--bg-surface-hover);
}

.live-search-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.live-search-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.live-search-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.live-search-cat {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
}

.live-search-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-search-date {
  font-size: 0.725rem;
  color: var(--text-muted);
}

.live-search-view-all {
  display: block;
  text-align: center;
  padding: 0.65rem;
  background: var(--bg-body);
  color: var(--accent-primary);
  font-size: 0.825rem;
  font-weight: 700;
  text-decoration: none;
  border-top: 1px solid var(--border-color);
}

.live-search-view-all:hover {
  background: var(--accent-light);
}

.live-search-empty {
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Search Modal Overlay (Header Quick Search) */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.search-modal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 90%;
  max-width: 640px;
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.25s ease;
}

.search-modal-overlay.is-active .search-modal-container {
  transform: translateY(0);
}

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

.search-modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.search-modal-close-btn {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.search-modal-close-btn:hover {
  color: var(--text-primary);
}

.search-modal-body {
  padding: 1.5rem;
}

.search-quick-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.search-quick-tags a {
  color: var(--text-secondary);
  background: var(--bg-body);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.search-quick-tags a:hover {
  color: #fff;
  background: var(--accent-primary);
  border-color: transparent;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* --------------------------------------------------------------------------
   4. Hero Section - Product Showcase Hub
   -------------------------------------------------------------------------- */
.hero-showcase {
  padding: 3rem 0;
  background: radial-gradient(circle at 50% 0%, var(--accent-light) 0%, transparent 70%);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 3rem;
}

.hero-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.825rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid rgba(14, 165, 233, 0.3);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* Product Cards Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.product-card:hover::before {
  opacity: 1;
}

.product-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.product-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 700;
  text-transform: uppercase;
}

.product-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-top: auto;
}

.product-link svg {
  transition: transform var(--transition-fast);
}

.product-card:hover .product-link svg {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   5. Main Content & Post Feed Cards
   -------------------------------------------------------------------------- */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.main-layout.no-sidebar {
  grid-template-columns: 1fr;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.85rem;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
}

/* Post Cards Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.post-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

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

.post-thumbnail-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--bg-surface-hover);
}

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

.post-card:hover .post-thumbnail {
  transform: scale(1.05);
}

.post-category-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.post-content-wrap {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

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

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

.post-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.775rem;
  color: var(--text-muted);
}

.post-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.post-author img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

/* Pagination */
.pagination {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
}

/* --------------------------------------------------------------------------
   6. Sidebar & Widgets
   -------------------------------------------------------------------------- */
.sidebar-widget {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-light);
  color: var(--text-primary);
}

.widget-recent-posts li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.widget-recent-posts a {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  display: block;
}

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

.widget-post-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   7. Single Article Page
   -------------------------------------------------------------------------- */
.single-article {
  max-width: var(--max-width-article);
  margin: 0 auto;
}

.article-header {
  margin-bottom: 2rem;
  text-align: center;
}

.article-category {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-weight: 700;
  font-size: 0.825rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.article-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-featured-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
}

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

.article-content h2,
.article-content h3,
.article-content h4 {
  font-weight: 800;
  margin: 2rem 0 1rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.article-content h2 { font-size: 1.65rem; }
.article-content h3 { font-size: 1.35rem; }

.article-content pre,
.article-content code {
  font-family: var(--font-mono);
}

.article-content pre {
  background-color: var(--code-bg);
  color: var(--code-text);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  line-height: 1.5;
}

.article-content p code {
  background-color: var(--badge-bg);
  color: var(--badge-text);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
}

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

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .site-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 320px;
}

.footer-widget-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

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

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   8.5. Hot Topics & Trending Articles Section
   -------------------------------------------------------------------------- */
.hot-topics-section {
  padding: 3rem 0;
  margin-bottom: 2.5rem;
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.04) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-color);
}

.hot-section-header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.hot-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.hot-section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0.25rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hot-section-subtitle {
  color: var(--text-secondary);
  font-size: 0.975rem;
  margin-top: 0.35rem;
}

.hot-topics-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.hot-bar-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
}

.hot-chips-scroll {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.hot-chips-scroll::-webkit-scrollbar {
  display: none;
}

.hot-chip {
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.hot-chip:hover,
.hot-chip.active {
  color: #ffffff;
  background: var(--accent-gradient);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

.hot-magazine-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.75rem;
  align-items: stretch;
}

.hot-featured-main {
  display: flex;
  height: 100%;
}

.hot-main-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  width: 100%;
}

.hot-main-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--accent-primary);
}

.hot-main-thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
  background: #0f172a;
}

.hot-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
}

.hot-main-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hot-main-card:hover .hot-main-thumb {
  transform: scale(1.05);
}

.hot-main-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: 1px;
}

.hot-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
  pointer-events: none;
}

.hot-badges-group {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  z-index: 2;
}

.hot-badge-flame {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  color: #ffffff;
  font-size: 0.725rem;
  font-weight: 800;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.hot-cat-badge {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.hot-main-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hot-main-title {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

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

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

.hot-main-excerpt {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.hot-main-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
}

.hot-meta-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.hot-sub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.hot-sub-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--bg-surface);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  position: relative;
}

.hot-sub-card:hover {
  transform: translateX(4px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.hot-sub-thumb-wrap {
  position: relative;
  width: 110px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0f172a;
}

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

.hot-sub-card:hover .hot-sub-thumb {
  transform: scale(1.08);
}

.hot-sub-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
}

.hot-sub-number {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.hot-sub-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.hot-sub-cat {
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 0.25rem;
}

.hot-sub-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.hot-sub-title a {
  color: var(--text-primary);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--transition-fast);
}

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

.hot-sub-meta {
  font-size: 0.775rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* --------------------------------------------------------------------------
   8.6. Services Showcase Section
   -------------------------------------------------------------------------- */
.services-showcase-section {
  padding: 3.5rem 0;
  margin-bottom: 2.5rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.services-header {
  max-width: 680px;
  margin: 0 auto 2.5rem auto;
  text-align: center;
}

.services-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.services-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.services-subtitle {
  color: var(--text-secondary);
  font-size: 0.975rem;
  line-height: 1.6;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.35rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-color, var(--accent-primary));
  opacity: 0.85;
  transition: height 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--card-color, var(--accent-primary));
}

.service-card:hover::before {
  height: 6px;
}

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.service-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.service-icon {
  font-size: 1.5rem;
}

.service-tag {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--card-color, var(--accent-primary));
  background: var(--bg-surface);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  text-transform: uppercase;
}

.service-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.service-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.service-features {
  list-style: none;
  margin-bottom: 1.5rem;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.service-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.check-icon {
  color: var(--card-color, var(--accent-primary));
  flex-shrink: 0;
  margin-top: 2px;
}

.service-footer {
  margin-top: auto;
}

.service-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--card-color, var(--accent-primary));
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.service-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* --------------------------------------------------------------------------
   9. Mobile Responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hot-magazine-grid {
    grid-template-columns: 1fr;
  }
  .main-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.75rem;
  }
  
  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-lg);
  }
  
  .main-navigation.is-open {
    display: flex;
  }
  
  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu li.menu-item-has-children,
  .nav-menu li.page_item_has_children {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .nav-menu li.menu-item-has-children > a,
  .nav-menu li.page_item_has_children > a {
    flex: 1;
  }

  .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background-color: var(--bg-body);
    border-left: 2px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    margin: 0.25rem 0 0.5rem 0.75rem;
    padding: 0.25rem 0.5rem;
    display: none;
    width: 100%;
    min-width: 0;
  }

  .sub-menu::before {
    display: none;
  }

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

  .sub-menu .sub-menu {
    margin-left: 0.75rem;
  }

  .mobile-menu-btn {
    display: block;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Floating Scroll To Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.back-to-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.5);
  background: var(--accent-gradient-hover);
}
