/* ==============================
   Design tokens & base
   ============================== */

:root {
  --page-bg: #f2f6f8;
  --card: #ffffff;
  --muted: #6b7684;
  --text: #0b1220;
  --accent: #00e8ff;
  --soft: #eef6fb;
  --shadow: 0 18px 40px rgba(16,22,26,0.06);
  --radius-lg: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}


/* Dark mode via .dark-mode на body (по JS) */
body.dark-mode {
  --page-bg: #0d1114;
  --card: #0b0f12;
  --muted: #9aa3b2;
  --text: #dceff7;
  --accent: #00e8ff;
  --soft: #071016;
  --shadow: 0 20px 48px rgba(0,0,0,0.7);
}

/* ==============================
   Layout
   ============================== */

.tg-page {
  margin: 0;
  padding: 0;
}

.tg-container {
  max-width: 1220px;
  margin: 30px auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  padding: 0 20px;
}

.tg-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}

.tg-left {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  box-sizing: border-box;
}

.tg-sidebar-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 20px;
  border-radius: 20px;
}

/* Right column контейнер */
.tg-right {
  width: 100%;
}

/* ==============================
   Logo
   ============================== */

.tg-logo-wrap {
  width: 100%;
  display: block;
  margin: 0 auto 24px;
  padding-bottom: 24px;
  text-align: center;
}

.tg-logo-big {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow:
    0 0 8px rgba(0, 195, 255, 0.7),
    0 0 16px rgba(0, 195, 255, 0.6),
    0 0 30px rgba(0, 195, 255, 0.4);
}

/* ==============================
   Accordion (sidebar)
   ============================== */

.tg-accordion .acc-item {
  margin-bottom: 10px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0,232,255,0.03), rgba(255,255,255,0.02));
  border: 1px solid rgba(0,0,0,0.04);
}

.acc-head {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  position: relative;
}

.acc-head:hover {
  box-shadow: 0 6px 18px rgba(0,232,255,0.03);
}

.acc-chevron {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-right: 2px solid rgba(0,0,0,0.18);
  border-bottom: 2px solid rgba(0,0,0,0.18);
  transform: rotate(45deg);
  transition: transform .22s ease, border-color .22s;
  opacity: .6;
}

.acc-body {
  padding: 0 14px;
  max-height: 0;
  overflow: hidden;
  transition: all .34s ease;
  opacity: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.acc-item.open .acc-body {
  padding: 12px 14px 16px;
  max-height: 600px;
  opacity: 1;
}

.acc-item.open .acc-chevron {
  transform: rotate(-135deg);
  border-color: var(--accent);
}

/* ==============================
   Top navigation + mobile nav
   ============================== */

.tg-topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 10px;
}

.tg-menu {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.btn-nav {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 30px;
  border: 2px solid #5eeaff;
  background: #ffffff;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  transition: 0.25s ease;
  cursor: pointer;
}

.btn-nav:hover {
  box-shadow: 0 0 20px #5eeaff, 0 0 35px #5eeaff;
  border-color: #00eaff;
}

/* mobile top-nav (под логотипом) */
.mobile-nav {
  display: none;
  gap: 10px;
  justify-content: center;
  margin: 12px 0 18px;
  flex-wrap: wrap;
}

/* ==============================
   Theme switch
   ============================== */

.tg-theme-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch {
  position: relative;
  width: 48px;
  height: 26px;
  display: inline-block;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(180deg,#f0f6fb,#ffffff);
  box-shadow:
    0 0 4px rgba(0, 255, 255, 0.4),
    0 0 8px rgba(0, 255, 255, 0.35);
  transition: 0.25s ease-out;
}

.slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow:
    0 0 4px rgba(255, 255, 255, 0.7),
    0 0 6px rgba(0, 255, 255, 0.4);
  transition: .2s;
}

.switch input:checked + .slider {
  background: linear-gradient(90deg, rgba(0,232,255,0.12), rgba(0,232,255,0.04));
  box-shadow:
    0 0 6px rgba(0, 240, 255, 0.8),
    0 0 10px rgba(0, 240, 255, 0.6),
    inset 0 0 4px rgba(0, 240, 255, 0.4);
}

.switch input:checked + .slider::before {
  transform: translateX(22px);
  box-shadow:
    0 0 6px rgba(255, 255, 255, 0.9),
    0 0 10px rgba(0, 255, 255, 0.9);
}

/* ==============================
   Intro card (title + lead)
   ============================== */

.tg-intro-card {
  padding: 18px 20px;
  border-radius: 14px;
  margin-bottom: 16px;
  background: linear-gradient(180deg,var(--card),var(--soft));
}

.tg-page-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

.lead {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

/* ==============================
   Category buttons (filter)
   ============================== */

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0 20px;
}

.category-buttons .cat-btn {
  border-radius: 920px;
  padding: 7px 20px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all .25s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* Active state */
.cat-btn.active {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.1);
}

/* Hover */
.category-buttons .cat-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 22px rgba(0, 238, 255, 0.55);
}

/* All button */
.btn-all {
  background: linear-gradient(90deg, #ff006e, #3a86ff);
}

/* Palette (1 финальная версия цветов) */
.btn-c1 { background: #ff5f5f; }
.btn-c2 { background: #ff9f1c; }
.btn-c3 { background: #2ec4b6; }
.btn-c4 { background: #3a86ff; }
.btn-c5 { background: #8338ec; }
.btn-c6 { background: #ff006e; }
.btn-c7 { background: #06d6a0; }
.btn-c8 { background: #ffbe0b; }
.btn-c9 { background: #8ac926; }

/* Dark mode for category buttons */
body.dark-mode .cat-btn {
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

/* ==============================
   Posts list & cards
   ============================== */

.tg-posts {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Desktop card layout: image + content */
.post-card {
  background: var(--card);
  color: var(--text);
  padding: 22px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: flex-start;
  box-shadow: var(--shadow);
  transition: 0.35s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.post-media {
  width: 100%;
}

.post-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.post-body {
  width: 100%;
}

/* Tags & categories */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.tag,
.cat-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  margin-right: 4px;
  font-weight: 600;
  font-size: 13px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: 0.25s ease;
}

.tag:hover,
.cat-badge:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.post-title {
  margin: 0 0 6px;
  font-size: 20px;
}

.post-title a {
  color: #0b5cab;
  text-decoration: none;
}

.post-title a:hover {
  text-decoration: underline;
}

.post-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.post-excerpt {
  color: var(--muted);
  margin-bottom: 12px;
}

/* Continue reading button */
.btn-read {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 28px;
  border: 2px solid rgba(0,224,255,0.14);
  color: var(--text);
  background: transparent;
  text-decoration: none;
  font-weight: 600;
  transition: all .18s ease;
}

.btn-read:hover {
  background: rgba(0,224,255,0.08);
  color: var(--accent);
}

/* ==============================
   Dark mode overrides
   ============================== */

body.dark-mode .tg-card,
body.dark-mode .tg-sidebar-card,
body.dark-mode .post-card {
  background: #111820;
  border-color: rgba(0,255,255,0.2);
  box-shadow: none;
}

body.dark-mode .tg-left,
body.dark-mode .tg-sidebar-card {
  background: #0d141b;
  color: #e8f7ff;
  border-color: rgba(0,255,255,0.15);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: #e8f7ff;
}

body.dark-mode p,
body.dark-mode li,
body.dark-mode span,
body.dark-mode div {
  color: #d7eefc;
}

body.dark-mode a {
  color: #40cfff;
}

body.dark-mode a:hover {
  color: #6ee0ff;
}

body.dark-mode .cat-badge,
body.dark-mode .tag {
  background: linear-gradient(180deg, rgba(0,200,255,0.16), rgba(0,120,200,0.14));
  color: #e6faff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

body.dark-mode .btn-read {
  color: #cceff7;
  border-color: rgba(0,200,255,0.18);
}

body.dark-mode .btn-read:hover {
  background: rgba(0,200,255,0.06);
  color: #fff;
}

/* ==============================
   Responsive
   ============================== */

@media (max-width: 980px) {
  .tg-container {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 18px;
  }

  .tg-left {
    order: -1; /* sidebar сверху */
  }

  .tg-card.tg-sidebar-card {
    padding: 18px;
    border-radius: 14px;
  }

  .post-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .post-title {
    font-size: 18px;
    margin-top: 6px;
  }

  .post-excerpt {
    font-size: 14px;
    line-height: 1.45;
  }
}

/* Скрываем десктоп-нав на мобиле, показываем mobile-nav */
@media (max-width: 768px) {
  .tg-topnav {
    display: none !important;
  }

  .mobile-nav {
    display: flex !important;
  }

  .post-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
  }

  .post-media {
    width: 100% !important;
    margin: 0 0 14px 0 !important;
  }

  .post-media img {
    width: 100% !important;
    height: auto !important;
    border-radius: 14px;
  }

  .post-body {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .post-card * {
    float: none !important;
  }
}

/* Небольшой reset верхних отступов */
.tg-page,
.tg-container,
.tg-right,
.tg-left,
.tg-topnav {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
/* ==============================
   FIX — Dark mode text visibility
   ============================== */

body.dark-mode .tg-intro-card,
body.dark-mode .tg-intro-card .lead,
body.dark-mode .tg-intro-card .tg-page-title {
    color: var(--text) !important;
}

body.dark-mode .post-card {
    color: var(--text) !important;
}

body.dark-mode .post-title a {
    color: #4dc9ff !important;  /* яркий читаемый синий */
}

body.dark-mode .post-meta {
    color: #8faec7 !important;  /* заметный, но не белый */
}

body.dark-mode .post-excerpt {
    color: #d7e9f7 !important;
}

body.dark-mode .btn-read {
    border-color: rgba(0,200,255,0.25) !important;
    color: #6ddcff !important;
}

body.dark-mode .btn-read:hover {
    background: rgba(0,200,255,0.12) !important;
    color: #ffffff !important;
}
/* =========================================
   DARK MODE — accordion visibility FIX
   ========================================= */

body.dark-mode .tg-accordion .acc-item {
    background: #121920 !important;
    border: 1px solid rgba(0,255,255,0.12) !important;
}

body.dark-mode .acc-head {
    color: #e6f7ff !important;
    background: #121920 !important;
}

body.dark-mode .acc-head:hover {
    box-shadow: 0 0 15px rgba(0,255,255,0.08) !important;
    background: #16212a !important;
}

body.dark-mode .acc-body {
    color: #9fc8e0 !important;
    background: #0f161d !important;
}

body.dark-mode .acc-item.open .acc-body {
    background: #0f161d !important;
}

/* Chevron icon */
body.dark-mode .acc-chevron {
    border-right-color: #5fe9ff !important;
    border-bottom-color: #5fe9ff !important;
    opacity: 0.9 !important;
}

body.dark-mode .acc-item.open .acc-chevron {
    border-right-color: #00e8ff !important;
    border-bottom-color: #00e8ff !important;
    box-shadow: 0 0 10px rgba(0,255,255,0.35) !important;
}
/* ==========================================================
   DARK MODE — FULL NEON SIDEBAR IMPROVEMENT
   ========================================================== */

/* Sidebar wrapper */
body.dark-mode .tg-sidebar-card {
    background: #0b1116 !important;
    border: 1px solid rgba(0,255,255,0.10) !important;
    box-shadow:
        0 0 18px rgba(0,255,255,0.06),
        0 0 32px rgba(0,255,255,0.04),
        inset 0 0 18px rgba(0,255,255,0.04) !important;
    backdrop-filter: blur(4px);
}

/* Title area and all text become readable */
body.dark-mode .tg-sidebar-card,
body.dark-mode .tg-sidebar-card * {
    color: #eaf9ff !important;
}

/* ACCORDION items */
body.dark-mode .tg-accordion .acc-item {
    background: #0e171d !important;
    border: 1px solid rgba(0,255,255,0.18) !important;
    border-radius: 14px;
    transition: 0.25s ease;
    box-shadow:
        0 0 10px rgba(0,255,255,0.045),
        inset 0 0 8px rgba(0,255,255,0.03);
}

/* Hover effect */
body.dark-mode .tg-accordion .acc-item:hover {
    box-shadow:
        0 0 12px rgba(0,255,255,0.12),
        0 0 30px rgba(0,255,255,0.08),
        inset 0 0 12px rgba(0,255,255,0.04);
    transform: translateY(-2px);
}

/* Header buttons */
body.dark-mode .acc-head {
    background: transparent !important;
    color: #dff8ff !important;
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* Chevron arrow neon style */
body.dark-mode .acc-chevron {
    border-right-color: #5af0ff !important;
    border-bottom-color: #5af0ff !important;
    opacity: 0.85 !important;
    transition: 0.25s ease;
}

body.dark-mode .acc-item:hover .acc-chevron {
    border-right-color: #8fffff !important;
    border-bottom-color: #8fffff !important;
}

/* When accordion is open */
body.dark-mode .acc-item.open {
    background: #091317 !important;
    box-shadow:
        0 0 20px rgba(0,255,255,0.18),
        inset 0 0 18px rgba(0,255,255,0.12);
    border-color: rgba(0,255,255,0.25) !important;
}

body.dark-mode .acc-item.open .acc-chevron {
    transform: rotate(-135deg);
    border-right-color: #00eaff !important;
    border-bottom-color: #00eaff !important;
    box-shadow: 0 0 12px rgba(0,255,255,0.7);
}

/* Accordion body content */
body.dark-mode .acc-body {
    color: #a9d7ea !important;
    background: #091317 !important;
    padding: 10px 16px 16px;
    border-radius: 0 0 12px 12px;
    line-height: 1.55;
}

/* ==========================================================
   DARK MODE — FULL NEON POST CARD REDESIGN
   ========================================================== */

body.dark-mode .post-card {
    background: #0b1116 !important;
    border: 1px solid rgba(0,255,255,0.12) !important;
    border-radius: 18px;
    padding: 24px;
    color: #e6f7ff !important;

    box-shadow:
        0 0 18px rgba(0,255,255,0.05),
        0 0 32px rgba(0,255,255,0.04),
        inset 0 0 14px rgba(0,255,255,0.03);

    transition: 0.3s ease;
}

/* Hover → мягкое свечение */
body.dark-mode .post-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 22px rgba(0,255,255,0.18),
        0 0 34px rgba(0,255,255,0.12),
        inset 0 0 18px rgba(0,255,255,0.08);
    border-color: rgba(0,255,255,0.25) !important;
}

/* Post title */
body.dark-mode .post-title a {
    color: #5fe8ff !important;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(0,255,255,0.25);
}

body.dark-mode .post-title a:hover {
    color: #9bf5ff !important;
    text-shadow: 0 0 8px rgba(0,255,255,0.55);
}

/* Meta */
body.dark-mode .post-meta {
    color: #89b9cc !important;
}

/* Excerpt */
body.dark-mode .post-excerpt {
    color: #c9e8f2 !important;
}

/* Media: image */
body.dark-mode .post-media img {
    border-radius: 14px;
    box-shadow:
        0 0 8px rgba(0,255,255,0.18),
        0 0 20px rgba(0,255,255,0.1);
}

/* Tags and category badges */
body.dark-mode .tag,
body.dark-mode .cat-badge {
    background: linear-gradient(
        180deg,
        rgba(0,255,255,0.20),
        rgba(0,120,200,0.25)
    ) !important;
    color: #dffbff !important;

    box-shadow:
        0 0 8px rgba(0,255,255,0.4),
        0 0 18px rgba(0,255,255,0.25);
}

body.dark-mode .tag:hover,
body.dark-mode .cat-badge:hover {
    filter: brightness(1.25);
    transform: translateY(-2px);
}

/* "Continue reading" button */
body.dark-mode .btn-read {
    border-color: rgba(0,255,255,0.28) !important;
    color: #7cecff !important;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 30px;
    transition: 0.25s;
}

body.dark-mode .btn-read:hover {
    background: rgba(0,255,255,0.12) !important;
    color: #eaffff !important;

    box-shadow:
        0 0 10px rgba(0,255,255,0.4),
        0 0 22px rgba(0,255,255,0.15);
}
/* ==========================================================
   DARK MODE — NEON TOP NAVIGATION REDESIGN
   ========================================================== */

/* Общий контейнер навигации */
body.dark-mode .tg-topnav {
    background: #0b1116 !important;
    padding: 14px 22px;
    border-radius: 18px;
    border: 1px solid rgba(0,255,255,0.18);
    box-shadow:
        0 0 18px rgba(0,255,255,0.06),
        0 0 32px rgba(0,255,255,0.05),
        inset 0 0 12px rgba(0,255,255,0.04);
    backdrop-filter: blur(4px);
}

/* Сами ссылки Home / Services */
body.dark-mode .tg-topnav .btn-nav {
    background: rgba(0,255,255,0.06) !important;
    border: 2px solid rgba(0,255,255,0.28) !important;
    color: #aef7ff !important;
    padding: 10px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(0,255,255,0.4);
    transition: 0.25s ease-in-out;
}

/* Hover — неоновое свечение */
body.dark-mode .tg-topnav .btn-nav:hover {
    color: #ffffff !important;
    border-color: #00eaff !important;
    background: rgba(0,255,255,0.12) !important;
    box-shadow:
        0 0 12px rgba(0,255,255,0.45),
        0 0 25px rgba(0,255,255,0.25);
    transform: translateY(-2px);
}

/* Активная кнопка (если нужно выделение) */
body.dark-mode .tg-topnav .btn-nav.active {
    color: #ffffff !important;
    border-color: #00eaff !important;
    background: rgba(0,255,255,0.22) !important;
    box-shadow:
        0 0 14px rgba(0,255,255,0.55),
        0 0 30px rgba(0,255,255,0.3);
}

/* Тема-переключатель в верхнем меню */
body.dark-mode .tg-topnav .slider {
    background: linear-gradient(
        180deg,
        rgba(0,255,255,0.18),
        rgba(0,140,200,0.18)
    ) !important;
    box-shadow:
        0 0 10px rgba(0,255,255,0.45),
        0 0 25px rgba(0,255,255,0.25),
        inset 0 0 10px rgba(0,255,255,0.1);
}

body.dark-mode .tg-topnav .slider::before {
    background: #ffffff !important;
    box-shadow:
        0 0 6px rgba(255,255,255,0.8),
        0 0 14px rgba(0,255,255,0.7);
}

/* Включённый toggle */
body.dark-mode .tg-topnav input:checked + .slider {
    background: #0ef !important;
    box-shadow:
        0 0 14px rgba(0,255,255,0.7),
        0 0 26px rgba(0,255,255,0.5);
}

body.dark-mode .tg-topnav input:checked + .slider::before {
    background: #ffffff;
    box-shadow:
        0 0 10px rgba(255,255,255,1),
        0 0 18px rgba(0,255,255,1);
}
/* ==========================================================
   DARK MODE — NEON MOBILE NAV (under logo)
   ========================================================== */

@media (max-width: 768px) {

  /* Контейнер mobile-nav в тёмной теме */
  body.dark-mode .mobile-nav {
      display: flex !important;
      gap: 10px;
      justify-content: center;
      flex-wrap: wrap;
      margin: 16px 0 20px;
      padding: 10px 14px;
      background: #0b1116;
      border-radius: 20px;
      border: 1px solid rgba(0,255,255,0.18);
      box-shadow:
          0 0 16px rgba(0,255,255,0.12),
          0 0 28px rgba(0,255,255,0.08),
          inset 0 0 10px rgba(0,255,255,0.05);
  }

  /* Кнопки Home / Services в mobile-nav */
  body.dark-mode .mobile-nav .btn-nav {
      background: rgba(0,255,255,0.08) !important;
      border: 2px solid rgba(0,255,255,0.28) !important;
      color: #bdf8ff !important;
      padding: 8px 20px;
      border-radius: 26px;
      font-weight: 600;
      text-shadow: 0 0 5px rgba(0,255,255,0.45);
      transition: 0.25s ease;
  }

  body.dark-mode .mobile-nav .btn-nav:hover {
      color: #ffffff !important;
      border-color: #00eaff !important;
      background: rgba(0,255,255,0.16) !important;
      box-shadow:
          0 0 12px rgba(0,255,255,0.55),
          0 0 22px rgba(0,255,255,0.25);
      transform: translateY(-2px);
  }

  /* Переключатель темы внутри mobile-nav */
  body.dark-mode .mobile-nav .tg-theme-switch .slider {
      background: linear-gradient(
          180deg,
          rgba(0,255,255,0.22),
          rgba(0,140,200,0.2)
      ) !important;
      box-shadow:
          0 0 10px rgba(0,255,255,0.6),
          0 0 24px rgba(0,255,255,0.35),
          inset 0 0 8px rgba(0,255,255,0.2);
  }

  body.dark-mode .mobile-nav .tg-theme-switch .slider::before {
      background: #ffffff !important;
      box-shadow:
          0 0 7px rgba(255,255,255,0.9),
          0 0 14px rgba(0,255,255,0.9);
  }

  body.dark-mode .mobile-nav input:checked + .slider {
      background: #00eaff !important;
      box-shadow:
          0 0 14px rgba(0,255,255,0.9),
          0 0 26px rgba(0,255,255,0.6);
  }

  body.dark-mode .mobile-nav input:checked + .slider::before {
      box-shadow:
          0 0 10px rgba(255,255,255,1),
          0 0 18px rgba(0,255,255,1);
  }
}
/* ========== Single post redesign (sp-*) ========== */

.sp-page {
    background: #f4f8fc;
    padding: 32px 16px 56px;
}

body.single-post {
    background: #f4f8fc;
}

/* Контейнер */
.sp-container {
    max-width: 900px;
    margin: 0 auto;
}

/* TOP NAV */
.sp-topnav {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.sp-menu {
    list-style: none;
    display: flex;
    gap: 16px;
    padding: 0;
    margin: 0;
}

.sp-menu li {
    margin: 0;
}

.sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid #00c2ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    color: #0080c2;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 194, 255, 0.25), 0 10px 25px rgba(0, 194, 255, 0.08);
    transition: all .2s ease;
}

.sp-btn:hover {
    background: #00e5ff;
    color: #00334f;
    box-shadow: 0 0 16px rgba(0, 237, 255, 0.7);
}

/* ARTICLE CARD */
.sp-article {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 26px 32px;
    box-shadow: 0 18px 45px rgba(15, 35, 70, 0.10);
}

/* HEADER */
.sp-header {
    margin-bottom: 22px;
}

.sp-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.sp-cat {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 194, 255, 0.08);
    color: #0072b2;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.sp-title {
    font-size: 28px;
    line-height: 1.25;
    margin: 0 0 12px;
    color: #102034;
}

/* META */
.sp-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #607089;
}

.sp-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sp-avatar img {
    border-radius: 50%;
}

.sp-author {
    font-weight: 600;
    color: #1c2d48;
}

.sp-date {
    opacity: .8;
    font-size: 12px;
}

.sp-readtime {
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: #3451b2;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
}

/* THUMB */
.sp-thumb {
    margin: 18px 0 22px;
    border-radius: 20px;
    overflow: hidden;
}

.sp-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

/* CONTENT */
.sp-content {
    font-size: 15px;
    line-height: 1.7;
    color: #243147;
}

.sp-content p {
    margin-bottom: 16px;
}

.sp-content h2,
.sp-content h3,
.sp-content h4 {
    margin: 26px 0 12px;
    color: #182642;
    font-weight: 700;
}

/* TAGS */
.sp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.sp-tag {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    background: #f1f6ff;
    color: #4356b0;
}

/* PREV / NEXT */
.sp-post-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(15, 35, 70, 0.06);
    font-size: 13px;
}

.sp-post-nav a {
    color: #0a8ad7;
    text-decoration: none;
}

.sp-post-nav a:hover {
    text-decoration: underline;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .sp-page {
        padding: 16px 10px 32px;
    }

    .sp-topnav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 6px;
        margin-bottom: 18px;
    }

    .sp-menu {
        gap: 10px;
    }

    .sp-btn {
        min-width: auto;
        padding: 8px 16px;
        font-size: 13px;
    }

    .sp-article {
        padding: 20px 16px 22px;
        border-radius: 18px;
    }

    .sp-title {
        font-size: 22px;
    }

    .sp-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .sp-post-nav {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* =========================
   GLOBAL RESET + BASICS
========================= */
body.single-post {
    background: var(--page-bg);
    color: var(--text);
    font-family: "Inter", sans-serif;
    margin: 0;
    padding: 0;
}

/* Container for content */
.single-wrapper {
    max-width: 850px;
    margin: 40px auto;
    padding: 0 20px;
}

/* =========================
   TOP NAV (Home / Services / Blog)
========================= */
.single-topnav {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 15px 0;
    position: sticky;
    top: 0;
    background: var(--page-bg);
    z-index: 999;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.single-topnav a {
    padding: 9px 20px;
    border-radius: 40px;
    border: 2px solid var(--accent);
    text-decoration: none;
    font-weight: 600;
    color: var(--accent);
    transition: .25s;
}

.single-topnav a:hover {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 12px var(--accent);
}

/* =========================
   THEME SWITCHER
========================= */
.theme-toggle {
    position: absolute;
    right: 20px;
    top: 14px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #d7eaff;
    border-radius: 40px;
    transition: .4s;
    box-shadow: 0 0 10px rgba(0,255,255,0.4);
}

.slider:before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(0,255,255,0.5);
    transition: .3s;
}

input:checked + .slider {
    background: #008bff;
    box-shadow: 0 0 14px #00e5ff;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* =========================
   TITLE + META
========================= */
.single-title {
    font-size: 34px;
    font-weight: 800;
    margin-top: 15px;
    margin-bottom: 20px;
}

.single-meta {
    display: flex;
    gap: 15px;
    color: var(--muted);
    font-size: 15px;
}

/* =========================
   FEATURED IMAGE
========================= */
.single-featured {
    width: 100%;
    margin: 20px 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.07);
}

/* ============================
   DESKTOP TOC
============================ */
.toc-box {
    position: fixed;
    top: 120px;
    left: 25px;
    width: 250px;
    background: #ffffff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    z-index: 1000;
}

.toc-box h3 {
    margin-bottom: 12px;
    font-size: 18px;
    color: #111;
}

.toc-box a {
    display: block;
    margin-bottom: 8px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
}

.toc-box a:hover {
    color: #007bff;
}

/* Dark mode */
.dark-mode .toc-box {
    background: #ffffff !important;
    color: #111 !important;
}

.dark-mode .toc-box a {
    color: #111 !important;
}

/* Hide desktop TOC on mobile */
@media (max-width: 992px) {
    .toc-box {
        display: none;
    }
}

/* ============================
   MOBILE TOC BUTTON
============================ */
.toc-mobile-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #007bff;
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    display: none;
    z-index: 2000;
}

@media (max-width: 992px) {
    .toc-mobile-btn {
        display: block;
    }
}

/* ============================
   MOBILE SLIDE PANEL
============================ */
.toc-mobile-panel {
    position: fixed;
    left: -300px;
    top: 0;
    width: 260px;
    height: 100%;
    background: #ffffff;
    padding: 20px;
    transition: left .3s ease;
    overflow-y: auto;
    z-index: 3000;
}

.toc-mobile-panel.open {
    left: 0;
}

.toc-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toc-mobile-header h3 {
    margin: 0 0 10px;
}

.toc-close {
    font-size: 24px;
    cursor: pointer;
}

.toc-mobile-panel a {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    color: #111;
}

/* Dark mode mobile */
.dark-mode .toc-mobile-panel {
    background: #111 !important;
}
.dark-mode .toc-mobile-panel a {
    color: #fff !important;
}
.dark-mode .toc-close {
    color: #fff;
}
.dark-mode .toc-box {
    background: #0d1117 !important;
    border: 1px solid rgba(0, 238, 255, 0.4);
    box-shadow: 0 0 25px rgba(0, 238, 255, 0.15);
}

.dark-mode .toc-box h3 {
    color: #00eaff !important;
}

.dark-mode .toc-box a {
    color: #d8faff !important;
}

.dark-mode .toc-box a:hover {
    color: #00eaff !important;
}
/* FIX IMAGES ON MOBILE */
.single-content img,
.single-post img,
.entry-content img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    margin: 20px 0;
}
.single-content img,
.single-post img {
    width: 100% !important;
}
.dark-mode .single-meta div::first-letter {
    text-shadow: 0 0 8px rgba(0,255,255,0.8);
}
/* CLEAN PROFESSIONAL META LINE */
.single-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.85;
}

/* normalize emojis so they don't grow */
.single-meta .meta-item {
    display: flex;
    align-items: center;
    font-size: 18px;
    white-space: nowrap;
}

.single-meta .meta-dot {
    font-size: 20px;
    opacity: 0.5;
}

/* DARK MODE – HIGH CONTRAST + LIGHT NEON */
.dark-mode .single-meta .meta-item,
.dark-mode .single-meta .meta-dot {
    color: #e8ffff !important;
}

.dark-mode .single-meta .meta-item::first-letter {
    text-shadow: 0 0 8px rgba(0,255,255,0.6);
}

/* MOBILE: reduce spacing */
@media (max-width: 480px) {
    .single-meta {
        gap: 8px;
        font-size: 16px;
    }
}
/* PERFECT META LINE */
.clean-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    margin-bottom: 20px;
}

.clean-meta .meta-block {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* FIX ICON SIZE (UNBREAKABLE) */
.clean-meta img {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain !important;
    display: inline-block;
    flex-shrink: 0 !important;
}

/* LIGHT MODE TEXT */
.clean-meta span {
    font-size: 16px;
    color: #333;
}

/* DARK MODE */
.dark-mode .clean-meta span {
    color: #e8ffff !important;
}

.dark-mode .clean-meta img {
    filter: drop-shadow(0 0 4px rgba(0,255,255,0.7));
}
/* Raise desktop TOC position and optimize height */
.toc-box {
    top: 100px !important;      /* поднимаем вверх (можно уменьшить до 80px) */
    max-height: calc(100vh - 140px) !important; /* динамическая высота окна */
    overflow-y: auto !important;
    padding-bottom: 10px !important; 
}
@media (min-width: 992px) {
    #toc-box {
        top: 170px !important;
    }
}
/* DARK MODE — SOFT NEON FOR HEADINGS AND BOLD TEXT */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode strong,
body.dark-mode b {
    color: #f8ffff !important;
    text-shadow:
        0 0 4px rgba(0, 255, 255, 0.35),
        0 0 10px rgba(0, 255, 255, 0.25);
}

/* Slightly softer text for paragraphs */
body.dark-mode p,
body.dark-mode li,
body.dark-mode span {
    color: #dff6f6 !important;
}

/* even softer for italic text */
body.dark-mode em,
body.dark-mode i {
    color: #edfefe !important;
    text-shadow: 0 0 3px rgba(0,255,255,0.25);
}
@media (min-width: 992px) {
    #toc-box {
        top: 90px !important;
    }
}
/* ==========================================
   MOBILE – compact navbar + shift left
========================================== */
@media (max-width: 768px) {

    /* Сдвиг всего ряда левее */
    .single-topnav {
        justify-content: flex-start !important;
        gap: 15px !important;
        padding-left: 69px !important;
    }

    /* Компактные кнопки */
    .single-topnav a {
        padding: 6px 14px !important;
        font-size: 14px !important;
        border-radius: 20px !important;
    }

    /* Уменьшенный переключатель темы */
    .theme-toggle {
        transform: scale(0.9) !important;
        margin-left: 8 !important;
    }
}
/* ============================
   LIGHT MODE – основной текст
===============================*/
body:not(.dark-mode) .single-content,
body:not(.dark-mode) p,
body:not(.dark-mode) li,
body:not(.dark-mode) div {
    color: #333333 !important;   /* тёмно-серый, высокая читабельность */
    line-height: 1.75 !important;
    font-weight: 400 !important;
}

/* Мета-информация */
body:not(.dark-mode) .single-meta span {
    color: #555555 !important; /* мягкая контрастная серость */
}

body:not(.dark-mode) .single-meta img {
    opacity: 0.7;
}
/* =====================================================
   PREMIUM GRADIENT HEADERS — ONLY LIGHT THEME
===================================================== */

body:not(.dark-mode) .single-content h1,
body:not(.dark-mode) .single-content h2,
body:not(.dark-mode) .single-content h3,
body:not(.dark-mode) .single-content h4,
body:not(.dark-mode) .single-content h5,
body:not(.dark-mode) .single-content h6,
body:not(.dark-mode) h1.single-title {
    background: linear-gradient(90deg, #00e8ff, #7a5bff, #c8f9ff) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
}

/* ===== Smaller sizes (light theme only) ===== */
body:not(.dark-mode) .single-title { font-size: 30px !important; }
body:not(.dark-mode) .single-content h1 { font-size: 28px !important; }
body:not(.dark-mode) .single-content h2 { font-size: 24px !important; }
body:not(.dark-mode) .single-content h3 { font-size: 20px !important; }
body:not(.dark-mode) .single-content h4 { font-size: 18px !important; }
body:not(.dark-mode) .single-content h5 { font-size: 16px !important; }
body:not(.dark-mode) .single-content h6 { font-size: 15px !important; }
/* ==================================================
   PREMIUM ARTICLE FRAME — DESKTOP & MOBILE
================================================== */

.single-wrapper {
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(0, 200, 255, 0.35);
    border-radius: 22px;
    padding: 35px 28px;
    box-shadow:
        0 0 12px rgba(0, 200, 255, 0.25),
        0 0 22px rgba(0, 200, 255, 0.15);
    backdrop-filter: blur(8px);
    margin-top: 40px;
}

/* Dark mode — тёмная рамка с неоном */
body.dark-mode .single-wrapper {
    background: rgba(0, 15, 25, 0.45);
    border: 2px solid rgba(0, 255, 255, 0.35);
    box-shadow:
        0 0 14px rgba(0, 255, 255, 0.25),
        0 0 28px rgba(0, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}
@media (max-width: 768px) {
    .single-wrapper {
        padding: 22px 18px;
        border-radius: 18px;
        margin-top: 25px;
    }
}
/* ======================================================
   PREMIUM MINI RELATED POSTS
   Neon Border + Glassmorphism + Compact Cards
====================================================== */

/* Заголовок блока */
.related-posts h3 {
    font-size: 20px !important;
    margin-bottom: 12px !important;
    font-weight: 700;
    background: linear-gradient(90deg, #00e8ff, #7a5bff, #c8f9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* GRID — compact layout */
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px !important;
}

/* CARD — mini + glass + neon */
.related-item {
    padding: 12px !important;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.25); /* стекло */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.35); /* неон */
    box-shadow:
        0 0 8px rgba(0, 255, 255, 0.25),
        0 0 18px rgba(0, 255, 255, 0.15);
    transition: 0.25s ease;
}

/* Hover = premium lift */
.related-item:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 12px rgba(0, 255, 255, 0.4),
        0 0 25px rgba(0, 255, 255, 0.25);
}

/* IMAGE — mini size */
.related-item img {
    width: 100%;
    height: 95px !important; 
    object-fit: cover;
    border-radius: 10px;
}

/* TITLE — compact + readable */
.related-item h4 {
    margin-top: 8px !important;
    font-size: 14px !important;
    line-height: 1.3;
    font-weight: 600;
    color: #00aacc !important;
}

/* ============================
   DARK MODE VERSION
============================ */
body.dark-mode .related-item {
    background: rgba(0, 20, 30, 0.45);
    border: 1px solid rgba(0, 255, 255, 0.4);
    box-shadow:
        0 0 10px rgba(0, 255, 255, 0.3),
        0 0 20px rgba(0, 255, 255, 0.2);
}

body.dark-mode .related-item h4 {
    color: #c8f9ff !important;
}

/* ============================
   MOBILE MINI VERSION
============================ */
@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .related-item {
        padding: 10px !important;
        border-radius: 12px;
    }

    .related-item img {
        height: 85px !important;
    }

    .related-item h4 {
        font-size: 14px !important;
    }
}
/* FIX: show full related post thumbnail */
.related-item img {
    height: auto !important;      /* убрать жёсткую высоту */
    max-height: 180px;            /* чтобы не была слишком высокая */
    width: 100% !important;
    object-fit: contain !important;  /* показываем полностью, без обрезки */
    border-radius: 10px;
}
/* АНИМАЦИЯ ПОЯВЛЕНИЯ RELATED POSTS */
.related-item {
    opacity: 0;
    transform: translateY(20px);
    animation: relatedFade 0.8s ease-out forwards;
}

/* СДЕЛАТЬ ПОЯВЛЕНИЕ ПО ОЧЕРЕДИ (1 → 2 → 3) */
.related-item:nth-child(1) {
    animation-delay: 0.1s;
}
.related-item:nth-child(2) {
    animation-delay: 0.25s;
}
.related-item:nth-child(3) {
    animation-delay: 0.4s;
}
.related-item:nth-child(4) {
    animation-delay: 0.55s;
}

/* КЛЮЧИ АНИМАЦИИ */
@keyframes relatedFade {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    60% {
        opacity: 1;
        transform: translateY(5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* FORCE SHOW READING PROGRESS BAR */
#reading-progress {
    position: fixed !important;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    z-index: 999999 !important;
    background: #00e8ff !important;
    box-shadow: 0 0 10px #00e8ff;
    display: block !important;
    opacity: 1 !important;
}
/* Force Telegram floating button style across entire blog */
.tg-float-btn {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;

    width: 65px !important;
    height: 65px !important;

    background: #0088cc !important;
    border-radius: 50% !important;

    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

    box-shadow: 
        0 0 12px rgba(0, 155, 255, 0.8) !important, 
        0 0 22px rgba(0, 155, 255, 0.5) !important,
        0 0 35px rgba(0, 155, 255, 0.35) !important;

    cursor: pointer !important;
    z-index: 99999 !important;

    animation: tgPulse 2.6s infinite ease-in-out,
               tgFloat 4s infinite ease-in-out !important;

    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.tg-float-btn:hover {
    transform: scale(1.15) !important;
    box-shadow: 
        0 0 18px rgba(0, 200, 255, 0.9) !important,
        0 0 35px rgba(0, 200, 255, 0.6) !important,
        0 0 55px rgba(0, 200, 255, 0.35) !important;
}

.tg-float-btn img {
    width: 38px !important;
    height: 38px !important;
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.8)) !important;
}

/* Rebuild animations in blog CSS */
@keyframes tgPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.07); }
    100% { transform: scale(1); }
}

@keyframes tgFloat {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}
/* ============================
   BLOG PAGE (tg-page) — NEON CARDS, LIGHT THEME
============================ */

/* Карточка поста в светлой теме */
body:not(.dark-mode) .tg-page .post-card {
    background: rgba(255,255,255,0.9);
    border-radius: 22px;
    padding: 22px;
    border: 1px solid rgba(0,255,255,0.35);
    box-shadow:
        0 0 8px rgba(0,255,255,0.18),
        0 0 18px rgba(0,255,255,0.16),
        0 0 30px rgba(0,255,255,0.10);
    transition:
        box-shadow 0.25s ease,
        transform 0.2s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

/* Ховер: усиливаем свечение и чуть поднимаем */
body:not(.dark-mode) .tg-page .post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0,255,255,0.7);
    background: rgba(255,255,255,0.96);
    box-shadow:
        0 0 12px rgba(0,255,255,0.33),
        0 0 26px rgba(0,255,255,0.28),
        0 0 44px rgba(0,255,255,0.22);
}
/* Картинка поста — лёгкий неон */
body:not(.dark-mode) .tg-page .post-card .post-media img {
    border-radius: 18px;
    display: block;
    width: 100%;
    height: auto;
    box-shadow:
        0 0 7px rgba(0,255,255,0.20),
        0 0 16px rgba(0,255,255,0.16);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

/* При наведении на карточку — сильнее подсветка картинки */
body:not(.dark-mode) .tg-page .post-card:hover .post-media img {
    box-shadow:
        0 0 12px rgba(0,255,255,0.38),
        0 0 24px rgba(0,255,255,0.32);
    transform: translateY(-2px);
}
/* Неон-рамка для sidebar и intro карточек в светлой теме */
body:not(.dark-mode) .tg-page .tg-card {
    background: rgba(255,255,255,0.9);
    border-radius: 24px;
    border: 1px solid rgba(0,255,255,0.32);
    box-shadow:
        0 0 9px rgba(0,255,255,0.17),
        0 0 22px rgba(0,255,255,0.15),
        0 0 36px rgba(0,255,255,0.10);
    transition:
        box-shadow 0.25s ease,
        transform 0.2s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

body:not(.dark-mode) .tg-page .tg-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0,255,255,0.5);
    box-shadow:
        0 0 14px rgba(0,255,255,0.32),
        0 0 30px rgba(0,255,255,0.28),
        0 0 50px rgba(0,255,255,0.22);
}
