/* ====================================================================
   GLG BLOG — стили секции блога (www/blog/style.css)
   Использует переменные темы --t-* из theme.css.
   ==================================================================== */

.blog-page {
    margin: 0;
    font-family: var(--t-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    background: var(--t-bg, #fff);
    color: var(--t-text, #1a2332);
    line-height: 1.6;
}
.blog-page * { box-sizing: border-box; }

/* ============ STICKY PROGRESS BAR ============ */
.blog-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--t-primary), var(--t-accent));
    z-index: var(--t-z-progress, 9999);
    transition: width 0.12s linear;
}

/* ============ HERO ============ */
.blog-hero {
    position: relative;
    background: linear-gradient(135deg, var(--t-primary-dark, #1a5c92) 0%, var(--t-primary, #2c7ec0) 100%);
    color: #fff;
    padding: 64px 24px 72px;
    text-align: center;
    overflow: hidden;
}
.blog-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
}
.blog-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Затемняем сильнее, чтобы текст был читаем поверх яркой подложки. */
    background: linear-gradient(180deg, rgba(10,18,32,0.72) 0%, rgba(10,18,32,0.55) 50%, rgba(8,12,22,0.85) 100%);
}
.blog-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
}
.blog-hero-eyebrow,
.blog-hero h1,
.blog-hero .blog-eyebrow,
.blog-hero .blog-hero-sub { text-shadow: 0 2px 14px rgba(10,14,26,0.55); }
.blog-hero-inner { max-width: 760px; margin: 0 auto; }
.blog-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--t-accent, #ffb347);
    margin-bottom: 16px;
}
.blog-hero h1 {
    font-size: 40px;
    line-height: 1.15;
    margin: 0 0 16px;
    font-weight: 800;
}
.blog-hero-sub {
    font-size: 18px;
    opacity: 0.92;
    margin: 0 auto;
    max-width: 620px;
}

/* ============ MAIN + GRID (list page) ============ */
.blog-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

/* ============ CHIP-FILTERS категорий (как на femida.club) ============ */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 34px;
}
.blog-chip {
    padding: 9px 18px;
    border-radius: var(--t-radius-pill, 100px);
    background: var(--t-bg, #fff);
    border: 1px solid var(--t-border, #e3ecf5);
    color: var(--t-text-soft, #2c3e50);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.blog-chip svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.blog-chip:hover {
    /* явный фон, чтобы перекрыть глобальный button:hover (#45a049 зелёный) из main.css */
    background: var(--t-bg, #f5f9fd);
    border-color: var(--t-primary, #2c7ec0);
    color: var(--t-primary, #2c7ec0);
}
.blog-chip.active {
    background: linear-gradient(135deg, var(--t-primary, #2c7ec0), var(--t-primary-dark, #1a5c92));
    color: #fff;
    border-color: transparent;
    box-shadow: var(--t-shadow-sm, 0 4px 12px rgba(44,126,192,0.25));
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}
.blog-card {
    border-radius: var(--t-radius-lg, 20px);
    border: 1px solid var(--t-border, #e3ecf5);
    background: var(--t-bg-soft, #f5f9fd);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--t-shadow-md, 0 12px 32px rgba(44, 126, 192, 0.12));
}
.blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 26px;
    text-decoration: none;
    color: inherit;
}
.blog-card-link:hover,
.blog-card-link:hover * {
    text-decoration: none;
}
.blog-card-icon {
    font-size: 34px;
    margin-bottom: 14px;
    color: var(--t-primary, #2c7ec0);
}
.blog-card-icon svg {
    width: 34px;
    height: 34px;
}
.blog-card-date {
    font-size: 13px;
    color: var(--t-muted, #6b7c8f);
    margin-bottom: 8px;
    font-weight: 600;
}
.blog-card-title {
    font-size: 21px;
    line-height: 1.3;
    margin: 0 0 12px;
    font-weight: 700;
    color: var(--t-text, #1a2332);
}
.blog-card-excerpt {
    font-size: 15px;
    color: var(--t-text-soft, #2c3e50);
    margin: 0 0 18px;
    flex-grow: 1;
}
.blog-card-more {
    font-weight: 700;
    color: var(--t-primary, #2c7ec0);
    font-size: 15px;
}

/* ============ ARTICLE PAGE ============ */
.blog-article {
    max-width: 780px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}
.blog-article-header {
    margin-bottom: 36px;
}
.blog-article-back {
    display: inline-block;
    margin-bottom: 22px;
    color: var(--t-primary, #2c7ec0);
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
}
.blog-article-back:hover { text-decoration: underline; }
.blog-article-meta {
    font-size: 14px;
    color: var(--t-muted, #6b7c8f);
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.blog-article-h1 {
    font-size: 34px;
    line-height: 1.2;
    margin: 0 0 18px;
    font-weight: 800;
}
.blog-article-lead {
    font-size: 18px;
    color: var(--t-text-soft, #2c3e50);
    border-left: 4px solid var(--t-accent, #ffb347);
    padding-left: 18px;
    margin: 0 0 30px;
}
.blog-toc {
    background: var(--t-bg-soft, #f5f9fd);
    border: 1px solid var(--t-border, #e3ecf5);
    border-radius: var(--t-radius, 10px);
    padding: 20px 24px;
    margin-bottom: 36px;
}
.blog-toc-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--t-muted, #6b7c8f);
    margin: 0 0 12px;
}
.blog-toc ol {
    margin: 0;
    padding-left: 20px;
}
.blog-toc li { margin: 6px 0; }
.blog-toc a {
    color: var(--t-primary, #2c7ec0);
    text-decoration: none;
    font-weight: 500;
}
.blog-toc a:hover { text-decoration: underline; }

.blog-article-body h2 {
    font-size: 26px;
    margin: 40px 0 14px;
    padding-top: 10px;
    border-top: 1px solid var(--t-border, #e3ecf5);
    scroll-margin-top: 90px;
}
.blog-article-body h3 {
    font-size: 20px;
    margin: 28px 0 10px;
}
.blog-article-body p {
    margin: 0 0 16px;
}
.blog-article-body ul,
.blog-article-body ol {
    margin: 0 0 18px;
    padding-left: 24px;
}
.blog-article-body li { margin: 6px 0; }
.blog-article-body strong { font-weight: 700; }
.blog-article-body blockquote {
    margin: 20px 0;
    padding: 14px 18px;
    border-left: 4px solid var(--t-accent, #ffb347);
    background: var(--t-bg-soft-2, #eef4fa);
    border-radius: 0 var(--t-radius, 10px) var(--t-radius, 10px) 0;
}
.blog-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 26px;
    font-size: 15px;
}
.blog-article-body th,
.blog-article-body td {
    border: 1px solid var(--t-border, #e3ecf5);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}
.blog-article-body th {
    background: var(--t-bg-soft, #f5f9fd);
    font-weight: 700;
}
.blog-article-tags {
    margin: 28px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.blog-tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--t-radius-pill, 100px);
    background: var(--t-bg-soft, #f5f9fd);
    border: 1px solid var(--t-border, #e3ecf5);
    font-size: 13px;
    color: var(--t-muted, #6b7c8f);
    font-weight: 600;
}

/* ============ ПОХОЖИЕ СТАТЬИ (как на femida.club) ============ */
.blog-related {
    margin: 44px 0 8px;
    padding: 30px 0;
    border-top: 1px solid var(--t-border, #e3ecf5);
    border-bottom: 1px solid var(--t-border, #e3ecf5);
}
.blog-related-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--t-text, #1c1c1e);
    letter-spacing: -0.02em;
}
.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.blog-related-card {
    display: flex;
    gap: 14px;
    padding: 18px;
    background: var(--t-bg, #fff);
    border: 1px solid var(--t-border, #e8e8e6);
    border-radius: var(--t-radius, 14px);
    text-decoration: none;
    transition: all 0.2s ease;
    color: inherit;
}
.blog-related-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--t-shadow-md, 0 8px 24px rgba(0,0,0,0.08));
    border-color: var(--t-border-strong, #d0d0d0);
}
.blog-related-card:hover,
.blog-related-card:hover * {
    text-decoration: none;
}
.blog-related-icon {
    font-size: 26px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    color: var(--t-primary, #2c7ec0);
    justify-content: center;
    background: var(--t-bg-soft, #f6f6f4);
    border-radius: 12px;
}
.blog-related-icon svg {
    width: 22px;
    height: 22px;
}
.blog-related-content { flex: 1; min-width: 0; }
.blog-related-content h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--t-text, #1c1c1e);
    line-height: 1.35;
}
.blog-related-content p {
    font-size: 13px;
    color: var(--t-muted, #7a7a7e);
    margin: 0 0 8px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-related-read {
    font-size: 12px;
    font-weight: 600;
    color: var(--t-primary, #2c7ec0);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}
.blog-related-card:hover .blog-related-read { gap: 8px; }

/* ============ CTA ============ */
.blog-cta {
    background: var(--t-bg-soft, #f5f9fd);
    border-top: 1px solid var(--t-border, #e3ecf5);
    padding: 56px 24px;
    text-align: center;
}
.blog-cta-inner { max-width: 560px; margin: 0 auto; }
.blog-cta h2 { margin: 0 0 12px; font-size: 26px; }
.blog-cta p { margin: 0 0 22px; color: var(--t-text-soft, #2c3e50); }
.blog-cta-btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: var(--t-radius-pill, 100px);
    background: linear-gradient(135deg, var(--t-primary, #2c7ec0) 0%, var(--t-primary-dark, #1a5c92) 100%);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--t-shadow, 0 4px 14px rgba(0,0,0,0.08));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-cta-btn:hover { transform: translateY(-2px); box-shadow: var(--t-shadow-md); }

/* ============ LEGAL FOOTER ============ */
.blog-legal {
    max-width: 780px;
    margin: 0 auto;
    padding: 8px 24px 72px;
    text-align: center;
    font-size: 14px;
    color: var(--t-muted, #6b7c8f);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
    .blog-hero { padding: 48px 20px 56px; }
    .blog-hero h1 { font-size: 30px; }
    .blog-hero-sub { font-size: 16px; }
    .blog-main, .blog-article { padding: 32px 18px 48px; }
    .blog-grid { grid-template-columns: 1fr; gap: 20px; }
    .blog-article-h1 { font-size: 28px; }
    .blog-article-body h2 { font-size: 22px; }
}

/* Профиль чтения статьи — скролл-прогресс */
.blog-article-body h2 { position: relative; }

/* Инлайн-чат в статьях монтируется widget.js ([data-gllg-chat]) — его стили инжектит сам виджет. */

