/* ============================================================
   Блог Бабушки Гали — Liquid Glass UI
   Матовое стекло, объёмные тени, анимированная «аврора».
   ============================================================ */

:root {
  /* Палитра — свежий огуречно-садовый */
  --ink: #10241a;
  --ink-soft: #3a5247;
  --ink-faint: #6b8378;

  --accent: #21a038;
  --accent-strong: #1a8a2f;
  --accent-soft: rgba(33, 160, 56, 0.12);

  /* Стекло */
  --glass-bg: rgba(255, 255, 255, 0.58);
  --glass-bg-strong: rgba(255, 255, 255, 0.74);
  --glass-stroke: rgba(255, 255, 255, 0.85);
  --glass-stroke-soft: rgba(255, 255, 255, 0.5);

  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;

  /* Объёмные тени */
  --shadow-soft: 0 18px 50px -22px rgba(16, 60, 40, 0.45);
  --shadow-lift: 0 30px 70px -28px rgba(16, 60, 40, 0.55);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -10px 26px -18px rgba(11, 80, 60, 0.4);

  --blur: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: clamp(14px, 3vw, 40px);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: #eef2f0;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Анимированная аврора (фоновые орбы) ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.26;
  will-change: transform;
}

.orb-1 {
  width: 46vw;
  height: 46vw;
  left: -10vw;
  top: -8vw;
  background: radial-gradient(circle at 30% 30%, #6ee7b7, #10b981 70%);
  animation: float-a 18s ease-in-out infinite;
}

.orb-2 {
  width: 40vw;
  height: 40vw;
  right: -12vw;
  top: 4vw;
  background: radial-gradient(circle at 60% 40%, #8fe0a6, #21a038 72%);
  animation: float-b 22s ease-in-out infinite;
}

.orb-3 {
  width: 38vw;
  height: 38vw;
  left: 22vw;
  bottom: -14vw;
  background: radial-gradient(circle at 50% 50%, #a7e9ba, #2faa45 72%);
  animation: float-a 26s ease-in-out infinite reverse;
}

.orb-4 {
  width: 30vw;
  height: 30vw;
  right: 16vw;
  bottom: -8vw;
  background: radial-gradient(circle at 40% 60%, #a7f3d0, #34d399 72%);
  animation: float-b 20s ease-in-out infinite reverse;
}

@keyframes float-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vw, 5vw, 0) scale(1.12); }
}

@keyframes float-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-7vw, 4vw, 0) scale(1.08); }
}

/* ---------- Каркас страницы ---------- */
.page {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.4vw, 26px);
}

.page--narrow {
  max-width: 800px;
}

/* ---------- Базовый стеклянный слой ---------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft), var(--shadow-inset);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  backdrop-filter: blur(var(--blur)) saturate(180%);
}

/* Бликовая «капля» света сверху панели */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    150deg,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.05) 32%,
    rgba(255, 255, 255, 0) 60%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(24px, 4vw, 44px);
  text-align: center;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #0d6b46;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--glass-stroke);
  border-radius: 999px;
  box-shadow: 0 6px 16px -10px rgba(11, 80, 60, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hero-title {
  margin: 16px 0 6px;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.04;
  color: var(--accent);
}

.hero-sub {
  margin: 0;
  font-size: clamp(15px, 2.2vw, 19px);
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------- Бегущая строка ---------- */
.ticker {
  margin-top: 22px;
  overflow: hidden;
  border-radius: 999px;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-stroke-soft);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  white-space: nowrap;
  font-weight: 600;
  color: #0d6b46;
  animation: ticker 18s linear infinite;
}

.ticker-track span {
  padding-left: 26px;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Видео-блок ---------- */
.video-feature {
  padding: clamp(18px, 2.6vw, 28px);
  overflow: hidden;
}

.video-head {
  text-align: center;
  margin-bottom: 18px;
}

.video-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #0d6b46;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--glass-stroke);
  border-radius: 999px;
  box-shadow: 0 6px 16px -10px rgba(11, 80, 60, 0.6);
}

.video-title {
  margin: 12px 0 4px;
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--ink);
}

.video-sub {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
}

.video-frame {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 8px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-stroke-soft);
  box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.feature-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 8px);
  background: #06150e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  pointer-events: none; /* видео декоративное — никаких кликов и контекстных меню */
}

/* Полностью прячем нативные элементы управления (WebKit/Safari/iOS) */
.feature-video::-webkit-media-controls,
.feature-video::-webkit-media-controls-enclosure,
.feature-video::-webkit-media-controls-panel,
.feature-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

/* ---------- Сетка контента ---------- */
.layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: clamp(16px, 2.4vw, 26px);
  align-items: start;
}

/* ---------- Сайдбар ---------- */
.sidebar {
  padding: 22px;
  position: sticky;
  top: 24px;
}

.nav-block + .nav-block {
  margin-top: 22px;
}

.block-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--ink-faint);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-list a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.nav-list a:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--glass-stroke);
  transform: translateX(4px);
  box-shadow: 0 10px 22px -16px rgba(11, 80, 60, 0.8);
}

/* ---------- Архив (чипы) ---------- */
.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.archive-link {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-stroke-soft);
  border-radius: 999px;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease,
    box-shadow 0.16s ease;
}

.archive-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  box-shadow: 0 10px 20px -12px rgba(11, 80, 60, 0.7);
}

.archive-link.active {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 10px 22px -12px rgba(26, 138, 47, 0.6);
}

/* ---------- Счётчик посещений ---------- */
.counter-wrap {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #0f2a1c;
  box-shadow: var(--shadow-inset), 0 14px 30px -18px rgba(8, 40, 28, 0.9);
}

.counter-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(167, 243, 208, 0.8);
}

.counter {
  margin: 4px 0 0;
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #3ec866;
}

/* ---------- Контент ---------- */
.content {
  padding: clamp(22px, 3vw, 36px);
}

.section-title {
  margin: 0 0 22px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--ink);
}

.loading {
  color: var(--ink-faint);
  font-weight: 500;
}

/* ---------- Карточки статей ---------- */
.post-item {
  position: relative;
  padding: 22px 24px;
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-stroke-soft);
  box-shadow: 0 16px 40px -26px rgba(16, 60, 40, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease;
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.post-item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
  opacity: 0.9;
}

.post-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.post-item:nth-child(2) { animation-delay: 0.05s; }
.post-item:nth-child(3) { animation-delay: 0.1s; }
.post-item:nth-child(4) { animation-delay: 0.15s; }
.post-item:nth-child(5) { animation-delay: 0.2s; }

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

.post-item h3 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.post-item h3 a {
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat left bottom / 0% 2px;
  transition: background-size 0.25s ease, color 0.2s ease;
  padding-bottom: 2px;
}

.post-item h3 a:hover {
  color: var(--accent);
  background-size: 100% 2px;
}

.post-meta {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
}

.post-item p {
  margin: 0 0 12px;
  color: var(--ink-soft);
}

.post-item p:last-child {
  margin-bottom: 0;
}

/* «Читать дальше» как объёмная кнопка */
.post-item p:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 12px 24px -14px rgba(26, 138, 47, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.post-item p:last-child a:hover {
  transform: translateY(-2px);
  background: var(--accent-strong);
  box-shadow: 0 18px 30px -14px rgba(26, 138, 47, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ---------- Навигация на странице статьи ---------- */
.post-nav {
  margin-top: -2px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke-soft);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.back-link:hover {
  transform: translateX(-3px);
  background: rgba(255, 255, 255, 0.7);
}

.back-link:hover .back-arrow {
  transform: translateX(-3px);
}

.back-arrow {
  transition: transform 0.18s ease;
}

/* ---------- Статья ---------- */
#post h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.1;
  color: var(--ink);
}

#post .post-meta {
  margin-bottom: 20px;
}

#post > p:nth-of-type(2) {
  font-size: 18px;
  color: var(--ink);
}

#post h3 {
  margin: 28px 0 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

#post p {
  color: var(--ink-soft);
}

#post a {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Изображения ---------- */
figure {
  margin: 22px 0;
}

.post-image {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  display: block;
}

figcaption {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-faint);
  text-align: center;
}

/* ---------- Футер ---------- */
.footer {
  padding: 18px;
  text-align: center;
  border-radius: var(--radius-lg);
}

.footer p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- Адаптив ---------- */
@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .ticker-track,
  .post-item {
    animation: none !important;
  }

  * {
    scroll-behavior: auto;
  }
}
