/* ============================================================
   KIT EFFECT — Блог и статья
   Дизайн-токены из Figma: #374c61 (текст), #a38970 (акцент),
   #f9f9f9 (карточка), #6f8092 (тег), Oswald / Montserrat
   ============================================================ */

/* ---------- Сетка блога ---------- */
.blog_page { padding-bottom: 80px; }

.blog_toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.blog_filter { position: relative; min-width: 328px; }
.blog_filter select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 60px;
    padding: 0 56px 0 20px;
    border: 1px solid #dddddd;
    border-radius: 16px;
    background: #fff;
    font-family: 'Montserrat-Regular', sans-serif;
    font-size: 16px;
    color: #374c61;
    cursor: pointer;
    box-sizing: border-box;
}
.blog_filter::after {
    content: '';
    position: absolute;
    right: 22px; top: 50%;
    width: 12px; height: 12px;
    margin-top: -8px;
    border-right: 2px solid #374c61;
    border-bottom: 2px solid #374c61;
    transform: rotate(45deg);
    pointer-events: none;
}
.blog_reset {
    font-family: 'Montserrat-Regular', sans-serif;
    font-size: 16px;
    color: #a38970;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .2s;
}
.blog_reset:hover { opacity: .7; }

.blog_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* ---------- Карточка статьи (общий компонент) ---------- */
.article_card {
    display: flex;
    flex-direction: column;
    background: #f9f9f9;
    border-radius: 30px;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow .25s, transform .25s;
}
.article_card:hover {
    box-shadow: 0 16px 40px rgba(55, 76, 97, .12);
    transform: translateY(-4px);
}
.article_card__media {
    position: relative;
    aspect-ratio: 444 / 284;
    overflow: hidden;
}
.article_card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.article_card__tag {
    position: absolute;
    top: 20px; right: 20px;
    background: #fff;
    color: #6f8092;
    font-family: 'Montserrat-Regular', sans-serif;
    font-size: 16px;
    line-height: 1;
    padding: 8px 10px;
    border-radius: 12px;
}
.article_card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 30px;
}
.article_card__title {
    font-family: 'Oswald-Regular', sans-serif;
    font-size: 20px;
    line-height: 1.3;
    color: #374c61;
    margin: 0 0 13px;
}
.article_card__excerpt {
    font-family: 'Montserrat-Regular', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #374c61;
    margin: 0 0 24px;
}
.article_card__more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat-SemiBold', sans-serif;
    font-size: 16px;
    color: #a38970;
}
.article_card__more svg { transition: transform .2s; }
.article_card:hover .article_card__more svg { transform: translateX(5px); }

/* ---------- Пагинация ---------- */
.blog_pagination {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 60px;
}
.blog_pagination a,
.blog_pagination span.pagination-active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px; height: 60px;
    padding: 0 18px;
    border: 1px solid #dddddd;
    border-radius: 16px;
    font-family: 'Oswald-Regular', sans-serif;
    font-size: 22px;
    color: #374c61;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}
.blog_pagination a:hover { border-color: #374c61; }
.blog_pagination span.pagination-active {
    background: #374c61;
    color: #fff;
    border-color: #374c61;
}
.blog_pagination .pagination-next {
    gap: 12px;
    color: #374c61;
}
.blog_pagination .pagination-next svg { width: 40px; }

/* ============================================================
   Страница статьи
   ============================================================ */
.article_layout {
    display: grid;
    grid-template-columns: minmax(0, 908px) 444px;
    gap: 19px;
    align-items: start;
    padding-bottom: 80px;
}
.article_main { min-width: 0; }

.article_head__title {
    font-family: 'Oswald-Regular', sans-serif;
    font-size: 40px;
    line-height: 1.25;
    color: #374c61;
    margin: 0 0 20px;
}
/* Штатный h1 из обвязки (header_all_nobackground) на страницах блога/статьи — под Oswald.
   ВНИМАНИЕ: этот h1 лежит ВЫШЕ .content_page (в обвязке), поэтому селектор без .content_page. */
body .title_nobackground h1 {
    font-family: 'Oswald-Regular', sans-serif;
    font-weight: 400;
    font-size: 36px;
    line-height: 1.38;
    color: #374c61;
}
.article_head__lead {
    font-family: 'Montserrat-Regular', sans-serif;
    font-size: 24px;
    line-height: 1.35;
    color: #374c61;
    margin: 0 0 40px;
}

/* автор */
.article_author {
    display: flex;
    align-items: center;
    gap: 28px;
    background: #f9f9f9;
    border-radius: 30px;
    padding: 24px 30px;
    margin-bottom: 40px;
}
.article_author__avatar {
    width: 107px; height: 113px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.article_author__name {
    font-family: 'Oswald-Regular', sans-serif;
    font-size: 30px;
    color: #374c61;
    margin: 0 0 6px;
}
.article_author__post {
    font-family: 'Montserrat-Regular', sans-serif;
    font-size: 20px;
    color: #6f8092;
    margin: 0;
}

.article_tagrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.article_tag {
    display: inline-block;
    background: #f9f9f9;
    color: #6f8092;
    font-family: 'Montserrat-Regular', sans-serif;
    font-size: 16px;
    padding: 8px 20px;
    border-radius: 12px;
}
.article_hero {
    width: 100%;
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 40px;
}
.article_hero img { width: 100%; display: block; }

/* оглавление */
.article_toc {
    background: #f9f9f9;
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 40px;
}
.article_toc ol {
    margin: 0; padding-left: 24px;
    font-family: 'Montserrat-Regular', sans-serif;
    font-size: 24px;
    line-height: 1.5;
    color: #374c61;
}
.article_toc a { color: #374c61; text-decoration: none; }
.article_toc a:hover { color: #a38970; }

/* тело статьи (по макету: Montserrat 24px, leading-8 = 32px, тёмный текст,
   подзаголовки — Montserrat Bold, НЕ Oswald) */
.article_body {
    font-family: 'Montserrat-Regular', sans-serif;
    font-size: 24px;
    line-height: 1.33;
    color: #1c1917;
}
.article_body h2 {
    font-family: 'Montserrat-Bold', sans-serif;
    font-size: 24px;
    line-height: 1.33;
    color: #1c1917;
    margin: 32px 0 0;
}
.article_body h3 {
    font-family: 'Montserrat-Medium', sans-serif;
    font-size: 24px;
    line-height: 1.33;
    color: #1c1917;
    margin: 24px 0 0;
}
.article_body p { font-size: 24px; line-height: 1.33; color: #1c1917; margin: 0 0 16px; }
/* списки тела статьи — с маркерами (перебиваем normalize.css li{list-style:none}) */
.article_body ul, .article_body ol { margin: 0 0 16px; padding-left: 24px; }
.article_body li { font-size: 24px; line-height: 1.33; color: #1c1917; margin-bottom: 8px; }
.article_body ul { list-style: disc; }
.article_body ol { list-style: decimal; }
.article_body ul li { list-style: disc; }
.article_body ol li { list-style: decimal; }
.article_body li { display: list-item; }
.article_body li::marker { color: #1c1917; }
.article_body img { max-width: 100%; border-radius: 20px; margin: 24px 0; }

/* поделиться */
.article_share {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Montserrat-Regular', sans-serif;
    font-size: 16px;
    color: #374c61;
    background: none; border: none;
    cursor: pointer;
    white-space: nowrap;
}
.article_share svg { width: 24px; height: 24px; }

/* «в начало» */
.article_top {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat-Regular', sans-serif;
    font-size: 16px;
    color: #374c61;
    text-decoration: none;
    margin-top: 20px;
}

/* ---------- Сайдбар «Другие статьи» ---------- */
.article_sidebar__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
}
.article_sidebar__title {
    font-family: 'Oswald-Regular', sans-serif;
    font-size: 36px;
    text-transform: uppercase;
    color: #374c61;
    margin: 0;
}
.article_sidebar__all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat-Regular', sans-serif;
    font-size: 16px;
    color: #a38970;
    text-decoration: none;
    white-space: nowrap;
}
.article_sidebar__list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.article_sidebar .article_card__title { font-size: 18px; }

/* ============================================================
   FAQ (по макету: синие плашки slate-500, белый Bold текст)
   ============================================================ */
.article_faq { padding: 80px 0; }
.article_faq__title {
    font-family: 'Oswald-Regular', sans-serif;
    font-size: 72px;
    line-height: 1.1;
    color: #374c61;
    margin: 0 0 40px;
}
.faq_item {
    border-radius: 20px;
    background: #374c61;
    margin-bottom: 11px;
    overflow: hidden;
}
.faq_item__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 28px;
    cursor: pointer;
    font-family: 'Montserrat-Bold', sans-serif;
    font-size: 20px;
    line-height: 1.4;
    color: #fff;
    list-style: none;
}
.faq_item__q::-webkit-details-marker { display: none; }
.faq_item__icon {
    flex-shrink: 0;
    width: 24px; height: 24px;
    position: relative;
}
.faq_item__icon::before,
.faq_item__icon::after {
    content: '';
    position: absolute;
    background: #fff;
    transition: transform .2s, opacity .2s;
}
.faq_item__icon::before { left: 0; top: 11px; width: 24px; height: 2px; }
.faq_item__icon::after  { left: 11px; top: 0; width: 2px; height: 24px; }
.faq_item[open] .faq_item__icon::after { opacity: 0; transform: rotate(90deg); }
/* раскрытый пункт — белый фон с обводкой, тёмный текст */
.faq_item[open] {
    background: #fff;
    outline: 1px solid #374c61;
    outline-offset: -1px;
}
.faq_item[open] .faq_item__q { color: #374c61; padding-bottom: 8px; }
.faq_item[open] .faq_item__icon::before,
.faq_item[open] .faq_item__icon::after { background: #374c61; }
.faq_item__a {
    padding: 0 28px 24px;
    font-family: 'Montserrat-Regular', sans-serif;
    font-size: 20px;
    line-height: 1.6;
    color: #000;
}
.faq_item__a a { color: #6f8092; font-family: 'Montserrat-Bold', sans-serif; text-decoration: underline; }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 1200px) {
    .article_layout { grid-template-columns: 1fr; }
    .article_sidebar { margin-top: 40px; }
    .article_sidebar__list { display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
    .blog_grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .blog_grid { grid-template-columns: 1fr; gap: 24px; }
    .article_sidebar__list { grid-template-columns: 1fr; }
    .article_head__title, .article_faq__title { font-size: 28px; }
    .blog_toolbar { flex-direction: column; align-items: stretch; }
    .blog_filter { min-width: 0; }
}

/* ============================================================
   Мобильная статья по макету (≤480, выверено под iPhone SE 375)
   ============================================================ */
@media (max-width: 480px) {
    /* контент к краям с отступом 10px */
    .content_page .container { padding-left: 10px; padding-right: 10px; }
    .article_layout { gap: 0; padding-bottom: 40px; }

    /* заголовок + лид */
    .article_head__title,
    body .title_nobackground h1 {
        font-size: 22px;
        line-height: 1.3;
    }
    body .title_nobackground h1 { margin-bottom: 18px; }
    .article_head__lead {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 28px;
    }

    /* автор — остаётся в строку, компактный */
    .article_author {
        flex-direction: row;
        text-align: left;
        align-items: center;
        gap: 16px;
        padding: 20px 18px;
        border-radius: 20px;
        margin-bottom: 28px;
    }
    .article_author__avatar { width: 56px; height: 64px; }
    .article_author__name { font-size: 20px; margin-bottom: 2px; }
    .article_author__post { font-size: 14px; }

    /* тег «Статьи» + «Поделиться» в один ряд */
    .article_tagrow {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
    }
    .article_tagrow .article_tag { margin-bottom: 0; }
    .article_tag { font-size: 14px; padding: 8px 18px; }
    .article_share { margin-bottom: 0; font-size: 14px; font-family: 'Montserrat-SemiBold', sans-serif; }
    .article_share svg { width: 20px; height: 20px; }

    /* hero чуть меньше радиус/отступ */
    .article_hero { border-radius: 20px; margin-bottom: 32px; }

    /* оглавление и тело — 14px (по макету: Montserrat, leading 20px) */
    .article_toc { padding: 22px 20px; border-radius: 16px; margin-bottom: 32px; }
    .article_toc ol { font-size: 14px; line-height: 1.9; }
    /* тело на мобиле — тёмный текст как в макете (text-stone-900) */
    .article_body { font-size: 14px; line-height: 1.43; color: #1c1917; }
    /* подзаголовки в теле на мобиле — Montserrat Bold 14px, НЕ Oswald (как в макете) */
    .article_body h2 {
        font-family: 'Montserrat-Bold', sans-serif;
        font-size: 14px;
        line-height: 1.43;
        color: #1c1917;
        margin: 20px 0 8px;
    }
    .article_body h3 {
        font-family: 'Montserrat-Medium', sans-serif;
        font-size: 14px;
        line-height: 1.43;
        color: #1c1917;
        margin: 16px 0 6px;
    }
    .article_body p, .article_body li { color: #1c1917; }
    .article_body li::marker { color: #1c1917; }
    .article_body p {
        font-size: 14px;
        line-height: 1.43;
        margin-bottom: 14px;
    }
    .article_body ul, .article_body ol { margin-bottom: 14px; padding-left: 20px; }
    .article_body li {
        font-size: 14px;
        line-height: 1.43;
        margin-bottom: 6px;
    }

    /* «в начало» */
    .article_top { font-size: 16px; color: #6f8092; font-family: 'Montserrat-SemiBold', sans-serif; margin-top: 24px; }

    /* ---- FAQ: на мобиле тёмно-синие плашки ---- */
    .article_faq { padding: 48px 0; }
    .article_faq__title { font-size: 30px; margin-bottom: 24px; }
    .faq_item {
        background: #374c61;
        border-radius: 16px;
        margin-bottom: 10px;
    }
    .faq_item__q {
        padding: 18px 28px;
        font-family: 'Montserrat-Bold', sans-serif;
        font-size: 14px;
        line-height: 1.4;
        color: #fff;
    }
    .faq_item__icon::before,
    .faq_item__icon::after { background: #fff; }
    /* раскрытый пункт: белое тело-ответ снизу */
    .faq_item[open] { background: #fff; outline: 1px solid #374c61; }
    .faq_item[open] .faq_item__q { color: #374c61; padding-bottom: 8px; }
    .faq_item[open] .faq_item__icon::before,
    .faq_item[open] .faq_item__icon::after { background: #374c61; }
    .faq_item__a { padding: 0 28px 20px; font-size: 14px; color: #000; }

    /* ---- «Другие статьи» ---- */
    .article_sidebar__head { margin-bottom: 20px; }
    .article_sidebar__title { font-size: 30px; text-transform: uppercase; }
    .article_sidebar__all { font-size: 16px; color: #6f8092; font-family: 'Montserrat-SemiBold', sans-serif; }
    .article_sidebar__list { gap: 0; }
    /* на мобиле показываем одну карточку (как «слайдер» в макете) */
    .article_sidebar__list .article_card { display: none; }
    .article_sidebar__list .article_card:first-child { display: flex; }
    .article_sidebar .article_card { border-radius: 30px; }
    .article_sidebar .article_card__title { font-size: 16px; }
    .article_sidebar .article_card__excerpt { font-size: 12px; }
    .article_sidebar .article_card__more { font-size: 16px; }

    /* ---- Footer по центру ---- */
    .footer_blocks { text-align: center; }
}

/* очень узкие (≤360 / iPhone SE 320 в режиме совместимости) */
@media (max-width: 360px) {
    .article_author { flex-direction: column; text-align: center; gap: 14px; padding: 18px; }
    .article_tagrow { flex-wrap: wrap; gap: 12px; }
}
