/* ============================================================================
   Стили для страниц новостей И/Инсайдер
   Подключается из public/api/blog/lib/news-prerender.php
   Используется как для страницы статьи, так и для списка/архива.
   ============================================================================ */

/* ─── База ──────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif;
    background-color: #FAFAFA;
    color: #1A1A1A;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

/* ─── Шрифты ────────────────────────────────────────────────────────────── */
.font-head { font-family: 'Unbounded', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* ─── Цветовые токены ───────────────────────────────────────────────────── */
.bg-bgBase     { background-color: #FAFAFA; }
.bg-bgSurface  { background-color: #F0F0F0; }
.bg-accent     { background-color: #15803d; }
.bg-textMain   { background-color: #1A1A1A; }
.bg-urgentRed  { background-color: #B91C1C; }
.text-accent   { color: #15803d; }
.text-textMain { color: #1A1A1A; }
.text-textMuted{ color: #6b7280; }
.text-bgBase   { color: #FAFAFA; }
.border-borderDark { border-color: #E5E5E5; }

/* ─── Декор и ховеры ────────────────────────────────────────────────────── */
.pattern-grid {
    background-image:
        linear-gradient(#E5E5E5 1px, transparent 1px),
        linear-gradient(90deg, #E5E5E5 1px, transparent 1px);
    background-size: 30px 30px;
}
.hover\:text-accent:hover { color: #15803d; }
.hover\:bg-bgSurface:hover { background-color: #F0F0F0; }
.transition-colors { transition: color .15s, background-color .15s; }
.animate-pulse { animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.5; } }

/* ─── Бегущая строка (ticker) ───────────────────────────────────────────── */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background-color: #1A1A1A;
    color: #FAFAFA;
    padding: 8px 0;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
}
.ticker-inner {
    display: inline-block;
    white-space: nowrap;
    padding-right: 100%;
    animation: ticker 40s linear infinite;
    color: #fff;
}
@keyframes ticker {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* ─── Sticky-сайдбар ────────────────────────────────────────────────────── */
.sticky-sidebar { position: sticky; top: 100px; }

/* ─── Контент статьи ────────────────────────────────────────────────────── */
.article-content p {
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1.125rem;
    color: #1A1A1A;
}
.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    line-height: 1.8;
    font-size: 1.125rem;
}
.article-content li { margin-bottom: 0.5rem; }

/* Лид-параграф — первый абзац после картинки */
.article-content > p:first-of-type {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.4;
    color: #1A1A1A;
    margin-bottom: 3rem;
}

/* Pull-quote из markdown blockquote и кастомных блоков .pull-quote */
.pull-quote,
.article-content blockquote {
    position: relative;
    padding-left: 2rem;
    border-left: 4px solid #15803d;
    margin: 3rem 0;
}
.article-content blockquote p {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.5rem;
    line-height: 1.3;
    text-transform: uppercase;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: .75rem;
}

/* ─── Подпись источника на изображении ──────────────────────────────────── */
.image-caption {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: rgba(255, 255, 255, .75);
    background: rgba(0, 0, 0, .35);
    padding: 4px 8px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-transform: uppercase;
    letter-spacing: .1em;
}

/* ─── Кнопки шаринга ────────────────────────────────────────────────────── */
.share-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #E5E5E5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1A1A1A;
    text-decoration: none;
    transition: background-color .15s;
}
.share-btn:hover { background-color: #F0F0F0; color: #15803d; }
.share-btn svg   { width: 16px; height: 16px; fill: currentColor; }

/* ─── Футер ─────────────────────────────────────────────────────────────── */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 5rem;
}
@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 2fr; }
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}
@media (min-width: 768px) {
    .footer-cols { grid-template-columns: repeat(3, 1fr); }
}
.footer-cols ul  { list-style: none; padding: 0; margin: 0; }
.footer-cols li  { margin-bottom: .75rem; }
.footer-cols a   { text-decoration: none; color: #6b7280; transition: color .15s; }
.footer-cols a:hover { color: #15803d; }
.footer-bottom {
    border-top: 1px solid #E5E5E5;
    padding-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}
@media (min-width: 768px) {
    .footer-bottom { flex-direction: row; }
}

/* ─── Список/архив новостей ─────────────────────────────────────────────── */
a:hover h2 { color: #15803d; }

/* ============================================================================
   УТИЛИТАРНЫЙ СЛОЙ (мини-Tailwind)
   Только те классы, что реально используются в шаблонах PHP-рендерера.
   ============================================================================ */

/* ─── Display ───────────────────────────────────────────────────────────── */
.block        { display: block; }
.flex         { display: flex; }
.hidden       { display: none; }

/* ─── Flex ──────────────────────────────────────────────────────────────── */
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.justify-center { justify-content: center; }

/* ─── Gap (шаг 0.25rem) ─────────────────────────────────────────────────── */
.gap-2  { gap: .5rem; }
.gap-3  { gap: .75rem; }
.gap-8  { gap: 2rem; }
.gap-10 { gap: 2.5rem; }

/* ─── Padding ───────────────────────────────────────────────────────────── */
.px-1  { padding-left: .25rem;  padding-right: .25rem; }
.px-2  { padding-left: .5rem;   padding-right: .5rem; }
.px-8  { padding-left: 2rem;    padding-right: 2rem; }
.py-1  { padding-top: .25rem;   padding-bottom: .25rem; }
.py-12 { padding-top: 3rem;     padding-bottom: 3rem; }
.pt-8  { padding-top: 2rem; }
.pt-20 { padding-top: 5rem; }
.pb-10 { padding-bottom: 2.5rem; }
.pb-12 { padding-bottom: 3rem; }

/* ─── Margin ────────────────────────────────────────────────────────────── */
.mb-2   { margin-bottom: .5rem; }
.mb-4   { margin-bottom: 1rem; }
.mb-6   { margin-bottom: 1.5rem; }
.mb-8   { margin-bottom: 2rem; }
.mb-10  { margin-bottom: 2.5rem; }
.mb-12  { margin-bottom: 3rem; }
.mt-10  { margin-top: 2.5rem; }
.mt-12  { margin-top: 3rem; }
.ml-2   { margin-left: .5rem; }
.mx-auto{ margin-left: auto; margin-right: auto; }

/* ─── Size ──────────────────────────────────────────────────────────────── */
.w-2     { width: .5rem; }
.w-full  { width: 100%; }
.h-2     { height: .5rem; }
.h-16    { height: 4rem; }
.h-full  { height: 100%; }

/* ─── Container ─────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1280px; margin-left: auto; margin-right: auto; }

/* ─── Position ──────────────────────────────────────────────────────────── */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky   { position: sticky; }
.inset-0  { top: 0; right: 0; bottom: 0; left: 0; }
.top-0    { top: 0; }
.z-50     { z-index: 50; }
.pointer-events-none { pointer-events: none; }

/* ─── Типографика ───────────────────────────────────────────────────────── */
.text-xs         { font-size: .75rem; }
.text-sm         { font-size: .875rem; }
.text-xl         { font-size: 1.25rem; }
.text-2xl        { font-size: 1.5rem; }
.text-right      { text-align: right; }
.uppercase       { text-transform: uppercase; }
.tracking-tight  { letter-spacing: -.025em; }
.tracking-tighter{ letter-spacing: -.05em; }
.leading-snug    { line-height: 1.375; }
.leading-tight   { line-height: 1.25; }
.font-bold       { font-weight: 700; }
.font-black      { font-weight: 900; }

/* ─── Border ────────────────────────────────────────────────────────────── */
.border            { border-width: 1px; border-style: solid; }
.border-t          { border-top-width: 1px; border-top-style: solid; }
.border-b          { border-bottom-width: 1px; border-bottom-style: solid; }
.rounded-full     { border-radius: 9999px; }
.border-\[20px\]   { border-width: 20px; border-style: solid; }
.border-bgBase\/10 { border-color: rgba(250, 250, 250, .1); }

/* ─── Изображения ───────────────────────────────────────────────────────── */
.aspect-video    { aspect-ratio: 16 / 9; }
.object-cover    { object-fit: cover; }
.overflow-hidden { overflow: hidden; }
.grayscale       { filter: grayscale(100%); }
.brightness-75   { filter: brightness(.75); }
.grayscale.brightness-75 { filter: grayscale(100%) brightness(.75); }

/* ─── Transitions ───────────────────────────────────────────────────────── */
.transition-transform { transition: transform .15s; }
.duration-700        { transition-duration: .7s; }

/* ─── Group-hover ───────────────────────────────────────────────────────── */
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group:hover .group-hover\:text-accent { color: #15803d; }

/* ─── Адаптив md (>=768px) ──────────────────────────────────────────────── */
@media (min-width: 768px) {
    .md\:flex       { display: flex; }
    .md\:flex-row   { flex-direction: row; }
    .md\:items-end  { align-items: flex-end; }
}

/* ─── Адаптив lg (>=1024px) ─────────────────────────────────────────────── */
@media (min-width: 1024px) {
    .lg\:grid       { display: grid; }
}

/* ============================================================================
   АРХИВ НОВОСТЕЙ (split-layout: hero + live-feed)
   ============================================================================ */

.news-archive-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
@media (min-width: 1024px) {
    .news-archive-body { flex-direction: row; min-height: calc(100vh - 140px); }
}

/* ── Featured-hero (левая часть) ─────────────────────────────────────────── */
.news-archive-featured {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom: 1px solid #E5E5E5;
    min-height: 480px;
    background: #FAFAFA;
}
@media (min-width: 1024px) {
    .news-archive-featured {
        width: 65%;
        border-right: 1px solid #E5E5E5;
        border-bottom: 0;
    }
}

.featured-hero-visual {
    position: relative;
    flex: 1 1 auto;
    min-height: 280px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.featured-hero-visual .pattern-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(#E5E5E5 1px, transparent 1px),
        linear-gradient(90deg, #E5E5E5 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: .5;
}
.featured-hero-visual .big-text {
    position: relative;
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 14vw, 14rem);
    color: rgba(26, 26, 26, .06);
    line-height: 1;
    user-select: none;
    text-transform: uppercase;
    letter-spacing: -.04em;
    white-space: nowrap;
    pointer-events: none;
}
.featured-hero-visual .hero-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
    opacity: .15;
}

.featured-hero-content {
    position: relative;
    padding: 2.5rem 2rem;
    background: linear-gradient(to top, #FAFAFA 20%, rgba(250, 250, 250, .92) 60%, transparent 100%);
}
@media (min-width: 768px) {
    .featured-hero-content { padding: 3rem; }
}
.featured-hero-content h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.75rem, 4vw, 3rem);
    line-height: .95;
    text-transform: uppercase;
    color: #1A1A1A;
    margin: 0 0 1.5rem;
    letter-spacing: -.02em;
}
.featured-hero-content h1 a { color: inherit; text-decoration: none; }
.featured-hero-content h1 a:hover { color: #15803d; }
.featured-hero-content .excerpt {
    color: #6b7280;
    font-size: .95rem;
    line-height: 1.6;
    max-width: 36rem;
    margin: 0 0 2rem;
}

.breaking-tag {
    background: #B91C1C;
    color: white;
    padding: 4px 10px;
    font-family: 'Unbounded', sans-serif;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.hero-cta {
    display: inline-block;
    background: #1A1A1A;
    color: #FAFAFA;
    font-family: 'Unbounded', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .75rem 1.5rem;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}
.hero-cta:hover { background: #15803d; color: #fff; }

/* ── Live-feed (правая часть) ────────────────────────────────────────────── */
.news-archive-feed {
    display: flex;
    flex-direction: column;
    background: #FAFAFA;
}
@media (min-width: 1024px) { .news-archive-feed { width: 35%; } }

.feed-header {
    padding: 1.25rem 1.5rem;
    background: #F0F0F0;
    border-bottom: 1px solid #E5E5E5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feed-list { flex: 1 1 auto; overflow-y: auto; max-height: 680px; }

.news-feed-item {
    display: block;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #E5E5E5;
    text-decoration: none;
    color: inherit;
    transition: background-color .15s;
}
.news-feed-item:hover { background: #F0F0F0; }
.news-feed-item:hover h3 { color: #15803d; }
.news-feed-item h3 {
    font-family: 'Unbounded', sans-serif;
    font-size: .875rem;
    line-height: 1.25;
    text-transform: uppercase;
    color: #1A1A1A;
    margin: .5rem 0;
    transition: color .15s;
}

.feed-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6b7280;
}
.feed-dot--urgent   { background: #B91C1C; }
.feed-dot--featured { background: #15803d; }

.feed-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: .1em;
}
.feed-label--urgent   { color: #B91C1C; }
.feed-label--featured { color: #15803d; }

.feed-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.news-archive-premium {
    margin-top: auto;
    padding: 1.5rem;
    border-top: 1px solid #E5E5E5;
    background: rgba(21, 128, 61, .05);
}
.news-archive-premium .title {
    font-family: 'Unbounded', sans-serif;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    color: #15803d;
    letter-spacing: .1em;
    margin-bottom: .5rem;
}
.news-archive-premium p {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 1rem;
}
.news-archive-premium .btn {
    display: block;
    width: 100%;
    background: #15803d;
    color: white;
    border: 0;
    padding: .75rem;
    font-family: 'Unbounded', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
}

/* ── Слим-футер архива ───────────────────────────────────────────────────── */
.news-archive-footer-slim {
    border-top: 1px solid #E5E5E5;
    padding: 0 1.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: #FAFAFA;
    flex-wrap: wrap;
}

/* hero <img> переход с background-image (LCP fix, перфоманс-аудит 2026-04-25) */
.featured-hero-visual .hero-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
#ii-newsletter-form input[type="email"]::placeholder {
  color: #fff;
}