/* ===== Articles / News page ("Новости клиники") ===== */
/* Front-end layout only. Brand tokens aligned with services/analiz pages. */

.articles-page {
    /* Brand tokens */
    --acc-red: #AD272B;
    --acc-red-2: #AD284F;
    --navy: #1C2258;
    --meta: #9093AE;        /* placeholders */
    --time: #999999;        /* timestamps (Figma) */
    --violet: #858CCF;
    --card-bg: #F3F3F8;
    --field-bg: #F3F3F8;
    --border: #E7E7F1;

    font-family: 'Montserrat', Arial, sans-serif;
    color: var(--navy);
    max-width: 1200px;      /* unified container width for all news/articles pages */
    margin: 0 auto;
    padding: 48px 20px 0;
    box-sizing: border-box;
}
/* Detail pages share the same 1200px container */
.articles-page--article { max-width: 1200px; }

.articles-page *,
.articles-page *::before,
.articles-page *::after {
    box-sizing: border-box;
}

/* Section titles */
.articles-title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.175;
    margin: 0;
    color: var(--navy);
}

.articles-title--accent {
    font-size: 40px;
    color: var(--acc-red);
}

.articles-section {
    margin-top: 104px;
}

.articles-section__head {
    margin: 0 0 24px;
}

/* ===== Category label ===== */
.articles-cat {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--acc-red);
    margin: 0 0 10px;
}
/* Featured card category (Figma: 15px / 600) */
.articles-feature__body .articles-cat { font-size: 15px; font-weight: 600; }

.articles-cat[data-cat="promo"],
.articles-cat[data-cat="resume"] {
    color: var(--violet);
}

/* ===== Card meta (time) ===== */
.articles-meta {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--time);
    margin: 0;
}

/* ===== Image placeholders (self-contained, no external assets) ===== */
.articles-ph {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #8E9BF0, #C3A0E6 55%, #F0A6B8);
}
.articles-ph::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 80% at 20% 15%, rgba(255, 255, 255, .35), transparent 60%),
        radial-gradient(70% 90% at 90% 90%, rgba(0, 0, 0, .18), transparent 55%);
}
.articles-ph--blue   { background: linear-gradient(135deg, #2F49C7, #4C8DE0 50%, #8C5CCB); }
.articles-ph--red    { background: linear-gradient(135deg, #C0203A, #E0533F 60%, #F08A4B); }
.articles-ph--violet { background: linear-gradient(135deg, #5B5FE0, #8A6CE0 50%, #B17AD6); }
.articles-ph--orange { background: linear-gradient(135deg, #F26B3A, #F4A93C 55%, #FBD66A); }
.articles-ph--steel  { background: linear-gradient(135deg, #8C93A8, #B7807E 60%, #D49B86); }
.articles-ph--crimson{ background: linear-gradient(135deg, #B81E2E, #D33A3A 55%, #E86A52); }
.articles-ph--photo  { background: linear-gradient(135deg, #56607A, #8B6E8E 55%, #C09AA6); }

/* Real uploaded photo layered over the clinic logo. The logo (bottom layer)
   shows whenever the photo is empty OR fails to load (missing file). */
.articles-ph--logo {
    background-color: #F3F3F8;
    background-image: var(--ph-photo, none), url('/blog-assets/clinic-logo.svg');
    background-size: cover, cover;
    background-position: center center, center center;
    background-repeat: no-repeat, no-repeat;
}
.articles-ph--logo::after { content: none; }

/* ===================================================================== */
/* 1. HERO                                                               */
/* ===================================================================== */
.articles-hero__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 21px;
}

.articles-hero__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 388px;
}

.articles-search {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--field-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: box-shadow .2s ease;
}
.articles-search:focus-within {
    box-shadow: 0 0 0 2px rgba(173, 39, 43, .35);
}
.articles-search__input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 17px 19px 18px;
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--navy);
}
.articles-search__input::placeholder { color: var(--meta); }
.articles-search__btn {
    border: none;
    background: none;
    padding: 0 21px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--navy);
}

.articles-filter-wrap {
    flex: none;
    position: relative;
}
.articles-filter {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 11.25px;
    background: var(--field-bg);
    color: var(--acc-red);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease;
}
.articles-filter:hover { background: #E4E4ee; }
.articles-filter.is-active { background: var(--acc-red); color: #fff; }

/* Filter dropdown */
.articles-filter__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 40px -12px rgba(28, 34, 88, .25);
    padding: 8px;
    z-index: 30;
    display: none;
}
.articles-filter__menu.is-open { display: block; }
.articles-filter__opt {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 14px;
    color: var(--navy);
    padding: 11px 14px;
    border-radius: 10px;
    cursor: pointer;
}
.articles-filter__opt:hover { background: var(--field-bg); }
.articles-filter__opt.is-active { background: var(--acc-red); color: #fff; }

/* Rich news filter panel (categories + date + branch + reset) */
.nf-panel { min-width: 300px; padding: 20px; max-height: 80vh; overflow-y: auto; }
.nf-group { padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.nf-group:last-of-type { border-bottom: none; }
.nf-group__title {
    display: flex; align-items: center; gap: 8px;
    font-family: 'Montserrat', Arial, sans-serif; font-size: 14px; font-weight: 600;
    color: var(--navy); margin: 0 0 14px;
}
.nf-group__title svg { color: var(--violet); flex: none; }
.nf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nf-chip {
    border: none; background: var(--field-bg); color: var(--navy);
    font-family: 'Montserrat', Arial, sans-serif; font-size: 13px; font-weight: 500;
    padding: 9px 14px; border-radius: 20px; cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.nf-chip:hover { background: #e6e6ef; }
.nf-chip.is-active { background: var(--acc-red); color: #fff; }
.nf-field {
    display: flex; align-items: center; gap: 8px;
    background: var(--field-bg); border-radius: 12px; padding: 12px 16px;
}
.nf-field__label { font-size: 13px; color: var(--meta); flex: none; }
.nf-select {
    flex: 1; border: none; background: transparent; outline: none;
    font-family: 'Montserrat', Arial, sans-serif; font-size: 14px; color: var(--navy);
    appearance: none; -webkit-appearance: none; cursor: pointer;
    padding-right: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%231C2258' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right center;
}
.nf-radio {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13px; color: var(--navy); line-height: 1.35; margin-bottom: 12px; cursor: pointer;
    text-align: left;
}
.nf-radio:last-child { margin-bottom: 0; }
.nf-radio input { margin: 1px 0 0; accent-color: var(--acc-red); flex: none; }
.nf-reset {
    border: none; background: none; color: var(--acc-red);
    font-family: 'Montserrat', Arial, sans-serif; font-size: 14px; font-weight: 500;
    cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px;
}

/* "День" field + mini calendar */
.nf-day-wrap { margin-top: 10px; }
.nf-field.nf-day { width: 100%; border: none; cursor: pointer; text-align: left; }
.nf-field__value { flex: 1; font-family: 'Montserrat', Arial, sans-serif; font-size: 14px; color: var(--navy); }
.nf-day__arrow { flex: none; color: var(--navy); transition: transform .2s ease; }
.nf-field.nf-day.is-open .nf-day__arrow { transform: rotate(180deg); }
.nf-cal { display: none; margin-top: 8px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px; box-shadow: 0 14px 34px -16px rgba(28, 34, 88, .3); }
.nf-cal.is-open { display: block; }
.nf-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.nf-cal__title { font-family: 'Montserrat', Arial, sans-serif; font-size: 14px; font-weight: 600; color: var(--navy); }
.nf-cal__nav { border: none; background: var(--field-bg); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; color: var(--navy); font-size: 16px; line-height: 1; }
.nf-cal__nav:hover { background: #e6e6ef; }
.nf-cal__dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.nf-cal__dow span { text-align: center; font-size: 11px; color: var(--meta); padding: 4px 0; }
.nf-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.nf-cal__day {
    border: none; background: none; aspect-ratio: 1; border-radius: 8px; cursor: pointer;
    font-family: 'Montserrat', Arial, sans-serif; font-size: 13px; color: var(--navy); position: relative;
}
.nf-cal__day.is-empty { visibility: hidden; cursor: default; }
.nf-cal__day:hover:not(.is-empty) { background: var(--field-bg); }
.nf-cal__day.has-post { font-weight: 600; }
.nf-cal__day.has-post::after { content: ""; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--acc-red); }
.nf-cal__day.is-sel { background: var(--acc-red); color: #fff; }
.nf-cal__day.is-sel::after { background: #fff; }
.nf-cal__clear { margin-top: 8px; border: none; background: none; color: var(--acc-red); font-family: 'Montserrat', Arial, sans-serif; font-size: 13px; cursor: pointer; padding: 0; }

/* Hero grid */
.articles-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 388px;
    gap: 26px;
    align-items: start;
}

/* Featured */
.articles-feature {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.articles-feature__media {
    height: 361px;
    border-radius: 20px 20px 0 0;
}
.articles-feature__body {
    background: var(--card-bg);
    border-radius: 0 0 20px 20px;
    padding: 28px 21px 26px;
}
.articles-feature__body .articles-cat { margin-bottom: 18px; }
.articles-feature__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.175;
    margin: 0 0 17px;
}

/* Aside list ("Последние публикации") */
.articles-aside__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.175;
    margin: 0 0 26px;
    color: var(--navy);
}
.articles-aside__list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.articles-aside__item {
    display: grid;
    grid-template-columns: 97px 1fr;
    gap: 20px;
    align-items: start;
    text-decoration: none;
    color: inherit;
}
.articles-aside__thumb {
    height: 97px;
    border-radius: 10px;
}
.articles-aside__cat { margin-bottom: 7px; font-size: 12px; }
/* In "Последние публикации" every category label is red (matches the design) */
.articles-aside .articles-cat { color: var(--acc-red); }
.articles-aside__name {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.175;
    margin: 0 0 6px;
}
.articles-aside__item .articles-meta { font-size: 12px; }

/* ===================================================================== */
/* 2. RECENT ("Недавнее")                                                */
/* ===================================================================== */
.articles-recent__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 17px;
}
.articles-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.articles-card__media {
    height: 213px;
    border-radius: 20px 20px 0 0;
}
.articles-card__body {
    background: var(--card-bg);
    border-radius: 0 0 20px 20px;
    padding: 16px 18px 18px;
    flex: 1;
}
.articles-card__body .articles-cat { margin-bottom: 13px; }
.articles-card__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.175;
    margin: 0 0 21px;
}
.articles-card .articles-meta { font-size: 13px; }

/* ===================================================================== */
/* 3. ANONSES ("Анонсы и акции")                                         */
/* ===================================================================== */
.articles-anons__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 19px;
}
.articles-anons__card {
    display: grid;
    grid-template-columns: 98px 1fr;
    border-radius: 20px;
    overflow: hidden;
    background: var(--card-bg);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s ease, transform .2s ease;
}
.articles-anons__card:hover {
    box-shadow: 0 16px 34px -16px rgba(28, 34, 88, .28);
    transform: translateY(-2px);
}
.articles-anons__media { min-height: 193px; }
.articles-anons__body {
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.articles-anons__body .articles-cat { margin-bottom: 12px; }
.articles-anons__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.175;
    margin: 0 0 12px;
}
.articles-anons__card .articles-meta { font-size: 13px; }
.articles-anons .articles-cat { color: var(--violet); }

/* ===================================================================== */
/* 4. CTA ("Записаться на прием")                                        */
/* ===================================================================== */
.articles-cta {
    margin: 80px 0 90px;
    border-radius: 30px;
    background:
        radial-gradient(120% 140% at 85% 10%, #3a3f86 0%, transparent 45%),
        linear-gradient(120deg, #232a6b, #1c2258);
    color: #fff;
    padding: 56px 60px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
    align-items: center;
    overflow: hidden;
}
.articles-cta__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 38px;
    font-weight: 700;
    margin: 0 0 14px;
}
.articles-cta__subtitle {
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .78);
    margin: 0 0 30px;
    max-width: 420px;
}
.articles-cta__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}
.articles-cta__field {
    background: #fff;
    border: none;
    border-radius: 16px;
    padding: 19px 24px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 15px;
    color: var(--navy);
    width: 100%;
    outline: none;
}
.articles-cta__field::placeholder { color: var(--meta); }
select.articles-cta__field {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%231C2258' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 22px center;
    padding-right: 50px;
}
.articles-cta__submit {
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 20px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(93deg, #AD284F, #AD272B);
    transition: filter .2s ease;
}
.articles-cta__submit:hover { filter: brightness(1.08); }
.articles-cta__privacy {
    font-size: 13px;
    color: rgba(255, 255, 255, .65);
    margin: 16px 0 0;
}
.articles-cta__privacy a { color: rgba(255, 255, 255, .85); }
.articles-cta__media {
    align-self: stretch;
    border-radius: 22px;
    min-height: 280px;
}

/* Empty state for search/filter */
.articles-empty {
    display: none;
    text-align: center;
    color: var(--meta);
    font-size: 16px;
    padding: 40px 0;
}
.articles-empty.is-visible { display: block; }

/* ===================================================================== */
/* Responsive                                                            */
/* ===================================================================== */
@media (max-width: 1024px) {
    .articles-title { font-size: 32px; }
    .articles-hero__grid { grid-template-columns: 1fr; }
    .articles-feature__media { height: 320px; }
    .articles-recent__grid { grid-template-columns: repeat(2, 1fr); }
    .articles-cta { grid-template-columns: 1fr; }
    .articles-cta__media { display: none; }
}

@media (max-width: 760px) {
    .articles-page { padding-top: 32px; }
    .articles-hero__head { flex-direction: column; align-items: flex-start; gap: 18px; }
    .articles-hero__tools { max-width: none; }
    .articles-recent__grid { grid-template-columns: 1fr; }
    .articles-anons__grid { grid-template-columns: 1fr; }
    .articles-cta { padding: 36px 24px; }
    .articles-cta__row { grid-template-columns: 1fr; }
    .articles-section { margin-top: 48px; }
}

@media (max-width: 480px) {
    .articles-title { font-size: 27px; }
    .articles-anons__card { grid-template-columns: 1fr; }
    .articles-anons__media { min-height: 150px; }
    .articles-feature__media { height: 220px; }
}

/* ===================================================================== */
/* SHARED: breadcrumb                                                    */
/* ===================================================================== */
.art-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #C9CAD7;
    margin: 0 0 26px;
}
/* !important overrides the global Tilda `#allrecords a` link color */
.art-breadcrumb a { color: var(--acc-red) !important; text-decoration: none; font-weight: 600; }
.art-breadcrumb a:hover { text-decoration: underline; }
.art-breadcrumb span { color: #C9CAD7; }

/* ===================================================================== */
/* SHARED: rich article body                                             */
/* ===================================================================== */
.article-body {
    max-width: none;
    font-size: 16px;
    line-height: 1.75;
    color: #4a4f70;
}
/* readable text stays ~880; widgets span the full content width (100%) */
.article-body > *:not(.art-widget) { max-width: 880px; }
.article-body > .art-widget { max-width: none; }
.article-body__lead {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 700;
    font-size: 17px;
    color: var(--navy);
    margin: 0 0 16px;
}
.article-body p { margin: 0 0 14px; }
.article-body h2 {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 23px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
    margin: 34px 0 14px;
}
.article-body ul {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}
.article-body li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
}
.article-body li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--acc-red);
}
.article-body a { color: var(--acc-red); }
.article-body strong { color: var(--navy); }
.article-body__sign { margin-top: 26px; }
.article-body__sign b { color: var(--acc-red); font-weight: 700; }
.article-divider {
    height: 1px;
    background: var(--border);
    border: 0;
    margin: 44px 0;
}

/* ===================================================================== */
/* PAGE: article-view (news single) — header card                       */
/* ===================================================================== */
.art-news-header {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 34px 40px 40px;
    margin-bottom: 38px;
}
.art-news-header__time {
    font-size: 14px;
    color: var(--meta);
    margin: 0 0 16px;
}
.art-news-header__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.22;
    color: var(--navy);
    margin: 0;
    max-width: 880px;
}

/* ===================================================================== */
/* PAGE: post-view (article single) — header + cover + inline CTA        */
/* ===================================================================== */
.post-header { margin-bottom: 24px; }
.post-header__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.22;
    color: var(--navy);
    margin: 0 0 16px;
    max-width: 900px;
}
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 14px;
    color: var(--meta);
}
.post-meta span { position: relative; }
.post-meta span + span { padding-left: 16px; }
.post-meta span + span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 12px;
    background: #C7C9DA;
}
.post-cover {
    height: 440px;
    border-radius: 24px;
    margin-bottom: 30px;
}

/* Inline red CTA inside article */
.post-inline-cta {
    margin: 36px 0;
    border-radius: 22px;
    background:
        radial-gradient(120% 160% at 100% 0%, #d8483f 0%, transparent 50%),
        linear-gradient(100deg, #b01d2b, #c52f33);
    color: #fff;
    padding: 38px 44px;
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 24px;
    align-items: center;
    overflow: hidden;
}
.post-inline-cta__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 12px;
}
.post-inline-cta__text {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .85);
    margin: 0 0 22px;
    max-width: 520px;
}
.post-inline-cta__btn {
    display: inline-block;
    border: none;
    background: #fff;
    color: var(--navy);
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: 17px 34px;
    border-radius: 40px;
    cursor: pointer;
    text-decoration: none;
}
.post-inline-cta__media { align-self: stretch; min-height: 150px; border-radius: 18px; }

/* ===================================================================== */
/* Article body widgets (shortcodes: [cta_clinic] [memo] [materials] [appointment]) */
/* ===================================================================== */
.art-widget { margin: 34px 0; }
.art-widget__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.art-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 53px; padding: 0 30px;
    font-family: 'Montserrat', Arial, sans-serif; font-size: 16px; font-weight: 600;
    border-radius: 29px; text-decoration: none; cursor: pointer;  /* pill (Figma r29) */
    transition: filter .2s ease, background .2s ease;
}
/* !important beats the global Tilda `#allrecords a` link color */
.art-btn--red { background: linear-gradient(93deg, #AD284F, #AD272B); color: #fff !important; border: none; }
.art-btn--red:hover { filter: brightness(1.07); }
.art-btn--ghost { background: #fff; color: #495086 !important; border: 1.8px solid #495086; }
.art-btn--ghost:hover { background: #F3F3F8; }
.art-cta__btn { color: var(--navy) !important; }

/* CTA (red) — Figma r20, title 34/700 white, white pill button */
.art-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    border-radius: 20px; padding: 40px 48px; overflow: hidden; color: #fff;
    background:
        radial-gradient(80% 130% at 95% 5%, #ef5340 0%, transparent 50%),
        linear-gradient(115deg, #b81322, #d33330);
}
.art-cta__inner { max-width: 560px; }
.art-cta__title { font-family: 'Raleway', Arial, sans-serif; font-size: 34px; font-weight: 700; line-height: 1.15; margin: 0 0 12px; }
.art-cta__text { font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .85); margin: 0 0 24px; max-width: 460px; }
.art-cta__btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 62px; padding: 0 34px; background: #fff; color: var(--navy);
    font-family: 'Raleway', Arial, sans-serif; font-size: 16px; font-weight: 700;
    border-radius: 31px; text-decoration: none; transition: transform .2s ease;
}
.art-cta__btn:hover { transform: translateY(-2px); }
.art-cta__media { flex: none; width: 150px; }
.art-cta__media svg, .art-cta__media img { width: 100%; height: auto; display: block; }

/* Memo "Памятка" (lavender, centered) */
.art-memo { background: #EEEFFC; border-radius: 27px; padding: 34px 40px 36px; text-align: center; }
.art-memo__badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; color: var(--violet);
    font-size: 13px; font-weight: 600; letter-spacing: .02em;
    padding: 7px 14px; border-radius: 8px; margin-bottom: 18px;
}
.art-memo__title { font-family: 'Raleway', Arial, sans-serif; font-size: 26px; font-weight: 600; line-height: 1.25; color: var(--navy); margin: 0 0 24px; }
.art-memo .art-widget__actions { justify-content: center; }

/* Materials (pink, horizontal) */
.art-materials {
    background: #FFE1E2; border-radius: 27px; padding: 28px 40px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.art-materials__title { font-family: 'Raleway', Arial, sans-serif; font-size: 26px; font-weight: 600; line-height: 1.25; color: var(--navy); margin: 0; max-width: 330px; }

/* Appointment (booking form) */
.art-appoint { background: var(--card-bg); border-radius: 20px; padding: 36px 40px; }
.art-appoint__title { font-family: 'Raleway', Arial, sans-serif; font-size: 26px; font-weight: 600; color: var(--navy); margin: 0 0 24px; }
.art-appoint__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.art-appoint__field {
    background: #fff; border: none; border-radius: 14px; padding: 18px 20px;
    font-family: 'Montserrat', Arial, sans-serif; font-size: 15px; color: var(--navy); width: 100%; outline: none;
}
.art-appoint__field::placeholder { color: var(--meta); }
select.art-appoint__field {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%231C2258' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 18px center; padding-right: 46px;
}
.art-appoint__submit {
    border: none; border-radius: 14px; padding: 18px 40px;
    background: linear-gradient(93deg, #AD284F, #AD272B); color: #fff;
    font-family: 'Montserrat', Arial, sans-serif; font-size: 15px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .03em; cursor: pointer;
}
.art-appoint__privacy { font-size: 12px; color: var(--meta); margin: 14px 0 0; }
.art-appoint__privacy a { color: var(--acc-red); }

@media (max-width: 760px) {
    .art-cta { flex-direction: column; text-align: center; padding: 32px 24px; }
    .art-cta__media { width: 120px; }
    .art-materials { flex-direction: column; text-align: center; }
    .art-materials__title { max-width: none; }
    .art-appoint__grid { grid-template-columns: 1fr; }
}

/* ===================================================================== */
/* PAGE: posts (Статьи listing) — red hero                              */
/* ===================================================================== */
.posts-hero {
    margin-top: 8px;
    border-radius: 20px;
    padding: 64px 40px 70px;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(80% 120% at 95% 5%, #ef5340 0%, transparent 45%),
        radial-gradient(70% 130% at 0% 100%, #8f0f1e 0%, transparent 55%),
        linear-gradient(115deg, #b81322, #d33330);
    /* no overflow:hidden — the filter dropdown must escape the hero (bg is clipped by border-radius) */
}
.posts-hero__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 48px;
    font-weight: 600;
    line-height: 1.175;
    margin: 0 0 18px;
}
.posts-hero__subtitle {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.22;
    color: rgba(255, 255, 255, .9);
    margin: 0 auto 34px;
    max-width: 420px;
}
.posts-hero__tools {
    display: flex;
    gap: 14px;
    justify-content: center;
    max-width: 640px;
    margin: 0 auto;
}
.posts-hero .articles-search {
    background: #fff;
    flex: 1;
    border-radius: 15px;
}
.posts-hero .articles-search__input { padding: 17px 19px 18px; font-size: 16px; }
.posts-hero .articles-filter {
    background: #fff;
    color: var(--acc-red);
    width: 56px;
    height: 56px;
    border-radius: 11.25px;
}
.posts-hero__clear {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--meta);
    padding: 0 6px;
    display: none;
    align-items: center;
}
.posts-hero__clear.is-visible { display: flex; }

/* Category chips */
.posts-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 30px 0 8px;
}
.posts-chip {
    border: none;
    background: var(--field-bg);
    color: var(--navy);
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 15px 21px;
    border-radius: 29px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.posts-chip:hover { background: #e6e6ef; }
.posts-chip.is-active { background: var(--acc-red); color: #fff; }

/* ===================================================================== */
/* PAGE: posts — "Последние публикации" masonry                         */
/* ===================================================================== */
.posts-section { margin-top: 56px; }
.posts-section__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 30px;
}
.posts-masonry {
    display: flex;
    align-items: flex-start;
    gap: 17px;
}
/* JS-masonry columns: new cards are appended to the end, existing ones never reflow */
.posts-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 17px;
}
.posts-masonry > .post-card,
.posts-masonry > .post-mini-cta { width: 100%; }
/* fade-in for cards added via "Показать еще" */
.masonry-in { animation: posts-fade-in .45s ease both; }
@keyframes posts-fade-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* image post card (one F3F3F8 box, r20: rounded image on top + body) */
.post-card {
    text-decoration: none;
    color: inherit;
}
.post-card__media { height: 191px; border-radius: 20px 20px 0 0; }
.post-card__body {
    background: var(--card-bg);
    border-radius: 0 0 20px 20px;
    padding: 16px 22px 26px;
}
.post-card__time {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--time);
    margin: 0 0 15px;
}
.post-card__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.175;
    color: var(--navy);
    margin: 0 0 17px;
}
.post-card__more {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--acc-red);
}

/* tall overlay card */
.post-card--overlay {
    position: relative;
    min-height: 408px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px 24px;
    color: #fff;
}
.post-card--overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 24, 60, .25) 0%, rgba(20, 24, 60, .15) 40%, rgba(20, 24, 60, .8) 100%);
    z-index: 1;
}
.post-card--overlay > * { position: relative; z-index: 2; }
.post-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.post-card__overtime { font-size: 12px; font-weight: 500; letter-spacing: -0.02em; }
.post-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #D4F2C1;
    color: #3F8F2E;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    padding: 8px 12px;
    border-radius: 5px;
}
.post-card__overtitle {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.175;
    margin: 0 0 12px;
}
/* overlay text is always white (over the darkened photo); !important beats the
   global Tilda heading color that otherwise overrides the inherited white */
.post-card--overlay .post-card__overtitle,
.post-card--overlay .post-card__overtime,
.post-card--overlay .post-card__more { color: #fff !important; }

/* mini consultation CTA inside masonry */
.post-mini-cta {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 28px 28px 30px;
}
.post-mini-cta__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}
.post-mini-cta__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
    line-height: 1.25;
}
.post-mini-cta__logo { font-weight: 800; color: var(--acc-red); font-size: 22px; flex: none; }
.post-mini-cta__field {
    width: 100%;
    border: none;
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 15px;
    color: var(--navy);
    margin-bottom: 14px;
    outline: none;
}
.post-mini-cta__btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 18px;
    background: linear-gradient(93deg, #AD284F, #AD272B);
    color: #fff;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .03em;
    cursor: pointer;
}
.post-mini-cta__privacy { font-size: 12px; color: var(--meta); margin: 14px 0 0; }
.post-mini-cta__privacy a { color: var(--acc-red); }
.post-mini-cta__ok { font-size: 15px; color: var(--navy); line-height: 1.5; margin: 6px 0; }

/* Lead form success state ("Успешно!") */
.lead-success { text-align: center; padding: 26px 16px 28px; }
.lead-success__logo {
    display: inline-block;
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 800; font-size: 26px; color: var(--acc-red);
    letter-spacing: -0.02em; margin-bottom: 20px;
}
.lead-success__title { font-family: 'Raleway', Arial, sans-serif; font-size: 24px; font-weight: 700; color: var(--navy); margin: 0 0 10px; }
.lead-success__text { font-size: 15px; line-height: 1.5; color: var(--meta); margin: 0; }

/* Smart search autocomplete dropdown */
.smart-search { position: relative; flex: 1; display: flex; min-width: 0; }
.smart-search .articles-search { flex: 1; }
.smart-search__dd {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    background: #fff; border-radius: 16px;
    box-shadow: 0 18px 44px -14px rgba(28, 34, 88, .3);
    padding: 8px; z-index: 40; display: none;
    text-align: left;
}
.smart-search__dd.is-open { display: block; }
.smart-search__item {
    display: flex; align-items: center; gap: 12px; width: 100%;
    border: none; background: none; text-align: left; cursor: pointer;
    padding: 12px 14px; border-radius: 12px;
    font-family: 'Montserrat', Arial, sans-serif; font-size: 15px; color: var(--meta); line-height: 1.3;
}
.smart-search__item:hover { background: var(--field-bg); }
.smart-search__item svg { flex: none; color: var(--meta); }
.smart-search__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================================================================== */
/* "Запись к специалисту" booking block                                  */
/* ===================================================================== */
.appoint-block { margin-top: 90px; }
.appoint-block__title { font-family: 'Raleway', Arial, sans-serif; font-size: 32px; font-weight: 700; color: var(--acc-red); margin: 0 0 32px; }
.appoint__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 56px; }
.appoint__col { display: flex; flex-direction: column; gap: 14px; }
.appoint__label { display: flex; align-items: center; gap: 10px; font-family: 'Montserrat', Arial, sans-serif; font-size: 15px; font-weight: 500; color: var(--navy); margin: 8px 0 2px; }
.appoint__label svg { color: var(--acc-red); flex: none; }
.appoint__field {
    background: var(--field-bg); border: none; border-radius: 14px; padding: 19px 22px;
    font-family: 'Montserrat', Arial, sans-serif; font-size: 15px; color: var(--navy); width: 100%; outline: none;
}
.appoint__field::placeholder { color: var(--meta); }
select.appoint__field {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%231C2258' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 22px center; padding-right: 50px;
}
.appoint__date-label { font-family: 'Montserrat', Arial, sans-serif; font-size: 14px; font-weight: 500; color: var(--acc-red); margin-bottom: 12px; }
.appoint__date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.appoint__day {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    border: 1px solid var(--border); border-radius: 12px; padding: 12px 4px; background: #fff; cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.appoint__day-dow { font-size: 12px; color: var(--meta); }
.appoint__day-num { font-size: 16px; font-weight: 600; color: var(--navy); }
.appoint__day:hover { border-color: var(--acc-red); }
.appoint__day.is-active { background: var(--acc-red); border-color: var(--acc-red); }
.appoint__day.is-active .appoint__day-dow,
.appoint__day.is-active .appoint__day-num { color: #fff; }
.appoint__slots { display: flex; flex-wrap: wrap; gap: 10px; }
.appoint__slot {
    border: none; background: var(--field-bg); color: var(--navy);
    font-family: 'Montserrat', Arial, sans-serif; font-size: 14px; font-weight: 500;
    padding: 12px 18px; border-radius: 10px; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.appoint__slot:hover { background: #e6e6ef; }
.appoint__slot.is-active { background: var(--acc-red); color: #fff; }
.appoint__consent { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--navy); margin: 28px 0 24px; cursor: pointer; }
.appoint__consent input { accent-color: var(--acc-red); width: 18px; height: 18px; flex: none; }
.appoint__consent a { color: var(--acc-red); }
.appoint__submit {
    display: block; margin: 0 auto; border: none; border-radius: 31px; padding: 0 60px; height: 60px;
    background: linear-gradient(93deg, #AD284F, #AD272B); color: #fff !important;
    font-family: 'Montserrat', Arial, sans-serif; font-size: 15px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
}
/* locked until a doctor is selected */
.appoint--locked .appoint__dates,
.appoint--locked .appoint__slots { opacity: .55; pointer-events: none; }
.appoint__hint { color: var(--meta); font-size: 14px; padding: 14px 0; }
.appoint__submit:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 760px) {
    .appoint__grid { grid-template-columns: 1fr; gap: 22px; }
    .appoint__date-grid { gap: 5px; }
    .appoint__day { padding: 10px 2px; }
    .appoint__submit { width: 100%; padding: 0; }
}

/* "Показать еще" — pill (Figma r29 / #F3F3F8) */
.posts-more-wrap { display: flex; justify-content: center; margin-top: 34px; }
.posts-more {
    border: none;
    background: var(--field-bg);
    color: var(--navy);
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 15px 21px;
    border-radius: 29px;
    cursor: pointer;
    transition: background .2s ease;
}
.posts-more:hover { background: #e6e6ef; }
.posts-more[hidden] { display: none; }
.posts-more.is-loading {
    color: transparent;
    pointer-events: none;
    position: relative;
}
.posts-more.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(28, 34, 88, .25);
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: posts-spin .6s linear infinite;
}
@keyframes posts-spin { to { transform: rotate(360deg); } }

/* search results: highlight + heading */
.posts-result-highlight { box-shadow: 0 0 0 3px #3b6fe0; border-radius: 20px; }
.posts-result-highlight .post-card__media { border-radius: 20px 20px 0 0; }

/* ===================================================================== */
/* SHARED: "Полезные материалы" (useful posts)                          */
/* ===================================================================== */
.posts-useful { margin-top: 64px; }
.posts-useful__grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 40px;
}
.posts-useful__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 26px;
}
.posts-useful__list {
    display: flex;
    flex-direction: column;
    gap: 26px;
}
.posts-useful__main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-left: 40px;
    border-left: 1px solid var(--border);
}
.useful-card {
    display: grid;
    grid-template-columns: 203px 1fr;
    background: #F0F0F8;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s ease;
}
.useful-card:hover { box-shadow: 0 14px 30px -16px rgba(28, 34, 88, .3); }
.useful-card__media { min-height: 168px; }
.useful-card__body {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}
.useful-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    background: #fff;
    color: var(--violet);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
    padding: 7px 14px;
    border-radius: 14px;
}
.useful-card__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--navy);
    margin: 0;
}
.useful-card__time { font-size: 13px; color: var(--meta); margin: 0; }

/* ===================================================================== */
/* Responsive for the new components                                     */
/* ===================================================================== */
@media (max-width: 1024px) {
    .posts-hero__title { font-size: 40px; }
    .posts-useful__grid { grid-template-columns: 1fr; gap: 30px; }
    .posts-useful__main { padding-left: 0; border-left: 0; }
    .post-cover { height: 340px; }
    .post-inline-cta { grid-template-columns: 1fr; }
    .post-inline-cta__media { display: none; }
}

@media (max-width: 760px) {
    .posts-hero { padding: 40px 22px 46px; }
    .posts-hero__title { font-size: 30px; }
    .posts-hero__tools { flex-direction: row; }
    .useful-card { grid-template-columns: 1fr; }
    .useful-card__media { min-height: 150px; }
    .art-news-header { padding: 26px 22px 28px; }
    .art-news-header__title,
    .post-header__title { font-size: 26px; }
    .post-cover { height: 220px; }
    .post-inline-cta { padding: 28px 24px; }
}

@media (max-width: 480px) {
    .posts-hero__title { font-size: 26px; }
    .posts-chip { padding: 12px 20px; font-size: 14px; }
}
