/* ===== Home page blog sections: "Новости и акции" + "Статьи и полезные материалы" ===== */
/* Built to match Figma frame "Новости и статьи на главной" (1939:548).            */
/* Reuses the Hormone Life design system (see public/blog-assets/articles.css).      */

.home-blog {
    /* Brand tokens */
    --acc-red: #AD272B;
    --navy: #1C2258;
    --time: #999999;          /* timestamps (Figma) */
    --card-bg: #F3F3F8;       /* lavender card body / thumbnails */
    --btn-border: #494F85;    /* outline pill border */

    font-family: 'Montserrat', Arial, sans-serif;
    color: var(--navy);
    background: #fff;
    padding: 60px 0;
}
.home-blog *,
.home-blog *::before,
.home-blog *::after { box-sizing: border-box; }

.home-blog__inner {
    max-width: 1200px;        /* unified container width (matches /news, /articles) */
    margin: 0 auto;
    padding: 0 20px;
}

/* Section spacing */
.hb-section + .hb-section { margin-top: 96px; }

.hb-section__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 600;
    font-size: 32px;
    line-height: 1.17;
    color: var(--acc-red);
    margin: 0 0 24px;
}

/* ===================== News & promos: 3-up card row ===================== */
.hb-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.hb-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.hb-card__media {
    aspect-ratio: 349 / 213;
    border-radius: 20px 20px 0 0;
    background-color: var(--card-bg);
    background-image: var(--ph-photo, none), url('/blog-assets/clinic-logo.svg');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}
.hb-card__body {
    flex: 1;
    background: var(--card-bg);
    border-radius: 0 0 20px 20px;
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
}
.hb-card__cat {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.2;
    color: var(--acc-red);
    margin: 0 0 13px;
}
.hb-card__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.17;
    color: var(--navy);
    margin: 0 0 16px;
}
.hb-card__time {
    margin-top: auto;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.2;
    color: var(--time);
}

/* ===================== Articles + "Интересное" sidebar ===================== */
.hb-articles {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 27px;
    align-items: start;
}
.hb-articles__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 17px;
}

/* Article card (full lavender card, image on top) */
.hb-acard {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}
.hb-acard__media {
    aspect-ratio: 349 / 191;
    background-color: var(--card-bg);
    background-image: var(--ph-photo, none), url('/blog-assets/clinic-logo.svg');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}
.hb-acard.is-hidden { display: none; }
/* Fade-in for cards revealed by "Загрузить ещё" (matches /articles posts-fade-in). */
.hb-acard--in { animation: hb-fade-in .45s ease both; }
@keyframes hb-fade-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hb-acard__body {
    flex: 1;
    padding: 16px 22px 22px;
    display: flex;
    flex-direction: column;
}
.hb-acard__time {
    font-weight: 500;
    font-size: 12px;
    line-height: 1.2;
    color: var(--time);
    margin: 0 0 14px;
}
.hb-acard__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.17;
    color: var(--navy);
    margin: 0 0 16px;
}
.hb-acard__more {
    margin-top: auto;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.2;
    color: var(--acc-red);
}

/* "Интересное" aside list */
.hb-aside__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 600;
    font-size: 26px;
    line-height: 1.17;
    color: var(--navy);
    margin: 0 0 28px;
}
.hb-aside__list { display: flex; flex-direction: column; gap: 40px; }
.hb-aside__item {
    display: flex;
    gap: 20px;
    text-decoration: none;
    color: inherit;
}
.hb-aside__thumb {
    flex: none;
    width: 97px;
    height: 97px;
    border-radius: 10px;
    background-color: var(--card-bg);
    background-image: var(--ph-photo, none), url('/blog-assets/clinic-logo.svg');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}
.hb-aside__text { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.hb-aside__cat {
    font-weight: 500;
    font-size: 12px;
    line-height: 1.2;
    color: var(--acc-red);
    margin: 0 0 7px;
}
.hb-aside__name {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.17;
    color: var(--navy);
    margin: 0 0 7px;
}
.hb-aside__time {
    font-weight: 500;
    font-size: 12px;
    line-height: 1.2;
    color: var(--time);
}

/* ===================== Outline pill button ("Смотреть все" / "Загрузить ещё") ===== */
.hb-btn-wrap { display: flex; justify-content: center; margin-top: 38px; }
.hb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 40px;
    border: 1px solid var(--btn-border);
    border-radius: 30px;
    background: #fff;
    /* !important overrides the global Tilda `#allrecords a` link color (id selector) */
    color: var(--navy) !important;
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.17;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.hb-btn:hover,
.hb-btn:focus-visible {
    background: var(--navy);
    color: #fff !important;
    border-color: var(--navy);
}

/* ===================== Gradient placeholders (preview only) ===================== */
.hb-ph--blue   { background-image: linear-gradient(135deg, #3a7bd5, #6a3df0 55%, #b13bd6); }
.hb-ph--red    { background-image: linear-gradient(135deg, #ff6a52, #d6263a 60%, #ad272b); }
.hb-ph--violet { background-image: linear-gradient(135deg, #8f7bff, #5a63e8 60%, #c0496f); }
.hb-ph--steel  { background-image: linear-gradient(135deg, #cfd6e6, #9aa6c4); }
.hb-ph--sand   { background-image: linear-gradient(135deg, #e7d8c6, #c9a98c); }
.hb-ph--teal   { background-image: linear-gradient(135deg, #bfe3df, #6fb6c9); }
.hb-ph--rose   { background-image: linear-gradient(135deg, #f1c7cf, #cf7d92); }

/* ===================== Responsive ===================== */
@media (max-width: 1024px) {
    .hb-articles { grid-template-columns: 1fr; }
    .hb-aside__list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 27px;
    }
}
@media (max-width: 760px) {
    .home-blog { padding: 40px 0; }
    .hb-section + .hb-section { margin-top: 64px; }
    .hb-section__title { font-size: 26px; }
    .hb-news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .hb-news-grid { grid-template-columns: 1fr; }
    .hb-articles__grid { grid-template-columns: 1fr; }
    .hb-aside__list { grid-template-columns: 1fr; }
    .hb-section__title { font-size: 24px; }
}
