/* ============================================================
   BLOG — стили для страницы блога и отдельных статей
   Цветовая палитра основана с главной страницы index.html
   Акцент: #caa57f, фон тёмный #000 / светлые секции #f5f5f0
   ============================================================ */

/* ===============================
   HERO — тёмный верх с мягким золотым свечением
   =============================== */
.blog-hero {
    background-color: #1a1613;
    padding: clamp(140px, 20vw, 200px) 20px clamp(60px, 8vw, 90px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Мягкое радиальное свечение за заголовком */
.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 65% 55% at 50% 40%, rgba(202, 165, 127, 0.28), transparent 70%),
        radial-gradient(ellipse 90% 70% at 50% 100%, rgba(202, 165, 127, 0.08), transparent 60%);
    pointer-events: none;
}

.blog-hero-inner {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.blog-hero h1 {
    color: #fff;
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    line-height: 1.1;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

.blog-hero .kicker {
    display: inline-block;
    color: #caa57f;
    font-size: 0.82rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    position: relative;
    padding: 0 30px;
}

/* Декоративные линии по бокам от kicker */
.blog-hero .kicker::before,
.blog-hero .kicker::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 1px;
    background: rgba(202, 165, 127, 0.5);
}

.blog-hero .kicker::before { right: 100%; }
.blog-hero .kicker::after { left: 100%; }

.blog-hero p.lead {
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.75;
    max-width: 680px;
    margin: 0 auto;
}

.blog-hero p.lead a {
    color: #caa57f;
    text-decoration: none;
    border-bottom: 1px solid rgba(202, 165, 127, 0.3);
    transition: border-color .3s ease, color .3s ease;
}

.blog-hero p.lead a:hover {
    color: #e0bf95;
    border-bottom-color: #e0bf95;
}

.blog-hero::after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    background: #caa57f;
    margin: clamp(28px, 4vw, 40px) auto 0;
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

/* ===============================
   LIST — сетка карточек статей (тёмная секция)
   =============================== */
.blog-list {
    background: #000;
    padding: clamp(40px, 6vw, 70px) 20px clamp(60px, 8vw, 100px);
}

.blog-list-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: clamp(20px, 3vw, 32px);
}

/* ------- Карточка ------- */
.blog-card {
    background: #0b0b0b;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform .4s ease, box-shadow .4s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.blog-card-image {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #1a1a1a;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
    transition: transform .6s ease, filter .4s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
    filter: brightness(1);
}

.blog-card-body {
    padding: clamp(20px, 2.5vw, 28px);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #caa57f;
    margin-bottom: 0.8rem;
}

.blog-card-meta .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(202, 165, 127, 0.5);
}

.blog-card-meta .date {
    color: rgba(255, 255, 255, 0.5);
}

.blog-card h2 {
    font-size: clamp(1.15rem, 1.8vw, 1.4rem);
    color: #fff;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.8rem;
}

.blog-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    flex: 1;
}

.blog-card-more {
    color: #caa57f;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color .3s ease, transform .3s ease;
}

.blog-card:hover .blog-card-more {
    color: #e0bf95;
    transform: translateX(4px);
}

/* Пустое состояние */
.blog-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 60px 20px;
    font-size: 1.1rem;
}

/* ============================================================
   ОДИНОЧНАЯ СТАТЬЯ (post)
   ============================================================ */
.post-hero {
    background-color: #fff;
    padding: clamp(120px, 18vw, 180px) 20px clamp(40px, 6vw, 60px);
    text-align: center;
}

.post-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.post-breadcrumbs {
    font-size: 0.82rem;
    color: rgba(0, 0, 0, 0.55);
    margin-bottom: 1.5rem;
    letter-spacing: 0.04em;
}

.post-breadcrumbs a {
    color: #8a6b4f;
    text-decoration: none;
}

.post-breadcrumbs a:hover {
    text-decoration: underline;
}

.post-breadcrumbs .sep {
    margin: 0 8px;
    color: rgba(0, 0, 0, 0.3);
}

.post-hero h1 {
    color: #000;
    font-size: clamp(1.75rem, 4.5vw, 3rem);
    line-height: 1.15;
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.post-meta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #6b6b6b;
    letter-spacing: 0.05em;
}

.post-meta .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #caa57f;
}

.post-meta .category {
    color: #8a6b4f;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.12em;
}

/* Обложка */
.post-cover {
    background: #000;
    padding: 0 20px;
}

.post-cover-inner {
    max-width: 720px;
    margin: 0 auto;
    transform: translateY(-40px);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.post-cover img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

/* Содержимое статьи */
.post-content {
    background: #000;
    color: rgba(255, 255, 255, 0.85);
    padding: clamp(20px, 4vw, 40px) 20px clamp(60px, 8vw, 100px);
}

.post-content-inner {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content-inner p {
    margin-bottom: 1.4em;
    color: rgba(255, 255, 255, 0.78);
}

.post-content-inner h2 {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    color: #fff;
    font-weight: 600;
    margin: 2.2em 0 0.8em;
    line-height: 1.25;
}

.post-content-inner h3 {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    color: #caa57f;
    font-weight: 500;
    margin: 1.8em 0 0.6em;
}

.post-content-inner ul,
.post-content-inner ol {
    margin: 0 0 1.4em 1.4em;
    padding-left: 0.6em;
}

.post-content-inner li {
    margin-bottom: 0.6em;
    color: rgba(255, 255, 255, 0.78);
}

.post-content-inner ul li::marker {
    color: #caa57f;
}

.post-content-inner a {
    color: #caa57f;
    text-decoration: none;
    border-bottom: 1px solid rgba(202, 165, 127, 0.35);
    transition: border-color .3s ease, color .3s ease;
}

.post-content-inner a:hover {
    color: #e0bf95;
    border-bottom-color: #e0bf95;
}

.post-content-inner blockquote {
    margin: 2em 0;
    padding: 1.25em 1.5em;
    border-left: 3px solid #caa57f;
    background: rgba(202, 165, 127, 0.06);
    color: rgba(255, 255, 255, 0.88);
    font-style: italic;
    border-radius: 0 10px 10px 0;
}

.post-content-inner img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em 0;
    display: block;
}

.post-content-inner figure {
    margin: 2em 0;
}

.post-content-inner figure img {
    margin: 0;
}

.post-content-inner figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
    font-style: italic;
}

.post-content-inner hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 2.5em 0;
}

/* CTA в конце статьи */
.post-cta {
    background: #0b0b0b;
    padding: clamp(40px, 6vw, 70px) 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.post-cta h3 {
    color: #caa57f;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 500;
    margin-bottom: 0.8em;
}

.post-cta p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 520px;
    margin: 0 auto 1.5em;
    line-height: 1.65;
}

.post-cta p a {
    color: #caa57f;
    text-decoration: none;
    border-bottom: 1px solid rgba(202, 165, 127, 0.35);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.post-cta p a:hover {
    color: #e0bf95;
    border-color: rgba(202, 165, 127, 0.7);
}

.post-cta-links {
    display: inline-flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.post-cta-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: 1px solid rgba(202, 165, 127, 0.5);
    border-radius: 999px;
    color: #caa57f;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background .3s ease, border-color .3s ease, color .3s ease;
}

.post-cta-links a:hover {
    background: rgba(202, 165, 127, 0.1);
    border-color: #caa57f;
    color: #e0bf95;
}

/* Блок «Читайте также» */
.post-related {
    background: #000;
    padding: clamp(40px, 6vw, 70px) 20px;
}

.post-related-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.post-related h3 {
    text-align: center;
    color: #fff;
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 500;
    margin-bottom: 2rem;
}

.post-related h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: #caa57f;
    margin: 1rem auto 0;
    opacity: 0.6;
}

/* ===============================
   МОБИЛЬНАЯ ВЕРСИЯ
   =============================== */
@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .post-cover-inner {
        border-radius: 12px;
        transform: translateY(-20px);
    }

    .post-content-inner {
        font-size: 1rem;
        line-height: 1.7;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-card-image img,
    .blog-card-more,
    .post-cta-links a {
        transition: none !important;
    }
}

.post-author {
    padding: clamp(40px, 6vw, 70px) 20px;
    background: #faf8f4;
    border-top: 1px solid rgba(202, 165, 127, 0.2);
}

.post-author-inner {
    max-width: 780px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: clamp(20px, 4vw, 36px);
    align-items: start;
}

.post-author-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    background: #e8e3d9;
    flex-shrink: 0;
}

.post-author-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-author-eyebrow {
    margin: 0 0 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #caa57f;
    font-weight: 500;
}

.post-author-name {
    margin: 0 0 12px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a1613;
}

.post-author-bio {
    margin: 0 0 18px;
    line-height: 1.7;
    color: #3a3631;
    font-size: 0.98rem;
}

.post-author-bio a {
    color: #8a6a45;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.post-author-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.post-author-links a {
    color: #1a1613;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 6px 14px;
    border: 1px solid rgba(26, 22, 19, 0.2);
    border-radius: 999px;
    transition: background 160ms ease, border-color 160ms ease;
}

.post-author-links a:hover {
    background: #1a1613;
    color: #faf8f4;
    border-color: #1a1613;
}

@media (max-width: 640px) {
    .post-author-inner {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
    .post-author-links {
        justify-content: center;
    }
}

/* ============================================================
   BLOG INDEX — расширенный intro (рубрики, цели блога)
   ============================================================ */
.blog-intro {
    max-width: 820px;
    margin: 0 auto;
    padding: clamp(50px, 7vw, 80px) 20px clamp(30px, 4vw, 50px);
    text-align: left;
}

.blog-intro h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    margin: 0 0 18px;
    color: #1a1613;
    font-weight: 600;
}

.blog-intro p {
    line-height: 1.75;
    color: #3a3631;
    margin: 0 0 18px;
    font-size: 1.02rem;
}

.blog-intro p a {
    color: #8a6a45;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.blog-topics {
    list-style: none;
    padding: 0;
    margin: 22px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.blog-topics li {
    padding: 8px 16px;
    background: #f5f1e8;
    border-radius: 999px;
    font-size: 0.88rem;
    color: #5a4f3d;
}

.blog-intro-note {
    margin: 28px 0 0;
    padding: 18px 22px;
    background: #fdfaf3;
    border-left: 3px solid #caa57f;
    border-radius: 4px;
    font-size: 0.94rem;
    color: #3a3631;
}

/* ========================================================
   Post content extensions — callouts, tables, checklists
   (added 2026-06-11 — replacing inline light-bg blocks)
   ======================================================== */

.post-content-inner .post-callout {
    background: rgba(202, 165, 127, 0.08);
    border-left: 4px solid #caa57f;
    padding: 22px 26px;
    margin: 28px 0;
    border-radius: 0 10px 10px 0;
    color: rgba(255, 255, 255, 0.88);
}
.post-content-inner .post-callout > p:first-child {
    margin: 0 0 10px;
    font-weight: 600;
    color: #fff;
    font-size: 1.05rem;
}
.post-content-inner .post-callout > p:last-child {
    margin-bottom: 0;
}
.post-content-inner .post-callout ol,
.post-content-inner .post-callout ul {
    margin: 0;
    padding-left: 22px;
}
.post-content-inner .post-callout ol li,
.post-content-inner .post-callout ul li {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 6px;
}
.post-content-inner .post-callout strong {
    color: #fff;
}

.post-content-inner .post-table-wrap {
    overflow-x: auto;
    margin: 28px 0;
    border-radius: 10px;
    border: 1px solid rgba(202, 165, 127, 0.18);
}
.post-content-inner .post-table-wrap table,
.post-content-inner table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}
.post-content-inner table thead tr {
    background: rgba(202, 165, 127, 0.12);
    border-bottom: 2px solid #caa57f;
}
.post-content-inner table th {
    padding: 14px;
    text-align: left;
    font-weight: 600;
    color: #fff;
    font-size: 0.92rem;
}
.post-content-inner table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.post-content-inner table tbody tr:last-child {
    border-bottom: none;
}
.post-content-inner table td {
    padding: 14px;
    color: rgba(255, 255, 255, 0.78);
    vertical-align: top;
}
.post-content-inner table td strong {
    color: #fff;
}
.post-content-inner table a {
    color: #caa57f;
}

/* ========================================================
   FIX: .blog-intro — тёмная тема под чёрный body.
   (2026-06-11)
   ======================================================== */
.blog-intro {
    background: #0b0b0b;
}
.blog-intro h2 {
    color: #fff;
    font-weight: 500;
}
.blog-intro p {
    color: rgba(255, 255, 255, 0.78);
}
.blog-intro p a {
    color: #caa57f;
    text-decoration-color: rgba(202, 165, 127, 0.45);
}
.blog-intro p a:hover {
    color: #e0bf95;
    text-decoration-color: #e0bf95;
}
.blog-topics li {
    background: rgba(202, 165, 127, 0.12);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(202, 165, 127, 0.2);
}
.blog-intro-note {
    background: rgba(202, 165, 127, 0.08);
    color: rgba(255, 255, 255, 0.85);
}
.blog-intro-note a {
    color: #caa57f;
}

/* ========================================================
   FIX-2: .blog-intro full-width layout под чёрный body
   (2026-06-11)
   ======================================================== */
.blog-intro {
    max-width: none;
    margin: 0;
    padding: clamp(56px, 7vw, 84px) 24px clamp(48px, 6vw, 72px);
    background: linear-gradient(180deg, #0b0b0b 0%, #050505 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.blog-intro > * {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
.blog-intro h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: #fff;
    margin: 0 auto 22px;
    position: relative;
    padding-top: 14px;
}
.blog-intro h2::before {
    content: 'Из блога';
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #caa57f;
    margin-bottom: 12px;
    font-weight: 500;
}
.blog-intro p {
    font-size: 1.02rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 auto 18px;
}
.blog-intro p:last-of-type {
    margin-bottom: 0;
}
.blog-topics {
    margin: 30px auto 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}
.blog-topics li {
    padding: 9px 18px;
    background: rgba(202, 165, 127, 0.08);
    border: 1px solid rgba(202, 165, 127, 0.22);
    border-radius: 999px;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.01em;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.blog-topics li:hover {
    background: rgba(202, 165, 127, 0.14);
    border-color: rgba(202, 165, 127, 0.4);
}
.blog-intro-note {
    margin: 32px auto 0;
    padding: 20px 24px;
    background: rgba(202, 165, 127, 0.06);
    border-left: 3px solid #caa57f;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
}
.blog-intro-note a {
    color: #caa57f;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}
.blog-intro-note a:hover {
    color: #e0bf95;
}

/* ========================================================
   FIX-3: ширина intro = 900px (как .blog-hero-inner)
   + увеличенные отступы между блоками intro
   ======================================================== */
.blog-intro > * {
    max-width: 900px;
}
.blog-topics {
    margin: 44px auto 0;
}
.blog-intro-note {
    margin: 88px auto 0;
}
.blog-intro h2 {
    margin: 0 auto 26px;
}

/* FIX-4: гарантированный отступ через padding-top контейнера .blog-intro
   (margin может collapsed/override) */
.blog-intro > p.blog-intro-note {
    margin-top: 48px !important;
    padding-top: 26px !important;
    padding-bottom: 26px !important;
}
