/* LMS-главная: / (GitHub Light) */

body.home-page {
    --hn-accent: #049622;
    --hn-accent-hover: #037a1b;
    --hn-bg: #f6f8fa;
    --hn-surface: #ffffff;
    --hn-border: #d0d7de;
    --hn-text: #1f2328;
    --hn-muted: #656d76;
    --hn-radius: 12px;
    --hn-hf-accent: #049622;
    --hn-hf-surface: #ffffff;
    --hn-hf-muted: #64748b;
    --hn-hf-radius: 16px;
    --hn-section-gap: clamp(2rem, 5vw, 2.75rem);
    --hn-content-max: 1080px;
    --hn-content-pad: 1rem;
    font-family: "DM Sans", system-ui, -apple-system, sans-serif;
    background-color: #ffffff;
    color: var(--hn-text);
}

/* gradient-qb canvas — как ЛК / question_bank.css */
body.home-page main {
    background-color: #f0f4f8;
    background-image:
        radial-gradient(ellipse 90% 60% at 100% -10%, rgba(4, 150, 34, 0.06), transparent 50%),
        radial-gradient(ellipse 70% 45% at -5% 40%, rgba(4, 150, 34, 0.05), transparent 45%),
        linear-gradient(180deg, #f8fafc 0%, #f0f4f8 40%, #eef2f7 100%);
}

body.home-page .wrapper {
    background-color: transparent;
    background-image: none;
}

body.home-page .site-navbar {
    background: var(--hn-surface);
    border-bottom: 1px solid var(--hn-border);
}

body.home-page .site-navbar > .container {
    max-width: var(--hn-content-max);
    padding-left: var(--hn-content-pad);
    padding-right: var(--hn-content-pad);
}

body.home-page .site-unblock-banner-wrap.container {
    max-width: var(--hn-content-max);
    padding-left: var(--hn-content-pad);
    padding-right: var(--hn-content-pad);
}

/* Layout — белый лист (layout-root-shadow, как ЛК) */
.hn-lms {
    max-width: var(--hn-content-max);
    margin: 1rem auto 0.5rem;
    padding: clamp(1.5rem, 4vw, 2.5rem) var(--hn-content-pad) 3rem;
    background: #ffffff;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

/* Pitch — minimal */
.hn-lms__pitch {
    margin-bottom: var(--hn-section-gap);
    max-width: 100%;
}

.hn-lms__pitch-title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.15rem, 2.2vw + 0.5rem, 1.6rem);
    font-weight: 700;
    font-style: normal;
    text-transform: none;
    line-height: 1.3;
    color: #1f2328;
    letter-spacing: -0.02em;
}

.hn-lms__pitch-accent {
    color: var(--hn-accent);
}

.hn-lms__pitch-divider {
    margin: 0 0 0.85rem;
    border: 0;
    border-top: 1px solid #e2e8f0;
    opacity: 1;
}

.hn-lms__pitch-body {
    margin: 0;
}

.hn-lms__pitch-body-line {
    margin: 0 0 0.25rem;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    font-weight: 400;
    font-style: normal;
    line-height: 1.5;
    color: var(--hn-muted);
    text-decoration: none;
}

.hn-lms__pitch-body-line:last-child {
    margin-bottom: 0;
}

/* Баннер занятий */
body.home-page .hn-ad-banner-wrap {
    margin-bottom: 1.25rem;
}

body.home-page .ad-banner {
    background: linear-gradient(135deg, rgba(4, 150, 34, 0.08) 0%, var(--hn-surface) 55%);
    border: 1px solid rgba(4, 150, 34, 0.2);
    border-radius: var(--hn-hf-radius);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 4px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.home-page .ad-banner:hover {
    border-color: var(--hn-accent);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05), 0 12px 40px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

body.home-page .ad-banner__link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

body.home-page .ad-banner .card-body {
    padding: 1rem 1.35rem;
}

body.home-page .ad-banner h4 {
    color: var(--hn-text);
    font-weight: 600;
    font-size: 1.05rem;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.45;
}

body.home-page .hn-ad-modal {
    max-width: 800px;
    max-height: 90vh;
    margin: auto;
}

body.home-page .hn-ad-modal__content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

body.home-page .hn-ad-modal__header {
    flex-shrink: 0;
}

body.home-page .hn-ad-modal__body {
    flex: 1;
    overflow: auto;
}

body.home-page .hn-ad-modal__row {
    min-height: calc(90vh - 120px);
}

body.home-page .hn-ad-modal__image-col {
    background-color: #f8f9fa;
}

body.home-page .hn-ad-modal__image {
    max-width: 100%;
    max-height: calc(90vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
}

body.home-page .hn-ad-modal__contacts {
    background-color: #ffffff;
}

body.home-page .hn-ad-modal__contacts-title {
    color: #2c3e50;
    font-weight: 600;
}

body.home-page .hn-ad-modal__contacts-list {
    max-width: 250px;
}

body.home-page .hn-ad-modal__icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

body.home-page .hn-ad-modal__icon--wa {
    color: #25d366;
}

body.home-page .hn-ad-modal__icon--tg {
    color: #0088cc;
}

body.home-page .hn-ad-modal__icon--channel {
    color: #6c757d;
}

body.home-page .hn-ad-modal__contact-name {
    color: #2c3e50;
}

body.home-page .hn-ad-modal__contact-hint {
    color: #6c757d;
}

/* Плитки — Fluent / Apple cards */
.hn-tiles--gh {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: var(--hn-section-gap);
}

@media (min-width: 640px) {
    .hn-tiles--gh {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.hn-tile--gh {
    --hn-tile-accent: var(--hn-accent);
    --hn-tile-accent-soft: rgba(4, 150, 34, 0.12);
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1rem;
    min-height: 108px;
    padding: 1.1rem 1.2rem;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-left: 4px solid var(--hn-tile-accent);
    border-radius: 0.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: none;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.hn-tile--gh:hover,
.hn-tile--gh:focus-visible {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.14);
    border-left-color: var(--hn-tile-accent);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    color: inherit;
}

.hn-tile--gh:focus-visible {
    outline: 2px solid var(--hn-accent);
    outline-offset: 3px;
}

.hn-tile--ege {
    --hn-tile-accent: #2563eb;
    --hn-tile-accent-soft: rgba(37, 99, 235, 0.1);
}

.hn-tile--oge {
    --hn-tile-accent: #049622;
    --hn-tile-accent-soft: rgba(4, 150, 34, 0.12);
}

.hn-tile--python {
    --hn-tile-accent: #f59e0b;
    --hn-tile-accent-soft: rgba(245, 158, 11, 0.12);
}

.hn-tile--trainer {
    --hn-tile-accent: #ea580c;
    --hn-tile-accent-soft: rgba(234, 88, 12, 0.12);
}

.hn-tile--materials {
    --hn-tile-accent: #64748b;
    --hn-tile-accent-soft: rgba(100, 116, 139, 0.1);
}

.hn-tile--math {
    --hn-tile-accent: #7c3aed;
    --hn-tile-accent-soft: rgba(124, 58, 237, 0.12);
}

.hn-tile__icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--hn-tile-accent-soft);
    color: var(--hn-tile-accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hn-tile__icon .bi {
    font-size: 1.35rem;
    line-height: 1;
}

.hn-tile__icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.hn-tile__icon--bare {
    width: auto;
    height: 52px;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.hn-tile__icon--bare img {
    width: auto;
    height: 100%;
    max-width: 88px;
    object-fit: contain;
}

.hn-tile__body {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}

.hn-tile__text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.hn-tile__badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.12rem 0.45rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hn-tile-accent);
    background: var(--hn-tile-accent-soft);
    border-radius: 999px;
}

.hn-tile--gh .hn-tile__title {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.hn-tile--gh .hn-tile__desc {
    font-size: 0.875rem;
    color: var(--hn-muted);
    line-height: 1.45;
}

.hn-tile__chevron {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    align-self: center;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--hn-muted);
    opacity: 0.45;
    transition: opacity 0.22s ease, transform 0.22s ease, color 0.22s ease;
}

.hn-tile--gh:hover .hn-tile__chevron,
.hn-tile--gh:focus-visible .hn-tile__chevron {
    opacity: 1;
    color: var(--hn-tile-accent);
    transform: translateX(2px);
}

.hn-tile--gh.hn-tile--wide {
    grid-column: 1 / -1;
    min-height: 96px;
}

@media (max-width: 639px) {
    .hn-tile--gh {
        gap: 0.85rem;
        padding: 1rem 1.05rem;
        min-height: 88px;
    }

    .hn-tile__icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .hn-tile__icon .bi {
        font-size: 1.15rem;
    }

    .hn-tile__icon img {
        width: 28px;
        height: 28px;
    }

    .hn-tile__icon--bare {
        height: 44px;
    }

    .hn-tile__icon--bare img {
        width: auto;
        height: 100%;
        max-width: 76px;
    }

    .hn-tile__chevron {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hn-tile--gh,
    .hn-tile__chevron {
        transition: none;
    }

    .hn-tile--gh:hover,
    .hn-tile--gh:focus-visible {
        transform: none;
    }

    .hn-tile--gh:hover .hn-tile__chevron,
    .hn-tile--gh:focus-visible .hn-tile__chevron {
        transform: none;
    }
}

/* Блог */
body.home-page .hn-lms__blog {
    margin-bottom: var(--hn-section-gap);
}

body.home-page .hn-lms__blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

body.home-page .hn-lms__blog-all-link {
    flex-shrink: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--hn-muted);
    text-decoration: none;
    white-space: nowrap;
}

body.home-page .hn-lms__blog-all-link:hover {
    color: var(--hn-text);
    text-decoration: underline;
}

/* Блог — превью-карточка */
body.home-page .hn-blog-preview__card,
body.home-page .hn-blog-preview__card--link {
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: var(--hn-hf-radius);
    background: var(--hn-hf-surface);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 12px 40px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.2s ease;
}

body.home-page .hn-blog-preview__card--link {
    display: block;
    text-decoration: none;
    color: inherit;
}

body.home-page .hn-blog-preview__card--link:hover {
    border-color: rgba(4, 150, 34, 0.28);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05), 0 16px 48px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
    color: inherit;
}

body.home-page .hn-blog-preview__card--link:focus-visible {
    outline: 2px solid var(--hn-hf-accent);
    outline-offset: 3px;
}

body.home-page .hn-blog-preview__card--link:hover .hn-blog-preview__title-text {
    color: var(--hn-hf-accent);
}

body.home-page .hn-blog-preview__layout {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 147px;
}

body.home-page .hn-blog-preview__card--no-media .hn-blog-preview__layout {
    min-height: 0;
}

body.home-page .hn-blog-preview__visual {
    position: relative;
    flex: 0 0 clamp(160px, 32%, 320px);
    max-width: 360px;
    min-height: 133px;
    overflow: hidden;
    background: #0f172a;
}

body.home-page .hn-blog-preview__cover {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
}

body.home-page .hn-blog-preview__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.home-page .hn-blog-preview__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.92);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

body.home-page .hn-blog-preview__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.85rem 1rem 0.95rem 0.95rem;
    background: linear-gradient(135deg, rgba(4, 150, 34, 0.04) 0%, var(--hn-hf-surface) 55%);
}

body.home-page .hn-blog-preview__body::before {
    content: "";
    display: block;
    width: 2.75rem;
    height: 3px;
    border-radius: 2px;
    background: var(--hn-hf-accent);
    margin-bottom: 0.1rem;
    opacity: 0.9;
}

body.home-page .hn-blog-preview__title {
    margin: 0;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: 600;
    line-height: 1.35;
    color: #333333;
}

body.home-page .hn-blog-preview__title-text {
    color: #333333;
    transition: color 0.2s ease;
}

body.home-page .hn-blog-preview__meta {
    margin: 0;
    font-size: 0.82rem;
    color: var(--hn-hf-muted);
}

body.home-page .hn-blog-preview__lead {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--hn-hf-muted);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

body.home-page .hn-blog-preview__cta {
    margin-top: 0.25rem;
    align-self: flex-start;
    pointer-events: none;
}

body.home-page .blog-post-type {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 7px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(4, 150, 34, 0.08);
    color: #047019;
    border: 1px solid rgba(4, 150, 34, 0.18);
}

body.home-page .blog-post-type.video {
    background: rgba(37, 99, 235, 0.07);
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.16);
}

body.home-page .blog-post-type.announcement {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.22);
}

body.home-page .blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--hn-hf-accent);
    text-decoration: none;
    letter-spacing: 0.01em;
}

body.home-page .blog-read-more:hover,
body.home-page .blog-read-more:focus-visible {
    text-decoration: none;
    color: #037a1c;
}

/* Технологии (scoped from home-fresh) */
body.home-page .home-techno-news {
    width: 100%;
    max-width: 100%;
    margin: 0 0 var(--hn-section-gap);
    box-sizing: border-box;
}

body.home-page .home-techno-news__card--follow {
    margin-top: 1rem;
}

body.home-page .home-techno-news__header {
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid rgba(4, 150, 34, 0.2);
}

body.home-page .home-techno-news__heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(1.35rem, 2.5vw, 1.65rem);
    font-weight: 700;
    font-style: italic;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #333333;
}

body.home-page .home-techno-news__heading-mark {
    display: block;
    width: 4px;
    height: 1.35em;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--hn-hf-accent) 0%, rgba(4, 150, 34, 0.45) 100%);
    flex-shrink: 0;
}

body.home-page .home-techno-news__heading-text {
    color: #333333;
    font-style: italic;
}

body.home-page .home-techno-news__card,
body.home-page .home-techno-news__card--link {
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: var(--hn-hf-radius);
    background: var(--hn-hf-surface);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 12px 40px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.2s ease;
}

body.home-page .home-techno-news__card--link {
    display: block;
    text-decoration: none;
    color: inherit;
}

body.home-page .home-techno-news__card--link:hover {
    border-color: rgba(4, 150, 34, 0.28);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05), 0 16px 48px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
    color: inherit;
}

body.home-page .home-techno-news__card--link:focus-visible {
    outline: 2px solid var(--hn-hf-accent);
    outline-offset: 3px;
}

body.home-page .home-techno-news__card--link:hover .home-techno-news__title-text {
    color: var(--hn-hf-accent);
}

body.home-page .home-techno-news__layout {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 147px;
}

body.home-page .home-techno-news__visual {
    position: relative;
    flex: 0 0 clamp(160px, 32%, 320px);
    max-width: 360px;
    min-height: 133px;
    overflow: hidden;
    background: #0f172a;
}

body.home-page .home-techno-news__visual-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1rem;
    text-align: center;
    background:
        radial-gradient(ellipse 90% 70% at 20% 0%, rgba(4, 150, 34, 0.55), transparent 55%),
        linear-gradient(155deg, #14532d 0%, #0f172a 48%, #020617 100%);
}

body.home-page .home-techno-news__visual-brand {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #f8fafc;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

body.home-page .home-techno-news__visual-tag {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(248, 250, 252, 0.78);
}

body.home-page .home-techno-news__cover {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    text-decoration: none;
}

body.home-page .home-techno-news__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.home-page .home-techno-news__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.85rem 1rem 0.95rem 0.95rem;
    background: linear-gradient(135deg, rgba(4, 150, 34, 0.04) 0%, var(--hn-hf-surface) 55%);
}

body.home-page .home-techno-news__body::before {
    content: "";
    display: block;
    width: 2.75rem;
    height: 3px;
    border-radius: 2px;
    background: var(--hn-hf-accent);
    margin-bottom: 0.15rem;
    opacity: 0.9;
}

body.home-page .home-techno-news__title {
    margin: 0;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: 600;
    line-height: 1.35;
    color: #333333;
}

body.home-page .home-techno-news__title-text {
    color: #333333;
    transition: color 0.2s ease;
}

body.home-page .home-techno-news__title-link,
body.home-page .home-techno-news__title-link:visited {
    color: #333333;
    text-decoration: none;
    transition: color 0.2s ease;
}

body.home-page .home-techno-news__title-link:hover,
body.home-page .home-techno-news__title-link:focus-visible {
    color: var(--hn-hf-accent);
    outline: none;
}

body.home-page .home-techno-news__title-link:focus-visible {
    outline: 2px solid var(--hn-hf-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

body.home-page .home-techno-news__lead {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--hn-hf-muted);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

body.home-page .home-techno-news__meta {
    margin: 0;
    font-size: 0.82rem;
    color: var(--hn-hf-muted);
}

body.home-page .home-techno-news__cta {
    margin-top: 0.2rem;
    align-self: flex-start;
    pointer-events: none;
}

/* --- Mobile: главная --- */
@media (max-width: 767px) {
    body.home-page {
        --hn-content-pad: 0.75rem;
        --hn-section-gap: 1.5rem;
    }

    .hn-lms {
        padding: 1.25rem var(--hn-content-pad) 2rem;
    }

    .hn-lms__pitch-title {
        font-size: clamp(1.05rem, 4.5vw, 1.25rem);
        line-height: 1.35;
    }

    .hn-lms__pitch-body-line {
        font-size: 0.95rem;
    }

    .hn-tile--gh {
        min-height: 88px;
    }

    .hn-tile--gh .hn-tile__desc {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    body.home-page .hn-lms__blog-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    body.home-page .ad-banner .card-body {
        padding: 10px 16px;
    }

    body.home-page .ad-banner h4 {
        font-size: 1rem;
    }

    body.home-page .hn-ad-modal {
        max-width: 95vw;
    }

    body.home-page .hn-ad-modal__row {
        min-height: 0;
        flex-direction: column;
    }

    body.home-page .hn-ad-modal__image-col {
        min-height: 200px;
    }

    body.home-page .hn-ad-modal__image {
        max-height: 40vh;
    }

    body.home-page .hn-ad-modal__contacts-list {
        max-width: none;
        width: 100%;
    }

    body.home-page .hn-blog-preview__layout {
        flex-direction: column;
        min-height: 0;
    }

    body.home-page .hn-blog-preview__visual {
        flex: none;
        max-width: none;
        width: 100%;
        min-height: 0;
        max-height: none;
        aspect-ratio: 16 / 9;
    }

    body.home-page .hn-blog-preview__body {
        padding: 0.85rem 1rem 0.95rem;
    }

    body.home-page .hn-blog-preview__lead {
        -webkit-line-clamp: 3;
    }

    body.home-page .home-techno-news__layout {
        flex-direction: column;
        min-height: 0;
    }

    body.home-page .home-techno-news__visual {
        flex: none;
        max-width: none;
        width: 100%;
        min-height: 0;
        max-height: none;
        aspect-ratio: 16 / 9;
    }

    body.home-page .home-techno-news__body {
        padding: 0.85rem 1rem 0.95rem;
    }
}

@media (max-width: 479px) {
    body.home-page {
        --hn-content-pad: 0.65rem;
        --hn-section-gap: 1.25rem;
    }

    .hn-lms {
        padding-top: 1rem;
        padding-bottom: 1.75rem;
    }

    body.home-page .ad-banner .card-body {
        padding: 10px 14px;
    }

    body.home-page .ad-banner h4 {
        font-size: 0.9375rem;
    }

    .hn-tile__icon--bare img {
        max-width: 64px;
    }
}

/* Внутренние карточки на белом листе — border-first, без тяжёлых теней */
body.home-page .hn-lms .hn-blog-preview__card,
body.home-page .hn-lms .hn-blog-preview__card--link {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.home-page .hn-lms .hn-blog-preview__card--link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

body.home-page .hn-lms .home-techno-news__card,
body.home-page .hn-lms .home-techno-news__card--link {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.home-page .hn-lms .home-techno-news__card--link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

body.home-page .hn-lms .ad-banner {
    box-shadow: none;
}

body.home-page .hn-lms .ad-banner:hover {
    transform: none;
    box-shadow: none;
}
