/* ═══════════════════════════════════════════════════
TECHHAMO DESIGN SYSTEM v10.0 - PRODUCTION READY
Brand: Blue #1d4ed8 · Black #0a0a0a · White #fff
═══════════════════════════════════════════════════ */

/* ─ DESIGN TOKENS ── */
:root {
  --blue-900: #1e3a8a;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  
  --black-950: #0a0a0a;
  --black-900: #111827;
  --black-800: #1f2937;
  --black-700: #374151;
  --black-600: #4b5563;
  --black-500: #6b7280;
  --black-400: #9ca3af;
  --black-300: #d1d5db;
  --black-200: #e5e7eb;
  --black-100: #f3f4f6;
  --black-50: #f9fafb;
  
  --primary: var(--blue-700);
  --primary-dark: var(--blue-800);
  --primary-light: var(--blue-500);
  --primary-bg: var(--blue-50);
  --primary-border: var(--blue-100);
  --primary-glow: rgba(29, 78, 216, 0.18);
  
  --text-primary: var(--black-950);
  --text-secondary: var(--black-700);
  --text-muted: var(--black-500);
  --text-subtle: var(--black-400);
  --text-disabled: var(--black-300);
  
  --bg-page: #fff;
  --bg-subtle: var(--black-50);
  --bg-muted: var(--black-100);
  --bg-inverse: var(--black-950);
  
  --border: var(--black-200);
  --border-2: var(--black-100);
  
  --cat-news: #1d4ed8;
  --cat-news-bg: #eff6ff;
  --cat-review: #0d9488;
  --cat-review-bg: #f0fdfa;
  --cat-ai: #7c3aed;
  --cat-ai-bg: #f5f3ff;
  --cat-gaming: #b45309;
  --cat-gaming-bg: #fffbeb;
  --cat-tutorial: #0891b2;
  --cat-tut-bg: #ecfeff;
  --cat-media: #1d4ed8;
  --cat-media-bg: #eff6ff;
  
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.09), 0 4px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.06);
  
  --r-xs: 2px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-2xl: 32px;
  
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --fast: 0.15s;
  --base: 0.22s;
  --slow: 0.35s;
  
  --font: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  
  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  
  --lh-tight: 1.3;
  --lh-snug: 1.5;
  --lh-normal: 1.75;
  --lh-loose: 1.9;
  
  --header-h: 54px;
  --topbar-h: 34px;
  --container: 1260px;
  --sidebar: 300px;
}

/* ─ DARK MODE ── */
[data-theme="dark"] {
  --primary: var(--blue-500);
  --primary-dark: var(--blue-600);
  --primary-light: var(--blue-500);
  --primary-bg: #172554;
  --primary-border: #1e3a8a;
  --primary-glow: rgba(59, 130, 246, 0.2);
  
  --text-primary: #f9fafb;
  --text-secondary: #e5e7eb;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  --text-disabled: #4b5563;
  
  --bg-page: #080d1a;
  --bg-subtle: #0e1628;
  --bg-muted: #131f35;
  --bg-inverse: #000;
  
  --border: #1e3055;
  --border-2: #162540;
  
  --cat-news-bg: #172554;
  --cat-review-bg: #042f2e;
  --cat-ai-bg: #2e1065;
  --cat-gaming-bg: #431407;
  --cat-tut-bg: #083344;
  --cat-media-bg: #172554;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.65);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.8), 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ── RESET & BASE ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  direction: rtl;
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: var(--bg-page);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "ss02";
  text-rendering: optimizeLegibility;
  transition: background var(--base) var(--ease), color var(--base) var(--ease);
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  color: inherit;
}

input, textarea, select {
  font-family: var(--font);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── LAYOUT ── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

/* ── TOPBAR ── */
.topbar {
  height: var(--topbar-h);
  background: var(--black-950);
  display: flex;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--black-400);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .topbar {
  background: #000;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  min-width: 0;
}

.topbar__left span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.topbar__right a {
  color: var(--black-500);
  transition: color var(--fast);
  font-size: var(--text-xs);
}

.topbar__right a:hover {
  color: var(--black-300);
}

.topbar__divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
}

/* ── STICKY HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 2px solid var(--border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: background var(--base), border-color var(--base), box-shadow var(--base);
}

.site-header.scrolled {
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.09);
  border-bottom-color: transparent;
}

[data-theme="dark"] .site-header {
  background: rgba(8, 13, 26, 0.97);
  border-color: var(--border);
}

[data-theme="dark"] .site-header.scrolled {
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

/* ── LOGO ── */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
  margin-inline-end: 4px;
}

.logo__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo__en {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(135deg, var(--blue-700) 0%, var(--blue-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo__fa {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
  text-transform: none;
  margin-top: 1px;
}

[data-theme="dark"] .logo__en {
  background: linear-gradient(135deg, var(--blue-400) 0%, var(--blue-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.logo:hover .logo__en {
  opacity: 0.85;
}

/* ─ NAVIGATION ── */
.nav-strip {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 1;
  justify-content: center;
}

.nav-item {
  position: relative;
}

.nav-item > a,
.nav-item > button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--fast), background var(--fast);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  min-height: 40px;
}

.nav-item > a .nav-chevron,
.nav-item > button .nav-chevron {
  font-size: 0.55rem;
  transition: transform var(--base) var(--ease);
  opacity: 0.55;
}

.nav-item:hover > a,
.nav-item:hover > button,
.nav-item > a.active {
  color: var(--text-primary);
  background: var(--bg-muted);
}

.nav-item > a.active {
  color: var(--primary);
  background: var(--primary-bg);
  font-weight: 700;
}

.nav-item:hover > button .nav-chevron {
  transform: rotate(-90deg);
}

.nav-item[data-cat="news"]:hover > button,
.nav-item[data-cat="news"]:hover > a {
  color: var(--cat-news);
}

.nav-item[data-cat="ai"]:hover > button,
.nav-item[data-cat="ai"]:hover > a {
  color: var(--cat-ai);
}

.nav-item[data-cat="gaming"]:hover > button,
.nav-item[data-cat="gaming"]:hover > a {
  color: var(--cat-gaming);
}

.nav-item[data-cat="tutorial"]:hover > button,
.nav-item[data-cat="tutorial"]:hover > a {
  color: var(--cat-tutorial);
}

/* ── DROPDOWN ── */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition: opacity var(--base) var(--ease), transform var(--base) var(--ease), visibility var(--base);
  z-index: 200;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 16px;
  width: 12px;
  height: 12px;
  background: var(--bg-page);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transform: rotate(-45deg);
  border-radius: 2px;
}

.dropdown__header {
  padding: 5px 10px 3px;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--text-disabled);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--fast), color var(--fast);
  white-space: nowrap;
  min-height: 40px;
  text-decoration: none;
}

.dropdown__item .dd-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
  background: var(--bg-muted);
  color: var(--text-muted);
  transition: background var(--fast), color var(--fast);
}

.dropdown__item:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.dropdown__item:hover .dd-icon {
  background: var(--primary);
  color: #fff;
}

.dropdown__divider {
  height: 1px;
  background: var(--border-2);
  margin: 4px 0;
}

/* ── HEADER ACTIONS ── */
.header__actions {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-inline-start: auto;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color var(--fast), background var(--fast), transform var(--fast);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
  transform: scale(1.05);
}

.icon-btn:active {
  transform: scale(0.96);
}

.btn-tg {
  background: var(--primary);
  color: #fff;
  padding: 7px 15px;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: background var(--fast), box-shadow var(--fast), transform var(--fast);
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.3);
}

.btn-tg:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(29, 78, 216, 0.4);
  transform: translateY(-1px);
}

.btn-tg:active {
  transform: translateY(0);
}

.btn-tg .btn-label {
  display: none;
}

@media (min-width: 560px) {
  .btn-tg .btn-label {
    display: inline;
  }
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 10px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--base) var(--ease), opacity var(--base), width var(--base);
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── MOBILE NAV ── */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  width: min(300px, 84vw);
  background: var(--bg-page);
  z-index: 80;
  padding: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform: translateX(110%);
  transition: transform var(--slow) var(--ease);
  box-shadow: var(--shadow-xl);
  border-left: 1px solid var(--border);
}

.mobile-nav.open {
  transform: translateX(0);
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 79;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}

.nav-backdrop.open {
  display: block;
}

.mobile-nav__label {
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--text-disabled);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 12px 4px;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
  transition: background var(--fast);
  min-height: 48px;
}

.mobile-nav a:hover,
.mobile-nav a:active {
  background: var(--bg-muted);
}

.mobile-nav .nav-ico {
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.mobile-nav hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 6px 0;
}

.mobile-nav__footer {
  margin-top: auto;
  padding-top: 12px;
  padding-bottom: env(safe-area-inset-bottom, 12px);
}

.mobile-nav__tg {
  background: var(--primary);
  color: #fff;
  justify-content: center;
  border-radius: var(--r-md);
  font-weight: 700;
}

.mobile-nav__tg:hover {
  background: var(--primary-dark) !important;
}

.mobile-nav__theme {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
  min-height: 48px;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
  width: 100%;
  transition: background var(--fast);
}

.mobile-nav__theme:hover {
  background: var(--bg-muted);
}

/* ── SEARCH OVERLAY ── */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--base) var(--ease);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 16px 0;
  backdrop-filter: blur(5px);
}

.search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.search-box {
  background: var(--bg-page);
  border-radius: var(--r-xl);
  width: min(660px, 100%);
  padding: 20px;
  box-shadow: var(--shadow-xl);
  transform: translateY(-10px) scale(0.98);
  transition: transform var(--base) var(--ease);
  border: 1px solid var(--border);
}

.search-overlay.open .search-box {
  transform: translateY(0) scale(1);
}

.search-box__row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--primary);
  border-radius: var(--r-md);
  padding: 10px 14px;
  background: var(--bg-subtle);
}

.search-box__row input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font);
  background: transparent;
  color: var(--text-primary);
}

.search-box__row input::placeholder {
  color: var(--text-subtle);
}

.search-hints {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-hint {
  background: var(--bg-muted);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: var(--text-xs);
  border: 1px solid var(--border);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: all var(--fast);
  font-family: var(--font);
}

.search-hint:hover {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary-border);
}

#search-results {
  margin-top: 10px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--r-sm);
  transition: background var(--fast);
  cursor: pointer;
}

.search-result-item:hover {
  background: var(--bg-muted);
}

.search-result-item__thumb {
  width: 52px;
  height: 40px;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-muted);
}

.search-result-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-item__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.search-result-item__meta {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  margin-top: 2px;
}

.search-no-results {
  padding: 24px 12px;
  text-align: center;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .search-overlay {
    padding: 0;
    align-items: flex-end;
  }
  
  .search-box {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    max-width: 100%;
    padding: 20px 16px 32px;
  }
}

/* ── CATEGORY TAGS ── */
.cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: transform var(--fast);
}

.cat-tag--news {
  background: var(--cat-news-bg);
  color: var(--cat-news);
}

.cat-tag--reviews {
  background: var(--cat-review-bg);
  color: var(--cat-review);
}

.cat-tag--ai {
  background: var(--cat-ai-bg);
  color: var(--cat-ai);
}

.cat-tag--gaming {
  background: var(--cat-gaming-bg);
  color: var(--cat-gaming);
}

.cat-tag--tutorial {
  background: var(--cat-tut-bg);
  color: var(--cat-tutorial);
}

.cat-tag--media {
  background: var(--cat-media-bg);
  color: var(--cat-media);
}

/* ── SECTIONS ── */
.section {
  padding: 40px 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.section__title {
  font-size: clamp(0.95rem, 2vw, var(--text-lg));
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section__title::before {
  content: "";
  display: block;
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, var(--primary), var(--blue-400));
  border-radius: 2px;
  flex-shrink: 0;
}

.section__more {
  font-size: var(--text-sm);
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap var(--fast), opacity var(--fast);
  white-space: nowrap;
  min-height: 36px;
  padding: 0 4px;
  border-radius: var(--r-sm);
}

.section__more:hover {
  gap: 8px;
  opacity: 0.8;
}

.section__icon {
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ── HERO ── */
.hero {
  padding: 16px 0 24px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 14px;
  align-items: stretch;
}

.hero__main {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--bg-muted);
  box-shadow: var(--shadow-md);
}

.hero__main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) var(--ease);
}

.hero__main:hover .hero__main-img {
  transform: scale(1.025);
}

.hero__main-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.42) 45%, rgba(0, 0, 0, 0.05) 100%);
}

.hero__main-body {
  position: relative;
  z-index: 1;
  padding: 28px;
}

.hero__main-body .cat-tag {
  margin-bottom: 10px;
}

.hero__main-body h1 {
  font-size: clamp(1.05rem, 2.8vw, 1.65rem);
  font-weight: 800;
  color: #fff;
  line-height: var(--lh-tight);
  margin-bottom: 12px;
}

.hero__main-body h1 a {
  color: #fff;
}

.hero__main-body h1 a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

.hero__meta {
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--text-xs);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero__meta .sep {
  opacity: 0.4;
}

.hero__side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: stretch;
}

.hero__side-card {
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  flex: 1;
  min-height: 196px;
  background: var(--bg-muted);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero__side-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) var(--ease);
}

.hero__side-card:hover img {
  transform: scale(1.04);
}

.hero__side-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.12) 55%, transparent 100%);
}

.hero__side-body {
  position: relative;
  z-index: 1;
  padding: 14px;
}

.hero__side-body .cat-tag {
  margin-bottom: 6px;
}

.hero__side-body h3 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  line-height: var(--lh-tight);
}

.hero__side-body h3 a {
  color: #fff;
}

.hero__meta-s {
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--text-xs);
  margin-top: 4px;
}

/* ── TRENDING NEWS ── */
.trending-news {
  padding: 14px 0 22px;
  border-bottom: 1px solid var(--border);
}

.trending-news__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.trending-news__title {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.fire-icon {
  color: #ef4444;
  font-size: 1rem;
  animation: pulse-fire 1.8s ease-in-out infinite;
}

@keyframes pulse-fire {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.trending-news__more {
  font-size: var(--text-xs);
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--fast);
}

.trending-news__more:hover {
  gap: 7px;
}

.trending-news__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.trend-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px;
  transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast);
  text-decoration: none;
  color: inherit;
}

.trend-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.trend-card__thumb {
  width: 62px;
  height: 50px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-muted);
}

.trend-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) var(--ease);
}

.trend-card:hover .trend-card__thumb img {
  transform: scale(1.06);
}

.trend-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.trend-card__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.trend-card__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  line-height: var(--lh-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trend-card:hover .trend-card__title {
  color: var(--primary);
}

.trend-card__time {
  font-size: 0.66rem;
  color: var(--text-subtle);
}

.trend-rank {
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--primary);
  background: var(--primary-bg);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
}

/* ── ARTICLE CARDS ── */
.article-card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--fast), box-shadow var(--fast), border-color var(--fast);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.article-card__img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-muted);
  flex-shrink: 0;
  position: relative;
}

.article-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) var(--ease);
}

.article-card:hover .article-card__img img {
  transform: scale(1.05);
}

.article-card__body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-card__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  line-height: var(--lh-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__title a {
  color: inherit;
}

.article-card__title a:hover {
  color: var(--primary);
}

.article-card__excerpt {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--lh-normal);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--text-subtle);
  padding-top: 10px;
  border-top: 1px solid var(--border-2);
  margin-top: auto;
}

.article-card__meta .author {
  display: flex;
  align-items: center;
  gap: 5px;
}

.author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-bg), var(--blue-100));
  color: var(--primary);
  font-size: 0.58rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid var(--primary-border);
}

.article-card__meta .sep {
  opacity: 0.4;
}

/* ── GRIDS ── */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-main-side {
  display: grid;
  grid-template-columns: 1fr var(--sidebar);
  gap: 28px;
}

/* ── AI SECTION ── */
.ai-featured {
  background: linear-gradient(135deg, var(--cat-ai-bg), rgba(124, 58, 237, 0.05));
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: var(--r-xl);
  padding: 28px;
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
}

[data-theme="dark"] .ai-featured {
  border-color: rgba(167, 139, 250, 0.12);
}

.ai-featured:hover .ai-featured__img img {
  transform: scale(1.04);
}

.ai-featured__text {
  flex: 1;
  min-width: 0;
}

.ai-featured__text .cat-tag {
  margin-bottom: 10px;
}

.ai-featured__text h3 {
  font-size: clamp(1rem, 2.2vw, var(--text-xl));
  font-weight: 800;
  margin: 8px 0 10px;
  line-height: var(--lh-tight);
}

.ai-featured__text p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-normal);
}

.ai-featured__img {
  width: 220px;
  height: 176px;
  border-radius: var(--r-lg);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.ai-featured__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) var(--ease);
}

/* ── TUTORIALS ── */
.tut-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 28px;
}

.tut-list {
  display: flex;
  flex-direction: column;
}

.tut-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-2);
  transition: background var(--fast);
}

.tut-item:last-child {
  border-bottom: none;
}

.tut-item__num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary-border);
  min-width: 36px;
  line-height: 1.2;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.tut-item:hover .tut-item__num {
  color: var(--primary);
}

.tut-item__content {
  flex: 1;
  min-width: 0;
}

.tut-item__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  line-height: var(--lh-snug);
}

.tut-item__title a:hover {
  color: var(--primary);
}

.tut-item__meta {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  margin-top: 5px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.tut-item__arrow {
  color: var(--text-subtle);
  transition: color var(--fast), transform var(--fast);
  flex-shrink: 0;
}

.tut-item:hover .tut-item__arrow {
  color: var(--primary);
  transform: translateX(-4px);
}

.tut-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tut-sidebar-card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--fast), transform var(--fast);
  text-decoration: none;
  color: inherit;
}

.tut-sidebar-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tut-sidebar-card__img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-muted);
}

.tut-sidebar-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) var(--ease);
}

.tut-sidebar-card:hover .tut-sidebar-card__img img {
  transform: scale(1.05);
}

.tut-sidebar-card__body {
  padding: 12px;
}

.tut-sidebar-card__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  line-height: var(--lh-snug);
}

.tut-sidebar-card__meta {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  margin-top: 5px;
}

/* ── GAMING ── */
.gaming-section {
  background: var(--bg-subtle);
}

.gaming-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.gaming-hero-card {
  grid-row: 1/3;
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--bg-muted);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.gaming-hero-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) var(--ease);
}

.gaming-hero-card:hover img {
  transform: scale(1.03);
}

.gaming-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 55%, transparent 100%);
}

.gaming-hero-body {
  position: relative;
  z-index: 1;
  padding: 22px;
}

.gaming-hero-body .cat-tag {
  margin-bottom: 8px;
}

.gaming-hero-body h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  line-height: var(--lh-tight);
  margin-bottom: 8px;
}

.gaming-hero-body h3 a {
  color: #fff;
}

.gaming-hero-body p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.75);
  line-height: var(--lh-snug);
}

.gaming-hero-meta {
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--text-xs);
  margin-top: 10px;
}

.gaming-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gaming-mini-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px;
  transition: box-shadow var(--fast), transform var(--fast);
  text-decoration: none;
  color: inherit;
}

.gaming-mini-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.gaming-mini-card__img {
  width: 80px;
  height: 60px;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-muted);
}

.gaming-mini-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gaming-mini-card__body {
  flex: 1;
  min-width: 0;
}

.gaming-mini-card__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  line-height: var(--lh-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gaming-mini-card:hover .gaming-mini-card__title {
  color: var(--primary);
}

.gaming-mini-card__meta {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  margin-top: 4px;
}

/* ─ BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: all var(--fast);
  min-height: 44px;
  cursor: pointer;
}

.btn-blue {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.3);
}

.btn-blue:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(29, 78, 216, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-bg);
}

/* ── TELEGRAM CTA ── */
.tg-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--blue-800) 100%);
  color: #fff;
  border-radius: var(--r-2xl);
  padding: 40px 48px;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 32px rgba(29, 78, 216, 0.35);
  position: relative;
  overflow: hidden;
}

.tg-cta::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -5%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.tg-cta::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: 10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.tg-cta__text {
  flex: 1;
  min-width: 0;
  position: relative;
}

.tg-cta__text h2 {
  font-size: clamp(1rem, 2.5vw, var(--text-xl));
  font-weight: 800;
  margin-bottom: 8px;
}

.tg-cta__text p {
  font-size: var(--text-sm);
  opacity: 0.9;
  line-height: var(--lh-normal);
}

.tg-cta__btn {
  background: #fff;
  color: var(--primary);
  padding: 12px 28px;
  border-radius: var(--r-md);
  font-weight: 800;
  font-size: var(--text-base);
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-height: 50px;
  flex-shrink: 0;
  transition: all var(--fast);
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.tg-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ── SIDEBAR WIDGETS ── */
.widget {
  margin-bottom: 28px;
}

.widget__title {
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.trending-list {
  display: flex;
  flex-direction: column;
}

.trending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-2);
  min-height: 52px;
  transition: background var(--fast);
  border-radius: var(--r-sm);
}

.trending-item:last-child {
  border-bottom: none;
}

.trending-item__rank {
  font-size: 1rem;
  font-weight: 900;
  min-width: 22px;
  color: var(--border);
  flex-shrink: 0;
}

.trending-item__rank.hot {
  color: var(--primary);
}

.trending-item__img {
  width: 54px;
  height: 42px;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.trending-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow);
}

.trending-item:hover .trending-item__img img {
  transform: scale(1.05);
}

.trending-item__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: var(--lh-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-item__title:hover {
  color: var(--primary);
}

.tg-widget {
  background: linear-gradient(135deg, var(--primary), var(--blue-800));
  border-radius: var(--r-xl);
  padding: 20px;
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 20px rgba(29, 78, 216, 0.3);
}

.tg-widget i {
  font-size: 2.2rem;
  margin-bottom: 10px;
  display: block;
  opacity: 0.9;
}

.tg-widget h3 {
  font-size: var(--text-base);
  font-weight: 800;
  margin-bottom: 6px;
}

.tg-widget p {
  font-size: var(--text-sm);
  opacity: 0.9;
  margin-bottom: 16px;
  line-height: var(--lh-normal);
}

.tg-widget a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--primary);
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: var(--text-sm);
  transition: all var(--fast);
  min-height: 44px;
}

.tg-widget a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  background: var(--bg-muted);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: var(--text-xs);
  border: 1px solid var(--border);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  transition: all var(--fast);
}

.tag-pill:hover {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary-border);
  transform: translateY(-1px);
}

/* ── REVIEWS ── */
.review-badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  z-index: 2;
  background: linear-gradient(135deg, var(--primary), var(--blue-600));
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.45);
}

.review-badge small {
  font-size: 0.5rem;
  font-weight: 500;
  opacity: 0.85;
}

.review-wrap {
  position: relative;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--black-950);
  color: var(--black-400);
  margin-top: 40px;
}

[data-theme="dark"] .site-footer {
  background: #000;
}

.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 44px;
  padding: 40px 0 28px;
}

.footer__brand-name {
  font-size: 1.1rem;
  font-weight: 900;
  color: #f9fafb;
  margin-bottom: 10px;
}

.footer__brand-desc {
  font-size: var(--text-sm);
  line-height: var(--lh-normal);
  color: var(--black-500);
  max-width: 260px;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.07);
  color: var(--black-400);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--fast), color var(--fast), transform var(--fast);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.social-link:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.footer__col h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #e5e7eb;
  margin-bottom: 12px;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer__col ul li a {
  font-size: var(--text-sm);
  color: var(--black-500);
  transition: color var(--fast);
  display: flex;
  align-items: center;
  min-height: 34px;
}

.footer__col ul li a:hover {
  color: var(--black-300);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-xs);
  color: var(--black-600);
  flex-wrap: wrap;
}

.footer__legal {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__legal a {
  color: var(--black-600);
  transition: color var(--fast);
  font-size: var(--text-xs);
}

.footer__legal a:hover {
  color: var(--black-400);
}

/* ── SCROLL TOP ── */
#scroll-top {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  inset-inline-end: 20px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--blue-600));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(29, 78, 216, 0.45);
  opacity: 0;
  transform: translateY(12px) scale(0.8);
  pointer-events: none;
  transition: opacity var(--base), transform var(--base) var(--ease-spring);
}

#scroll-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#scroll-top:hover {
  transform: translateY(-2px) scale(1.05) !important;
}

/* ── ANIMATIONS ── */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.fade-up.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (min-width: 1920px) {
  :root {
    --container: 1400px;
  }
}

@media (min-width: 1440px) {
  :root {
    --container: 1320px;
  }
}

@media (max-width: 1280px) {
  :root {
    --container: 1180px;
  }
}

@media (max-width: 1100px) {
  :root {
    --sidebar: 280px;
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer__top {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 24px;
  }
  
  .tut-grid {
    grid-template-columns: 1fr 220px;
  }
}

@media (max-width: 1024px) {
  :root {
    --sidebar: 256px;
  }
  
  .nav-item > a,
  .nav-item > button {
    padding: 6px 9px;
    font-size: 0.78rem;
  }
  
  .hero__grid {
    grid-template-columns: 1fr 260px;
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dropdown {
    right: auto;
    left: 0;
  }
  
  .dropdown::before {
    right: auto;
    left: 16px;
  }
}

@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  
  .hero__main {
    min-height: 340px;
  }
  
  .hero__side {
    flex-direction: row;
  }
  
  .hero__side-card {
    flex: 1;
    min-height: 200px;
  }
  
  .grid-main-side {
    grid-template-columns: 1fr;
  }
  
  .gaming-grid {
    grid-template-columns: 1fr;
  }
  
  .gaming-hero-card {
    grid-row: auto;
    min-height: 260px;
  }
  
  .gaming-side {
    flex-direction: row;
  }
  
  .gaming-mini-card {
    flex: 1;
  }
  
  .ai-featured {
    flex-direction: column;
  }
  
  .ai-featured__img {
    width: 100%;
    height: 200px;
  }
  
  .tg-cta {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 16px;
    padding: 28px 20px;
  }
  
  .trending-news__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tut-grid {
    grid-template-columns: 1fr;
  }
  
  .tut-sidebar {
    display: none;
  }
}

@media (max-width: 820px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 54px;
  }
  
  .topbar {
    display: none;
  }
  
  .nav-strip {
    display: none;
  }
  
  .btn-tg {
    display: none;
  }
  
  .header__actions .icon-btn#theme-btn {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hero__main {
    min-height: 300px;
  }
  
  .hero__side {
    flex-direction: row;
  }
  
  .hero__side-card {
    min-height: 185px;
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .ai-featured {
    padding: 20px;
  }
  
  .gaming-side {
    flex-direction: column;
  }
  
  .gaming-mini-card {
    flex: none;
  }
  
  .section {
    padding: 28px 0;
  }
  
  .footer__top {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px 0 8px;
  }
  
  .footer__col {
    display: none;
  }
  
  .footer__top > div:first-child {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
  }
  
  .footer__brand-desc {
    display: none;
  }
  
  .footer__brand-name {
    font-size: 0.9rem;
    margin-bottom: 0;
  }
  
  .social-links {
    gap: 6px;
  }
  
  .social-link {
    width: 34px;
    height: 34px;
  }
  
  .footer__bottom {
    padding: 8px 0;
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }
}

@media (max-width: 600px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .hero__side {
    flex-direction: column;
  }
  
  .hero__side-card {
    min-height: 175px;
  }
  
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .trending-news__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .reviews-section .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }
  
  .hero {
    padding: 12px 0 20px;
  }
  
  .hero__main {
    min-height: 260px;
  }
  
  .hero__main-body {
    padding: 16px;
  }
  
  .hero__side {
    flex-direction: column;
  }
  
  .hero__side-card {
    min-height: 170px;
  }
  
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .reviews-section .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .gaming-grid {
    grid-template-columns: 1fr;
  }
  
  .tut-item__num {
    font-size: 1.2rem;
    min-width: 28px;
  }
  
  .trend-card {
    padding: 8px;
  }
  
  .trend-card__thumb {
    width: 56px;
    height: 46px;
  }
  
  .ai-featured {
    padding: 16px;
    gap: 12px;
  }
  
  .ai-featured__img {
    height: 175px;
  }
  
  .tg-cta {
    padding: 22px 16px;
  }
  
  .tg-cta__btn {
    width: 100%;
    justify-content: center;
    font-size: var(--text-sm);
    padding: 12px 16px;
  }
  
  .section {
    padding: 22px 0;
  }
  
  .section__head {
    margin-bottom: 16px;
  }
  
  .article-card__body {
    padding: 12px;
  }
  
  .article-card__title {
    font-size: var(--text-sm);
  }
}

@media (max-width: 414px) {
  .hero__main {
    min-height: 245px;
  }
  
  .hero__main-body h1 {
    font-size: clamp(0.95rem, 4.5vw, 1.1rem);
  }
}

@media (max-width: 375px) {
  .container {
    padding: 0 12px;
  }
  
  .hero__main {
    min-height: 225px;
  }
  
  .hero__main-body {
    padding: 12px;
  }
}

@media (max-width: 360px) {
  :root {
    --header-h: 50px;
  }
  
  .container {
    padding: 0 10px;
  }
  
  .hero__main {
    min-height: 210px;
  }
}

@media (max-width: 320px) {
  :root {
    --header-h: 46px;
  }
  
  .container {
    padding: 0 10px;
  }
}

@supports (padding: env(safe-area-inset-bottom)) {
  .mobile-nav {
    padding-bottom: env(safe-area-inset-bottom, 16px);
  }
  
  .footer__bottom {
    padding-bottom: env(safe-area-inset-bottom, 16px);
  }
}