/* Базовые переменные и резет */
:root {
  --bg: #0f1115;
  --panel: #14151a;
  --muted: #bfc6cc;
  --neon-lime: #b7f34a;
  --neon-violet: #7a5cff;
  --glass: rgba(255, 255, 255, 0.03);
  --card-radius: 14px;
  --container: 1200px;
  --gap: 24px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, 'Source Code Pro', sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(26, 32, 44, 0.85) 0%, rgba(26, 32, 44, 0) 60%),
    radial-gradient(900px 700px at 50% 0, rgba(20, 22, 28, 0.9) 0%, rgba(20, 22, 28, 0) 65%),
    linear-gradient(180deg, #0f1115 0%, #0d0f14 50%, #0b0d12 100%);
  background-repeat: no-repeat;
  background-attachment: fixed, fixed, fixed;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.3;
  padding-bottom: 60px;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px;
}

/* Хедер и общие отступы для статей компактнее */
.site-header {
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
}
main.wrap {
  padding-top: 16px;
  padding-bottom: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--neon-lime), #8ff0a1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #071006;
  font-size: 26px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
.brand-title {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.5px;
}

.btn {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
  border-radius: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  color: var(--muted);
}

.meme-hero {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 16px 24px;
}
.meme-title {
  margin: 0;
  font-size: 44px;
  color: var(--neon-lime);
}

.section {
  margin: 30px 0;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent);
}
.article-section {
  padding: 28px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border: 1px solid rgba(255,255,255,0.04);
  position: relative;
  overflow: hidden;
  margin: 32px 0;
}
.article-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-lime), var(--neon-violet));
  opacity: 0.7;
}
.article-section h2 {
  margin: 0 0 14px;
  font-size: 28px;
  color: var(--neon-lime);
}
.article-section .article-text {
  color: var(--muted);
  max-width: 1200px;
  line-height: 1.5;

}

/* Обтекание изображений внутри текста */
.article-img-float {
  float: left;
  width: 40%;
  max-width: 420px;
  margin-right: 18px;
  margin-top: 18px;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
}

/* Очищаем обтекание после текстовых блоков */
.article-text::after {
  content: "";
  display: block;
  clear: both;
}

@media (max-width: 767px) {
  .article-img-float {
    float: none;
    display: block;
    width: 100%;
    max-width: none;
    margin: 12px 0;
  }
}

/* Доп. твики для узких экранов (iPhone XR и похожие, <=430px) */
@media (max-width: 430px) {
  .meme-hero { padding: 12px; }
  .meme-title { font-size: 26px; line-height: 1.05; }
  .backline a { width: 100%; justify-content: center; }
  .article-lead { gap: 12px; }
  .article-cover-figure { padding-left: 0; }
  .article-lead__text { max-width: 100%; }
  .article-lead__text p { font-size: 13px; }
  .article-section .article-text { font-size: 13px; }
  .site-header .wrap {
    padding: 12px 12px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
}

/* Лид: картинка слева, текст справа (без полосы и фона) */
.article-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin: 24px 0 0;
}

.article-lead p{
    max-width: 400px;
}

.article-lead__media { margin: 0; }

.article-lead__text {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 1023px) {
  .article-lead { grid-template-columns: 1fr; }
}

/* Обложка статьи */
.article-cover-figure {
  margin: 24px 0 0;
}
.meme-hero{
  padding-left: 28px;
}

.article-lead{
  padding-left: 28px;
}


.meme-herop{
  font-size: 13px;
}

.article-cover {
  display: block;
  width: 100%;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.35);

}

/* Медиа-блок статьи (видео + галерея) */
.article-media {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 960px;
}

.video-16x9 {
  position: relative;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}

.embed-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.site-footer {
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border-top: 1px solid rgba(255,255,255,0.03);
}
.site-footer .wrap {
  padding: 30px 24px;
  text-align: center;
}

/* Backline */
.backline {
  margin-top: 10px;
}
.backline a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 6px 10px;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.backline a:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
}

/* Галерея и лайтбокс */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.gallery__item {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  transition: transform .2s ease, border-color .2s ease;
}
.gallery__item:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.16);
}
.gallery__img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox.open { display: flex; }

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

.lightbox__close,
.lightbox__arrow {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.lightbox__close { top: 20px; right: 20px; }
.lightbox__arrow--left { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__arrow--right { right: 16px; top: 50%; transform: translateY(-50%); }

/* Back to top */
.to-top {
  display: flex;
  justify-content: center;
  margin: 32px 0 0;
}
.to-top__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.to-top__btn:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.2);
}

/* Related links (chips) */
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.related-links .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  transition: background .2s ease, transform .2s ease, border-color .2s ease, color .2s ease;
}

.related-links .chip:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

.related-links .chip--accent {
  background: linear-gradient(90deg, var(--neon-lime), #8ff0a1);
  border: none;
  color: #071006;
}

/* Адаптив галереи на мобильных */
@media (max-width: 767px) { .gallery__img { height: 160px; } }

/* Размер текста для очень маленьких экранов */
@media (max-width: 430px) {
  .article-text {
    font-size: 13px;
  }
}

/* ===== Адаптив хэдера статей как на главной ===== */
/* Планшеты в портрете (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
  .site-header .wrap {
    padding: 16px 32px;
  }
}

/* Мобильные устройства (480px - 767px) */
@media (max-width: 767px) and (min-width: 480px) {
  .site-header .wrap {
    padding: 14px 20px;
    flex-direction: column;
    gap: 12px;
  }
  .brand {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  .logo { width: 56px; height: 56px; font-size: 22px; }
  .brand-title { font-size: 18px; }
}

/* Очень маленькие экраны (до 479px) */
@media (max-width: 479px) {
  .site-header .wrap {
    padding: 12px 12px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  .brand {
    flex-direction: row;
    text-align: left;
    gap: 6px;
  }
  .logo { width: 48px; height: 48px; font-size: 20px; }
  .brand-title { font-size: 16px; }
}


