/* ==========================================================================
   ASTANA NEWS - Complete Production Design System & Stylesheet (v7.0)
   Pixel-perfect Typography, Unified Color Palettes, Dark Mode & Responsive
   ========================================================================== */

/* 1. DESIGN TOKENS & CSS CUSTOM PROPERTIES */
:root {
  color-scheme: light;
  
  /* Brand Colors (Light Mode) */
  --primary: #0b1f3a;
  --primary-light: #1e3a8a;
  --primary-dark: #071324;
  
  --accent-red: #d32f2f;
  --accent-red-hover: #b71c1c;
  --accent-blue: #0284c7;
  --accent-green: #16a34a;
  --accent-gold: #b45309;
  --accent-purple: #7c3aed;
  
  /* Backgrounds */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  
  /* Typography Colors */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --border-color: #cbd5e1;
  --border-subtle: #e2e8f0;
  
  /* Border Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.12);
  
  /* --- ПСЕВДОНИМДЕР (Legacy aliases) ---------------------------------------
     Статикалық беттер (about, ads, editorial, privacy, terms, article, author)
     осы аттарды қолданады, бірақ олар бұрын ЕШҚАЙДА анықталмаған еді —
     сондықтан браузер әрқашан ашық түсті fallback мәнін алып,
     ТҮНГІ РЕЖИМДЕ мәтін ақ фонда ақ болып көрінбей қалатын.

     Бұлар var() арқылы негізгі айнымалыларға сілтейді, ал var() қолдану
     сәтінде есептелетіндіктен [data-theme="dark"] қайта анықтауы
     автоматты түрде мұнда да қолданылады — қосымша dark блок қажет емес. */
  --card-bg: var(--bg-card);
  --bg-alt: var(--bg-subtle);
  --primary-accent: var(--primary);
  --primary-navy: var(--primary-dark);   /* тек фон ретінде қолданылады */
  --text-primary: var(--text-main);
  --text-secondary: var(--text-muted);
  --shadow-lg: var(--shadow-hover);

  /* Font Stacks (Cyrillic + Latin Supported) */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Manrope', 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
}

/* DARK MODE OVERRIDES (WCAG 2.1 AA/AAA Verified) */
[data-theme="dark"] {
  color-scheme: dark;
  
  --primary: #60a5fa;
  --primary-light: #93c5fd;
  --primary-dark: #090e1a;
  
  --accent-red: #f87171;
  --accent-red-hover: #ef4444;
  --accent-blue: #38bdf8;
  --accent-green: #4ade80;
  --accent-gold: #fbbf24;
  --accent-purple: #a78bfa;
  
  --bg-main: #0b1120;
  --bg-card: #131d31;
  --bg-subtle: #1c2942;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-color: #26354f;
  --border-subtle: #1e2c44;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.7);
}

/* 2. BASE & RESET */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Focus Visible for Accessibility (WCAG 2.4.7) */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}

/* Skip-to-content accessible link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--accent-red);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  z-index: 10000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 10px;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Reading Progress Bar (Top of Article) */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-red), #ff6b6b);
  z-index: 9999;
  pointer-events: none;
}

/* 3. TOP BAR */
.top-bar {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.date-badge, .weather-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.weather-badge {
  font-weight: 500;
  color: var(--text-main);
}

.currency-list {
  display: flex;
  gap: 14px;
}

.currency-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.currency-item .rate {
  font-weight: 600;
  color: var(--text-main);
}

.currency-up { color: var(--accent-green); }
.currency-down { color: var(--accent-red); }

.lang-switch {
  display: flex;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
}

.lang-switch a {
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.lang-switch a.active {
  background-color: var(--primary);
  color: #ffffff;
}

[data-theme="dark"] .lang-switch a.active {
  background-color: var(--primary);
  color: #0b1120;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--border-subtle);
}

/* 4. MAIN HEADER & NAVIGATION */
.main-header {
  background-color: var(--bg-card);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-theme="dark"] .logo-text {
  color: #ffffff;
}

.logo-badge {
  background-color: var(--accent-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
}

.nav-link {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--accent-red);
  background-color: var(--bg-subtle);
}

.nav-link.active {
  color: var(--primary);
  background-color: var(--bg-subtle);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bookmark-header-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.search-box {
  display: flex;
  align-items: center;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 14px;
  gap: 8px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  width: 130px;
  color: var(--text-main);
  font-family: inherit;
}

.search-box button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-main);
}

/* 5. TRENDING BAR & FINANCIAL TICKER */
.trending-bar {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 12.5px;
}

.trending-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.trending-tags-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
}

.trending-label {
  font-weight: 800;
  color: var(--accent-red);
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.5px;
}

.trend-pill {
  background: var(--bg-subtle);
  color: var(--text-main);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
}

.trend-pill:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

[data-theme="dark"] .trend-pill:hover {
  background: var(--primary);
  color: #0b1120;
}

/* Әлеуметтік желі белгішелері (бұрын мұнда Brent/алтын бағасы тұрған) */
.social-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-muted);
  background: transparent;
  transition: color .18s ease, background-color .18s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: #fff;
  background: var(--primary-accent);
}

.social-links svg {
  display: block;
}

/* 6. LIVE FLASH TICKER (Seamless Non-Jumping Marquee) */
.live-flash-banner {
  background: linear-gradient(90deg, #881337 0%, #991b1b 40%, #b91c1c 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 0;
  display: flex;
  align-items: center;
  margin-top: 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.25);
  overflow: hidden;
  height: 42px;
  position: relative;
}

.flash-live-dot-wrap {
  background: #7f1d1d;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.flash-pulse-dot {
  width: 9px;
  height: 9px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 10px #ef4444;
  animation: pulse 1.2s infinite;
}

.flash-ticker-track-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.flash-ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: tickerMarquee 40s linear infinite;
  gap: 18px;
}

.flash-ticker-track:hover {
  animation-play-state: paused;
}

@keyframes tickerMarquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ticker-item:hover {
  text-decoration: underline;
}

.ticker-time {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 800;
  color: #fef08a;
}

.ticker-sep {
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
}

/* 7. ACCESSIBLE GPU-ACCELERATED MOBILE DRAWER */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 290px;
  height: 100dvh;
  background: var(--bg-card);
  z-index: 1001;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.mobile-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

.drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-links a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-main);
}

.drawer-links a:hover, .drawer-links a.active {
  background: var(--bg-subtle);
  color: var(--accent-red);
}

/* 8. MAIN GRID LAYOUT */
.main-content-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  margin-top: 16px;
  margin-bottom: 60px;
  align-items: start;
}

/* 9. HERO SECTION */
.hero-section {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.hero-main-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease;
}

.hero-main-card:hover {
  transform: translateY(-3px);
}

.hero-main-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(11, 31, 58, 0.15) 0%, rgba(11, 31, 58, 0.95) 90%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 28px;
  color: #ffffff;
}

.badge-breaking {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--accent-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.badge-breaking::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.3); }
  100% { opacity: 1; transform: scale(1); }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.28;
  margin-bottom: 12px;
  color: #ffffff;
}

.hero-desc {
  font-size: 14px;
  color: #e2e8f0;
  margin-bottom: 16px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #cbd5e1;
}

.btn-read {
  background-color: var(--accent-red);
  color: #ffffff;
  padding: 7px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s ease;
}

.btn-read:hover {
  background-color: var(--accent-red-hover);
}

.hero-side-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-featured-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  flex: 1;
  transition: all 0.2s ease;
}

.side-featured-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.side-featured-img {
  height: 120px;
  width: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.side-featured-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.category-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: inline-block;
}

.side-featured-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 8px;
}

.side-featured-card:hover .side-featured-title {
  color: var(--primary);
}

.card-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.bookmark-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 14px;
  transition: color 0.15s ease;
}

.bookmark-btn:hover, .bookmark-btn.saved {
  color: var(--accent-red);
}

/* 10. ҚОҒАМ SECTION (3 Cards) */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="dark"] .section-title {
  color: #ffffff;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 18px;
  background-color: var(--accent-red);
  border-radius: 2px;
  display: inline-block;
}

.section-more-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-four-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.top-four-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.top-four-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.top-four-img-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.top-four-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.top-four-card:hover .top-four-img-wrap img {
  transform: scale(1.04);
}

.top-four-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background-color: rgba(11, 31, 58, 0.85);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.top-four-tag.red { background-color: var(--accent-red); }
.top-four-tag.blue { background-color: var(--accent-blue); }
.top-four-tag.gold { background-color: var(--accent-gold); }

.top-four-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.top-four-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.42;
  color: var(--text-main);
  margin-bottom: 12px;
  display: block;
}

.top-four-card:hover .top-four-title {
  color: var(--primary);
}

/* 11. CATEGORIES (AIDARLAR GRID) */
.categories-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.category-block {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.category-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bg-subtle);
}

.category-block-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="dark"] .category-block-title {
  color: #ffffff;
}

.category-block-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-blue);
}

.category-block-title.politics .dot { background-color: var(--accent-red); }
.category-block-title.economy .dot { background-color: var(--accent-green); }
.category-block-title.tech .dot { background-color: var(--accent-blue); }
.category-block-title.culture .dot { background-color: var(--accent-purple); }

.category-lead-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--bg-subtle);
}

.lead-img-wrap {
  position: relative;
  height: 175px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}

.lead-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-lead-item:hover .lead-img-wrap img {
  transform: scale(1.04);
}

.lead-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 6px;
}

.category-lead-item:hover .lead-title {
  color: var(--accent-red);
}

.lead-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lead-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.lead-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

.category-sub-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-news-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  transition: transform 0.15s ease;
}

.category-news-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.category-news-item:hover {
  transform: translateX(3px);
}

.thumb-img {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.category-item-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.category-item-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-news-item:hover .category-item-title {
  color: var(--accent-red);
}

.category-item-meta {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 12. MEDIA / VIDEO SECTION */
.media-section {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 36px;
}

.media-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 12px;
}

.media-section-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="dark"] .media-section-title {
  color: #ffffff;
}

.media-badge {
  background-color: var(--accent-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.video-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.2s ease;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.video-thumb-wrap {
  position: relative;
  height: 155px;
  overflow: hidden;
  background-color: #000000;
}

.video-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.video-card:hover .video-thumb-wrap img {
  transform: scale(1.05);
  opacity: 0.8;
}

.play-btn-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background-color: rgba(220, 38, 38, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.video-card:hover .play-btn-overlay {
  background-color: var(--accent-red);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.video-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: rgba(11, 31, 58, 0.85);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.video-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.video-title {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card:hover .video-title {
  color: var(--accent-red);
}

.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* 13. PODCASTS AUDIO SECTION */
.podcast-section {
  background: linear-gradient(135deg, #0b1f3a 0%, #1e3a8a 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: #ffffff;
  margin-bottom: 36px;
  box-shadow: var(--shadow-md);
}

.podcast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 12px;
}

.podcast-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.podcast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.podcast-card {
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.podcast-card:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-3px);
}

.podcast-top {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.podcast-badge {
  font-size: 11px;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.25);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.podcast-cover {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.podcast-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-red);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.podcast-play-btn:hover {
  transform: scale(1.1);
}

.podcast-card-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
  margin-bottom: 8px;
}

.podcast-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #cbd5e1;
}

/* 14. RIGHT STICKY SIDEBAR */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 84px;
  align-self: flex-start;
}

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.sidebar-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="dark"] .sidebar-title {
  color: #ffffff;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-red);
  background: rgba(220, 38, 38, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-red);
  border-radius: 50%;
  animation: pulse 1.2s infinite;
}

.latest-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}

.latest-timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 48px;
  width: 2px;
  background-color: var(--border-color);
  z-index: 1;
}

.timeline-item {
  display: flex;
  gap: 14px;
  position: relative;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-subtle);
}

.timeline-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.timeline-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background-color: var(--bg-card);
  z-index: 2;
  min-width: 44px;
  text-align: right;
  padding-right: 4px;
}

[data-theme="dark"] .timeline-time {
  color: var(--accent-blue);
}

.timeline-item:nth-child(-n+2) .timeline-time {
  color: var(--accent-red);
}

.timeline-content {
  flex: 1;
  z-index: 2;
}

.timeline-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
  transition: color 0.15s ease;
}

.timeline-item:hover .timeline-title {
  color: var(--accent-red);
}

/* LIVE POLL WIDGET */
.poll-question {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  line-height: 1.4;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.poll-opt-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.15s ease;
}

.poll-opt-btn:hover {
  border-color: var(--primary);
}

.poll-opt-btn.voted {
  background: #eff6ff;
  border-color: var(--accent-blue);
}

[data-theme="dark"] .poll-opt-btn.voted {
  background: rgba(96, 165, 250, 0.15);
}

.poll-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(2, 132, 199, 0.18);
  z-index: 1;
  transition: width 0.5s ease-out;
}

.poll-opt-text {
  position: relative;
  z-index: 2;
}

.poll-pct {
  position: relative;
  z-index: 2;
  font-weight: 800;
  color: var(--accent-blue);
  font-size: 12.5px;
}

.poll-total-votes {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: right;
}

/* Opinions Widget */
.opinion-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.opinion-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

[data-theme="dark"] .author-name {
  color: #ffffff;
}

.opinion-role {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.opinion-quote {
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Newsletter Widget */
.newsletter-card {
  background: linear-gradient(135deg, #0b1f3a 0%, #162e4e 100%);
  color: #ffffff;
}

.newsletter-card h4 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #ffffff;
}

.newsletter-card p {
  font-size: 12.5px;
  color: #cbd5e1;
  margin-bottom: 14px;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subscribe-input {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 13px;
  outline: none;
}

.subscribe-input::placeholder {
  color: #94a3b8;
}

.subscribe-btn {
  background-color: var(--accent-red);
  color: #ffffff;
  border: none;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.subscribe-btn:hover {
  background-color: var(--accent-red-hover);
}

/* 15. ARTICLE DETAIL VIEW STYLES */
.article-header {
  margin-bottom: 24px;
}

.article-category {
  display: inline-block;
  background-color: var(--accent-red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.article-main-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 16px;
}

[data-theme="dark"] .article-main-title {
  color: #ffffff;
}

.article-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.author-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-meta-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.author-meta-text .name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  text-decoration: none;
}

.author-meta-text .date {
  font-size: 13px;
  color: var(--text-muted);
}

.reading-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audio-player-mock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.audio-player-mock:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.font-resizer {
  display: flex;
  gap: 4px;
}

.font-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 4px;
  padding: 4px 8px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

.share-buttons {
  display: flex;
  gap: 8px;
}

.share-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.share-tg { background-color: #229ED9; }
.share-wa { background-color: #25D366; }
.share-fb { background-color: #1877F2; }

.article-body {
  font-family: var(--font-serif);
  font-size: 17.5px;
  line-height: 1.8;
  color: var(--text-main);
}

.article-hero-image {
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-hero-image figcaption {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 4px;
  font-style: italic;
}

.article-body p {
  margin-bottom: 20px;
}

/* «...деп хабарлайды Astana.news.» — мәтіннің ІШІНДЕГІ сілтеме.
   Бұрын бөлек абзац блогы болатын, бірақ ол дереккөздің өз атрибуциясымен
   («деп хабарлайды turkystan.kz») қатар тұрып, мәтін екі рет қайталанғандай
   оғаш көрінетін. Енді сол сөйлемдегі дереккөз атауының ОРНЫНА қойылады. */
.article-body a.self-attribution {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.article-body a.self-attribution:hover {
  color: var(--accent-red);
}

.pull-quote {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--primary);
  border-left: 4px solid var(--accent-red);
  padding: 16px 24px;
  margin: 28px 0;
  background-color: var(--bg-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

[data-theme="dark"] .pull-quote {
  color: #ffffff;
}

.article-tags {
  display: flex;
  gap: 8px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.article-tag-item {
  background-color: var(--bg-subtle);
  padding: 6px 12px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* AI SUMMARY BOX */
.ai-summary-box {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 28px;
}

[data-theme="dark"] .ai-summary-box {
  background: linear-gradient(135deg, #13233a 0%, #112a2a 100%);
  border-color: #1e3a8a;
}

.ai-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--accent-blue);
  margin-bottom: 12px;
}

.ai-pill {
  background: var(--accent-blue);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.ai-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-bullets li {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ai-bullets li::before {
  content: '✓';
  color: var(--accent-green);
  font-weight: 800;
}

/* 16. CATEGORY PAGE STYLES */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 18px;
  margin-bottom: 12px;
}

.breadcrumbs a:hover {
  color: var(--accent-red);
}

.breadcrumbs .separator {
  color: var(--text-light);
}

.breadcrumbs .current {
  font-weight: 700;
  color: var(--primary);
}

[data-theme="dark"] .breadcrumbs .current {
  color: var(--primary-light);
}

.category-hero-banner {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.category-banner-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

[data-theme="dark"] .category-banner-title {
  color: #ffffff;
}

.sub-cat-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-pill {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
}

.cat-pill:hover, .cat-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

[data-theme="dark"] .cat-pill.active,
[data-theme="dark"] .cat-pill:hover {
  background: var(--primary);
  color: #0b1120;
}

.cat-page-lead-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.cat-lead-img-wrap {
  height: 280px;
  overflow: hidden;
}

.cat-lead-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-lead-body {
  padding: 24px 24px 24px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cat-lead-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 10px;
}

.cat-page-lead-card:hover .cat-lead-title {
  color: var(--accent-red);
}

.cat-lead-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.cat-page-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.cat-news-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.cat-news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.cat-card-img {
  height: 160px;
  width: 100%;
  object-fit: cover;
}

.cat-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.cat-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-news-card:hover .cat-card-title {
  color: var(--accent-red);
}

.btn-load-more {
  background: var(--bg-card);
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 12px 32px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-load-more:hover {
  background: var(--primary);
  color: #ffffff;
}

[data-theme="dark"] .btn-load-more {
  color: var(--primary-light);
  border-color: var(--primary-light);
}

[data-theme="dark"] .btn-load-more:hover {
  background: var(--primary-light);
  color: #0b1120;
}

/* 17. FOOTER */
.main-footer {
  background-color: var(--primary-dark);
  color: #94a3b8;
  padding: 48px 0 24px 0;
  border-top: 4px solid var(--accent-red);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-brand .logo-text {
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-col h5 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 13px;
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

/* 18. RESPONSIVE BREAKPOINTS (Desktop, Tablet 960px, Mobile 640px) */
@media (max-width: 1024px) {
  .main-content-layout {
    grid-template-columns: 1fr;
  }
  .hero-section {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .cat-page-lead-card {
    grid-template-columns: 1fr;
  }
  .cat-lead-body {
    padding: 16px;
  }
}

/* Intermediate Tablet Breakpoint: 960px */
@media (max-width: 960px) {
  .nav-menu {
    display: none;
  }
  .hamburger-btn {
    display: block;
  }
  .top-four-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .podcast-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .top-bar, .social-links {
    display: none;
  }
  .top-four-grid {
    grid-template-columns: 1fr;
  }
  .categories-container {
    grid-template-columns: 1fr;
  }
  .media-grid {
    grid-template-columns: 1fr;
  }
  .cat-page-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 22px;
  }
}

/* 19. ACCESSIBILITY: REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .flash-ticker-track {
    animation: none;
    overflow-x: auto;
  }
}

/* 20. PRINT STYLES */
@media print {
  .top-bar, .main-header, .sidebar, .main-footer, 
  .media-section, .podcast-section, .trending-bar, 
  .live-flash-banner, .reading-progress-bar, .share-buttons, 
  .reading-tools, .btn-read, .bookmark-btn {
    display: none !important;
  }
  body {
    background: #ffffff;
    color: #000000;
  }
  .main-content-layout {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   БЕТТЕУ (pagination) — category.html және news.html
   ========================================================================== */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 28px 0 10px;
}

.pagination:empty {
  display: none;
  margin: 0;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

a.page-link:hover,
a.page-link:focus-visible {
  background: var(--primary-navy);
  border-color: var(--primary-navy);
  color: #fff;
}

.page-link.is-current {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #fff;
  cursor: default;
}

.page-link.is-disabled {
  opacity: .45;
  cursor: not-allowed;
}

.page-gap {
  padding: 0 4px;
  color: var(--text-muted);
  font-weight: 700;
}

/* «Бәрін қарау» — «Соңғы жаңалықтар» блогының астындағы батырма */
.btn-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding: 9px 14px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.btn-view-all:hover,
.btn-view-all:focus-visible {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #fff;
}

@media (max-width: 480px) {
  .page-link {
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    font-size: 12.5px;
  }
}

/* Аудармасы әлі жоқ тіл — басуға келмейді (i18n 1-кезең) */
.lang-switch a.is-unavailable {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

.lang-switch a[href] {
  cursor: pointer;
}
