/* ============================================================
   БЛОГ — стили
   ============================================================ */

.block-blog-index,
.block-blog-page {
    padding: 40px 0 var(--section-pad);
}

/* ============================================================
   ШАПКА СТРАНИЦЫ БЛОГА
   ============================================================ */
.blog-head {
    text-align: center;
    margin-bottom: 40px;
}
.blog-head-title {
    font-size: 42px;
    margin-bottom: 12px;
}
.blog-head-sub {
    color: var(--ink-soft);
    font-size: 16px;
    max-width: 640px;
    margin: 0 auto;
}

/* ============================================================
   ФИЛЬТР КАТЕГОРИЙ — при наведении только бордер
   ============================================================ */
.blog-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}
.blog-filter {
    padding: 10px 22px;
    border-radius: 100px;
    background: var(--white);
    border: 1.5px solid var(--pudra);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    transition: border-color 0.2s ease;
}
.blog-filter:hover {
    border-color: var(--terracotta);
}
.blog-filter.active {
    background: var(--olive);
    color: var(--white);
    border-color: var(--olive);
}

/* ============================================================
   СВЕЖАЯ СТАТЬЯ
   ============================================================ */
.blog-fresh-wrap { margin-bottom: 24px; }

.blog-fresh {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--olive);
    border-radius: 24px;
    overflow: hidden;
    min-height: 400px;
    transition: transform 0.15s ease;
}
.blog-fresh:hover { transform: translateY(-3px); }

.blog-fresh-image {
    position: relative;
    min-height: 400px;
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--olive) 100%);
}
.blog-fresh-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-fresh-body {
    padding: 40px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
}
.blog-fresh-tag {
    display: inline-block;
    background: rgba(255, 253, 251, 0.15);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 100px;
    align-self: flex-start;
    margin: 0;
}
.blog-fresh-title {
    font-size: 30px;
    line-height: 1.2;
    margin: 0;
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 500;
}
.blog-fresh-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    margin: 0;
}
.blog-fresh-meta {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}
.blog-fresh-btn {
    display: inline-block;
    background: var(--terracotta);
    color: var(--white);
    padding: 14px 30px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 700;
    align-self: flex-start;
    margin-top: 6px;
    transition: transform 0.15s ease, background 0.15s ease;
}
.blog-fresh:hover .blog-fresh-btn {
    transform: translateY(-2px);
    background: var(--terracotta-dark);
}

/* ============================================================
   СЕТКА И КАРТОЧКИ
   ============================================================ */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(51, 46, 39, 0.04);
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(51, 46, 39, 0.08);
}

/* Верх карточки — минимум 180px */
.blog-card-top {
    position: relative;
    min-height: 180px;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    background: linear-gradient(135deg, var(--pudra) 0%, var(--cream) 100%);
}
.blog-card-top img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Цвета-градиенты по категории */
.blog-card-top.tone-sage {
    background: linear-gradient(135deg, var(--sage) 0%, var(--sage-dark) 100%);
}
.blog-card-top.tone-olive {
    background: linear-gradient(135deg, var(--olive-light) 0%, var(--olive) 100%);
}
.blog-card-top.tone-terracotta {
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 100%);
}
.blog-card-top.tone-pudra {
    background: linear-gradient(135deg, var(--pudra) 0%, var(--caramel) 100%);
}
.blog-card-top.tone-caramel {
    background: linear-gradient(135deg, var(--caramel) 0%, var(--pudra) 100%);
}
.blog-card-top.tone-cream {
    background: linear-gradient(135deg, var(--cream) 0%, var(--pudra) 100%);
}
.blog-card-top.tone-white {
    background: linear-gradient(135deg, var(--white) 0%, var(--cream) 100%);
}

.blog-card-tag {
    position: relative;
    z-index: 1;
    background: rgba(255, 253, 251, 0.92);
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 100px;
    margin: 0;
}

.blog-card-bottom {
    padding: 22px 24px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: var(--white);
}
.blog-card-title {
    font-size: 17px;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--ink);
    font-family: var(--font-heading);
    font-weight: 500;
}
.blog-card-desc {
    font-size: 13.5px;
    color: var(--ink-soft);
    line-height: 1.55;
    margin-bottom: 16px;
}
.blog-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--pudra);
    font-size: 12.5px;
    margin-top: auto;
}
.blog-meta { color: var(--ink-soft); }
.blog-arrow {
    color: var(--terracotta-dark);
    font-size: 16px;
    transition: transform 0.15s ease;
}
.blog-card:hover .blog-arrow { transform: translateX(4px); }

.blog-empty {
    color: var(--ink-soft);
    padding: 40px 0;
    text-align: center;
}

/* ============================================================
   ПАГИНАЦИЯ — в кружочках
   ============================================================ */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 48px;
}
.page-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    background: var(--white);
    border: 1px solid var(--pudra);
    color: var(--ink-soft);
    transition: all 0.15s ease;
    text-decoration: none;
}
.page-num:hover {
    border-color: var(--terracotta);
    color: var(--terracotta);
}
.page-num.active {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: var(--white);
}
.page-arrow { font-size: 16px; }

/* ============================================================
   СТРАНИЦА СТАТЬИ
   ============================================================ */
.blog-breadcrumbs {
    font-size: 14px;
    color: var(--ink-soft);
    margin-bottom: 32px;
}
.blog-breadcrumbs a { color: var(--ink-soft); }
.blog-breadcrumbs a:hover { color: var(--terracotta); }
.blog-breadcrumbs-sep { margin: 0 8px; opacity: 0.5; }

.blog-hero {
    margin-bottom: 48px;
    text-align: center;
}
.blog-hero.blog-hero-with-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    text-align: left;
}
.blog-hero-title {
    font-size: 42px;
    margin-bottom: 16px;
    line-height: 1.15;
}
.blog-hero-intro {
    font-size: 18px;
    color: var(--ink-soft);
    margin-bottom: 20px;
}
.blog-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ink-soft);
    justify-content: center;
}
.blog-hero.blog-hero-with-image .blog-hero-meta { justify-content: flex-start; }
.blog-meta-dot { opacity: 0.4; }
.blog-hero-image img { border-radius: 20px; width: 100%; }

.blog-body {
    max-width: 720px;
    margin: 0 auto;
}
.blog-body h2 { font-size: 28px; margin: 32px 0 16px; }
.blog-body h3 { font-size: 22px; margin: 24px 0 12px; }
.blog-body p { margin-bottom: 18px; line-height: 1.75; }
.blog-body ul, .blog-body ol { margin: 16px 0; padding-left: 24px; }
.blog-body li { margin-bottom: 8px; }
.blog-body a { color: var(--terracotta); text-decoration: underline; text-underline-offset: 3px; }
.blog-body a:hover { color: var(--terracotta-dark); }
.blog-body img { border-radius: 16px; margin: 16px 0; max-width: 100%; }

.blog-image { margin: 32px 0; text-align: center; }
.blog-image img { border-radius: 16px; width: 100%; height: auto; }
.blog-image-caption {
    font-size: 14px;
    color: var(--ink-soft);
    margin-top: 10px;
}

.blog-quote {
    border-left: 3px solid var(--terracotta);
    padding: 8px 0 8px 24px;
    margin: 32px 0;
    font-style: italic;
    font-size: 18px;
    color: var(--ink);
}
.blog-quote p { margin-bottom: 8px; }
.blog-quote cite {
    display: block;
    font-size: 14px;
    color: var(--ink-soft);
    font-style: normal;
    margin-top: 8px;
}

/* --- Блок продукта в статье --- */
.blog-product-cta {
    background: var(--olive); /* тёмный фон из макета */
    color: var(--white);
    border-radius: 20px;
    padding: 32px;
    margin: 40px 0;
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.blog-product-cta-text {
    flex: 1 1 300px;
}

.blog-product-cta-eyebrow {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--caramel); /* ← цвет как на макете */
    font-weight: 700;
    margin-bottom: 6px;
}

.blog-product-cta-title {
    font-size: 20px;
    margin-bottom: 6px;
    color: var(--white);
}

.blog-product-cta-desc {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    max-width: 420px;
}

/* Кнопка внутри блока — перебиваем возможные конфликты */
.blog-product-cta .blog-product-cta-btn,
.blog-product-cta .btn-primary {
    flex-shrink: 0;
    background: var(--terracotta) !important;
    color: var(--white) !important;   /* фиксируем белый текст */
    border: none;
    padding: 14px 26px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.15s ease;  /* только движение, цвет не меняем */
}

.blog-product-cta .blog-product-cta-btn:hover,
.blog-product-cta .btn-primary:hover {
    background: var(--terracotta) !important;  /* цвет тот же */
    color: var(--white) !important;
    transform: translateY(-2px);               /* лёгкий подъём как в макете */
}

/* Поделиться — тёмно-зелёный (olive) */
.blog-share {
    max-width: 720px;
    margin: 48px auto 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid var(--pudra);
    font-size: 14px;
}
.blog-share-label { color: var(--ink-soft); }
.blog-share a,
.blog-share-copy {
    color: var(--olive);
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: 14px;
    text-decoration: underline;
    transition: color 0.15s ease;
}
.blog-share a:hover,
.blog-share-copy:hover { color: var(--terracotta); }
.blog-share a + a::before {
    content: "·";
    color: var(--ink-soft);
    margin-right: 10px;
    display: inline-block;
}
.blog-share-sep { color: var(--ink-soft); }

/* Читать дальше */
.block-blog-readmore { padding: var(--section-pad) 0; }
.blog-readmore-title {
    font-size: 28px;
    margin-bottom: 32px;
}

/* ============================================================
   ПОДПИСКА
   ============================================================ */
.block-blog-subscribe { padding: var(--section-pad) 0; }
.blog-subscribe-inner {
    background: var(--pudra);
    border-radius: 28px;
    padding: 56px 32px;
    text-align: center;
}
.blog-subscribe-title { font-size: 28px; margin-bottom: 14px; }
.blog-subscribe-sub { color: var(--ink-soft); margin-bottom: 32px; }
.blog-subscribe-btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: 1fr 1fr; }
    .blog-fresh { grid-template-columns: 1fr; min-height: auto; }
    .blog-fresh-image { min-height: 260px; }
    .blog-fresh-body { padding: 32px 28px; }
    .blog-fresh-title { font-size: 24px; }
    .blog-hero.blog-hero-with-image { grid-template-columns: 1fr; gap: 32px; }
    .blog-hero-title { font-size: 32px; }
    .blog-head-title { font-size: 34px; }
}

@media (max-width: 767px) {
    .blog-grid { grid-template-columns: 1fr; gap: 16px; }
    .blog-fresh-title { font-size: 22px; }
    .blog-fresh-body { padding: 24px 20px; }
    .blog-hero-title { font-size: 26px; }
    .blog-hero-intro { font-size: 16px; }
    .blog-product-cta { flex-direction: column; align-items: flex-start; padding: 24px; }
    .blog-subscribe-inner { padding: 40px 20px; }
    .blog-subscribe-title { font-size: 22px; }
    .blog-filters { gap: 8px; margin-bottom: 28px; }
    .blog-filter { padding: 8px 16px; font-size: 13px; }
    .blog-head-title { font-size: 28px; }
    .blog-head { margin-bottom: 28px; }
    .page-num { width: 36px; height: 36px; font-size: 13px; }
    .blog-pagination { gap: 8px; margin-top: 32px; }
}
/* ============================================================
   БЛОК БЛОГА НА ГЛАВНОЙ (StreamField)
   ============================================================ */
.block-home-blog {
    padding: var(--section-pad) 0;
    background: var(--cream);
}
.blog-grid-home {
    justify-content: center;
}
.blog-grid-home .blog-card {
    max-width: 360px;
}
.blog-home-cta {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}
/* Страница результата подписки */
.subscribe-result {
    text-align: center;
    max-width: 560px;
    margin: 60px auto;
    padding: 48px 32px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(51, 46, 39, 0.06);
}
.subscribe-result-title {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--ink);
}
.subscribe-result-message {
    font-size: 16px;
    color: var(--ink-soft);
    line-height: 1.7;
}