/* Блок на главной */
.articles-home {
    padding: 72px 0 88px;
    background: linear-gradient(180deg, #f8fcfb 0%, #fff 100%);
}

.articles-home__container {
    max-width: var(--header-container, 1320px);
    margin: 0 auto;
    padding: 0 24px;
}

.articles-home__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
}

.articles-home__title {
    margin: 0 0 10px;
    font-size: clamp(26px, 3.5vw, 36px);
    font-weight: 700;
    color: var(--site-body-text, #333);
}

.articles-home__subtitle {
    margin: 0;
    max-width: 560px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--header-text-muted, #8f8f8f);
}

.articles-home__all-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 22px;
    border-radius: 12px;
    border: 1px solid rgba(74, 140, 136, 0.35);
    color: var(--header-accent, #4a8c88);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.articles-home__all-btn:hover {
    background: var(--header-accent, #4a8c88);
    color: #fff;
}

.articles-home__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.articles-home__item {
    min-width: 0;
}

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

@media (max-width: 560px) {
    .articles-home__grid {
        grid-template-columns: 1fr;
    }
}

/* Карточка */
.article-card {
    height: 100%;
}

.article-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(74, 140, 136, 0.15);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s, box-shadow 0.25s;
}

.article-card__link:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(74, 140, 136, 0.12);
}

.article-card__media {
    display: block;
    aspect-ratio: 5 / 3;
    overflow: hidden;
    background: #e8f4f3;
}

.article-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card__media-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d4ebe9, #f0f8f7);
}

.article-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px 22px;
    flex: 1;
}

.article-card__category {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--header-accent, #4a8c88);
}

.article-card__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--site-body-text, #333);
}

.article-card__excerpt {
    font-size: 14px;
    line-height: 1.55;
    color: var(--header-text-muted, #8f8f8f);
    flex: 1;
}

.article-card__meta {
    margin-top: auto;
    font-size: 13px;
    color: #a3a3a3;
}

/* Список */
.articles-page {
    padding: 48px 0 96px;
}

.articles-page__container {
    max-width: var(--header-container, 1320px);
    margin: 0 auto;
    padding: 0 24px;
}

.articles-breadcrumbs {
    font-size: 14px;
    margin-bottom: 16px;
    color: var(--header-text-muted, #8f8f8f);
}

.articles-breadcrumbs a {
    color: var(--header-accent, #4a8c88);
    text-decoration: none;
}

.articles-page__title {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
}

.articles-page__lead {
    margin: 0 0 28px;
    max-width: 720px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--header-text-muted, #8f8f8f);
}

.articles-page__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.articles-filter {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(74, 140, 136, 0.25);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--site-body-text, #333);
}

.articles-filter.is-active,
.articles-filter:hover {
    background: var(--header-accent, #4a8c88);
    border-color: var(--header-accent, #4a8c88);
    color: #fff;
}

.articles-page__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.articles-page__grid > li {
    min-width: 0;
}

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

@media (max-width: 560px) {
    .articles-page__grid {
        grid-template-columns: 1fr;
    }
}

.articles-page__empty {
    color: var(--header-text-muted, #8f8f8f);
}

/* Страница статьи */
.article-detail {
    padding: 40px 0 88px;
}

.article-detail__container {
    width: 100%;
    max-width: var(--header-container, 1320px);
    margin: 0 auto;
    padding: 0 24px;
}

.article-detail__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 32px 40px;
    align-items: start;
    width: 100%;
    margin-bottom: 40px;
}

.article-detail__header--no-cover {
    grid-template-columns: 1fr;
}

.article-detail__header-text {
    min-width: 0;
}

.article-detail__category {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--header-accent, #4a8c88);
    text-decoration: none;
}

.article-detail__title {
    margin: 0 0 12px;
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--site-body-text, #333);
}

.article-detail__meta {
    margin: 0;
    font-size: 15px;
    color: var(--header-text-muted, #8f8f8f);
}

.article-detail__cover {
    margin: 0;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #e8f4f3;
}

.article-detail__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 900px) {
    .article-detail__header {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .article-detail__cover {
        max-height: 360px;
    }
}

.article-detail__body {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.article-detail__content {
    font-size: 17px;
    line-height: 1.75;
    color: var(--site-body-text, #333);
    text-align: left;
}

/* Дублирующий h1 из HTML статьи ИИ — заголовок уже в шапке */
.article-detail__content > h1:first-child {
    display: none;
}

.article-detail__content h2 {
    margin: 2em 0 0.75em;
    font-size: 1.45em;
    font-weight: 700;
}

.article-detail__content h3 {
    margin: 1.5em 0 0.6em;
    font-size: 1.2em;
}

.article-detail__content p {
    margin: 0 0 1.1em;
}

.article-detail__content ul,
.article-detail__content ol {
    margin: 0 0 1.2em;
    padding-left: 1.4em;
}

.article-detail__content a {
    color: var(--header-accent, #4a8c88);
}

.article-detail__content strong {
    font-weight: 600;
}

.article-detail__cta {
    margin-top: 48px;
    padding: 28px 32px;
    border-radius: 20px;
    background: linear-gradient(135deg, #e8f4f3, #f8fcfb);
    border: 1px solid rgba(74, 140, 136, 0.2);
}

.article-detail__cta-title {
    margin: 0 0 8px;
    font-size: 22px;
}

.article-detail__cta-text {
    margin: 0 0 16px;
    color: var(--header-text-muted, #8f8f8f);
}

.article-detail__cta-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: var(--header-accent, #4a8c88);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.article-detail__cta-btn:hover {
    background: var(--header-accent-dark, #3d7572);
}

.article-detail__cta-phone {
    display: inline-block;
    margin-top: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--header-accent, #4a8c88);
    text-decoration: none;
}

.article-detail__cta-phone:hover {
    text-decoration: underline;
}

.article-detail__content a[href="#zapis"] {
    cursor: pointer;
}

.article-detail__cta-address {
    margin: 14px 0 0;
    font-size: 14px;
    color: var(--header-text-muted, #8f8f8f);
}

.article-detail__related {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid #eee;
}

.article-detail__related-title {
    margin: 0 0 16px;
    font-size: 22px;
}

.article-detail__related-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.article-detail__related-link {
    color: var(--header-accent, #4a8c88);
    font-weight: 500;
    text-decoration: none;
}

.article-detail__related-link:hover {
    text-decoration: underline;
}
