/* =========================================================
   IT-PARTNER.MOSCOW — BLOG
   Дополнительный слой поверх assets/style.css.
   Использует токены и общие компоненты (container, section,
   btn-primary, contact-box, lead-form), добавляет только
   блоговые компоненты: сетку статей, страницу статьи, FAQ.
   ========================================================= */


/* =========================================================
   BLOG INDEX — HERO
   ========================================================= */

.blog-hero {
    padding-top: 210px;
    padding-bottom: 40px;
}

.blog-hero h1 {
    margin: 0;
    max-width: 840px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.055em;
    font-weight: 650;
}

.blog-hero .blog-lead {
    max-width: 620px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.75;
}


/* =========================================================
   BLOG INDEX — GRID
   ========================================================= */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 30px 30px 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    transition:
        border-color 0.25s ease,
        transform 0.25s ease,
        background 0.25s ease;
}

.blog-card:hover {
    border-color: rgba(102, 246, 193, 0.3);
    transform: translateY(-3px);
    background: var(--panel-solid);
}

.blog-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.blog-card-category {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.blog-card-date {
    color: var(--muted);
    font-size: 12px;
}

.blog-card h3 {
    margin: 0;
    font-size: 21px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    font-weight: 650;
}

.blog-card p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.blog-card .blog-card-link {
    margin-top: auto;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.blog-card .blog-card-link:hover {
    color: var(--accent);
}

.blog-card .blog-card-link::after {
    content: '\2192';
    color: var(--accent);
}

.blog-card.is-teaser {
    opacity: 0.7;
}

.blog-card.is-teaser .blog-card-link {
    color: var(--muted);
    font-weight: 500;
}

.blog-card.is-teaser .blog-card-link::after {
    content: '';
}


/* =========================================================
   ARTICLE PAGE
   ========================================================= */

.article-hero {
    padding-top: 210px;
    padding-bottom: 34px;
}

.article-hero .blog-card-category {
    margin-bottom: 14px;
}

.article-hero h1 {
    margin: 0;
    max-width: 960px;
    font-size: clamp(34px, 4.6vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.05em;
    font-weight: 650;
}

.article-hero .article-deck {
    max-width: 720px;
    margin: 26px 0 0;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.7;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    color: var(--muted);
    font-size: 13px;
}

.article-meta span + span::before {
    content: '\00B7';
    margin-right: 16px;
    color: var(--line-strong);
}

.article-meta, .article-hero {
    -webkit-user-select: none;
    user-select: none;
}


/* =========================================================
   ARTICLE BODY (Typography)
   ========================================================= */

.article-body {
    max-width: 820px;
    margin: 0 auto;
}

.article-body > p {
    margin: 0 0 26px;
    color: var(--text);
    font-size: 17px;
    line-height: 1.85;
}

.article-body > h2 {
    margin: 60px 0 22px;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.028em;
    font-weight: 650;
    color: var(--text);
}

.article-body > h3 {
    margin: 40px 0 16px;
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    font-weight: 650;
    color: var(--text);
}

.article-body a {
    color: var(--blue);
    text-decoration: none;
    border-bottom: 1px solid rgba(99, 169, 255, 0.3);
    transition: border-color 0.2s ease;
}

.article-body a:hover {
    border-color: var(--blue);
}

.article-body ul,
.article-body ol {
    margin: 0 0 26px;
    padding-left: 22px;
}

.article-body li {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 17px;
    line-height: 1.7;
}

.article-body ::marker {
    color: var(--accent);
}

.article-body strong {
    color: var(--text);
    font-weight: 650;
}

.article-body table {
    width: 100%;
    margin: 34px 0;
    border-collapse: collapse;
    font-size: 15px;
}

.article-body th,
.article-body td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.article-body th {
    color: var(--text);
    font-weight: 650;
    background: var(--panel);
}

.article-body td {
    color: var(--muted);
    line-height: 1.6;
}

.article-body td:first-child {
    color: var(--text);
    font-weight: 600;
}

@media (max-width: 660px) {
    .article-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.article-body blockquote {
    margin: 34px 0;
    padding: 4px 0 4px 24px;
    border-left: 3px solid var(--accent);
    color: var(--muted-strong);
    font-size: 18px;
    font-style: italic;
    line-height: 1.7;
}


/* =========================================================
   CTA (переиспользует contact-box из style.css)
   ========================================================= */

.blog-cta {
    padding: 40px 0 150px;
}


/* =========================================================
   FAQ
   ========================================================= */

.faq-section {
    padding-top: 40px;
}

.faq-list {
    max-width: 820px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    overflow: hidden;
}

.faq-item + .faq-item {
    margin-top: 14px;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 22px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.45;
    transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:hover {
    color: var(--accent);
}

.faq-item summary::after {
    content: '+';
    flex-shrink: 0;
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
    color: var(--accent);
}

.faq-item .faq-answer {
    padding: 0 26px 24px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.faq-item p {
    margin: 0;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 660px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-hero {
        padding-top: 170px;
    }

    .article-hero {
        padding-top: 170px;
    }

    .article-hero .article-deck {
        font-size: 16px;
    }

    .article-body > p,
    .article-body li {
        font-size: 16px;
    }

    .article body {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-card {
        transition: none;
    }

    .blog-card:hover {
        transform: none;
    }

    .faq-item summary,
    .faq-item summary::after {
        transition: none;
    }

    .faq-item[open] summary::after {
        transform: none;
    }
}

/* Breadcrumbs + related materials (redesign 2026-11) */
.breadcrumbs{
    display:flex;flex-wrap:wrap;align-items:center;gap:8px;
    margin:0 0 18px;font-size:12px;color:var(--muted);
}
.breadcrumbs a{color:var(--accent);text-decoration:none}
.breadcrumbs a:hover{text-decoration:underline}
.article-related{padding:64px 0;border-top:1px solid var(--line)}
.article-related h2{margin:6px 0 24px;font-size:clamp(22px,2.4vw,30px);color:var(--text)}
.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.related-card{
    display:flex;flex-direction:column;gap:6px;padding:22px;
    border:1px solid var(--line);border-radius:12px;background:#fff;
    text-decoration:none;color:var(--text);transition:border-color .2s ease,transform .2s ease,box-shadow .2s ease;
}
.related-card:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:var(--shadow)}
.related-card strong{font-size:15px;color:var(--text)}
.related-card span{font-size:13px;color:var(--muted)}
@media(max-width:760px){.related-grid{grid-template-columns:1fr}.article-related{padding:48px 0}}
