@charset "utf-8";

/* Shared home-page article module; deliberately scoped away from legacy index styles. */
.home-articles-section {
    --ha-primary: #0052d9;
    --ha-primary-soft: #edf4ff;
    --ha-ink: #1d2b40;
    --ha-muted: #61728a;
    --ha-line: #e3eaf4;
    --ha-surface: #fff;
    --ha-transition: 200ms ease;
    padding: 40px 0 72px;
    background: #f7f9fc;
    color: var(--ha-ink);
}
.home-articles-section *,
.home-articles-section *::before,
.home-articles-section *::after { box-sizing: border-box; }
.home-articles-section :is(h2, h3, h4, p) { margin: 0; }
.home-articles-section a { text-decoration: none; touch-action: manipulation; }
.home-articles-section a:focus-visible { outline: 3px solid var(--ha-primary); outline-offset: 4px; }
.home-articles-section [hidden] { display: none !important; }
.home-articles-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.home-articles-section .home-articles-icon {
    display: inline-block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.home-articles-section .home-articles-shell {
    width: min(var(--max-width, 1400px), calc(100% - 48px));
    margin-inline: auto;
    padding: 0;
}
.home-articles-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 36px;
    padding-inline: 150px;
    text-align: center;
}
.home-articles-heading { min-width: 0; }
.home-articles-section .home-articles-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--ha-primary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 2px;
}
.home-articles-eyebrow::before,
.home-articles-eyebrow::after { width: 22px; height: 1px; background: #a9c7f4; content: ""; }
.home-articles-heading h2 { font-size: 36px; font-weight: 700; line-height: 1.4; letter-spacing: .5px; text-wrap: balance; }
.home-articles-section .home-articles-intro { margin-top: 12px; color: var(--ha-muted); font-size: 16px; line-height: 1.7; }
.home-articles-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    flex-shrink: 0;
    padding: 10px 16px;
    border: 1px solid #d7e4f5;
    border-radius: 8px;
    background: #fff;
    color: var(--ha-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    transition: background-color var(--ha-transition), border-color var(--ha-transition);
}
.home-articles-header > .home-articles-more { position: absolute; right: 0; bottom: 2px; }
.home-articles-more .home-articles-icon { width: 17px; height: 17px; }
.home-articles-more:hover { border-color: #afc9ec; background: var(--ha-primary-soft); color: var(--ha-primary); }

/* Equal editorial cards keep their proportions with or without a supplied cover. */
.home-news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.home-news-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ha-line);
    border-radius: 16px;
    background: var(--ha-surface);
    box-shadow: 0 6px 22px rgba(24, 57, 99, .035);
    transition: border-color var(--ha-transition), box-shadow var(--ha-transition), transform var(--ha-transition);
}
.home-news-link { position: relative; display: flex; flex-direction: column; height: 100%; color: var(--ha-ink); }
.home-news-media {
    position: relative;
    height: 166px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: #eef5ff;
    background-image: url('/static/51bgp/images/articles/cover-cloud.svg');
    background-position: center;
    background-size: cover;
}
.home-news-card:nth-child(2) .home-news-media { background-image: url('/static/51bgp/images/articles/cover-network.svg'); }
.home-news-card:nth-child(3) .home-news-media { background-image: url('/static/51bgp/images/articles/cover-security.svg'); }
.home-news-media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.home-news-category {
    position: absolute;
    z-index: 1;
    top: 18px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 6px;
    background: #fff;
    color: var(--ha-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: 0 3px 10px rgba(30, 76, 139, .04);
}
.home-news-content { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 24px; }
.home-articles-section .home-news-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    color: inherit;
    font-size: 20px;
    font-weight: 650;
    line-height: 1.55;
    text-wrap: balance;
    overflow-wrap: anywhere;
    transition: color var(--ha-transition);
}
.home-articles-section .home-news-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    margin-top: 12px;
    overflow: hidden;
    color: var(--ha-muted);
    font-size: 14px;
    line-height: 1.75;
    text-wrap: pretty;
    overflow-wrap: anywhere;
}
.home-news-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
    padding-top: 22px;
    color: var(--ha-primary);
    font-size: 13px;
    line-height: 1.5;
}
.home-news-footer time { color: var(--ha-muted); font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: .4px; }
.home-news-read { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.home-news-read .home-articles-icon { width: 17px; height: 17px; transition: transform var(--ha-transition); }
.home-news-link:focus-visible { outline-offset: -4px; border-radius: 15px; }
.home-news-card:focus-within { box-shadow: 0 0 0 3px rgba(0, 82, 217, .12); }

/* Independent help cards retain the original compact two-column rhythm. */
.home-help-panel { margin-top: 38px; }
.home-help-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.home-help-heading { min-width: 0; }
.home-help-heading > div { min-width: 0; }
.home-help-heading h3 { font-size: 22px; font-weight: 650; line-height: 1.4; }
.home-help-heading p { margin-top: 7px; color: var(--ha-muted); font-size: 14px; line-height: 1.7; }
.home-help-more { border-color: transparent; background: transparent; }
/* Share row sizing across both columns, including cards with two-line copy. */
.home-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 16px 20px; }
.home-help-grid--single { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; }
.home-help-list { display: contents; }
.home-help-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 20px;
    min-height: 158px;
    padding: 22px;
    border: 1px solid var(--ha-line);
    border-radius: 12px;
    background: var(--ha-surface);
    color: var(--ha-ink);
    box-shadow: 0 3px 12px rgba(24, 57, 99, .02);
    transition: color var(--ha-transition), border-color var(--ha-transition), box-shadow var(--ha-transition);
}
.home-help-thumb {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 112px;
    height: 112px;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f5ff;
    color: #4873b5;
    font-size: 12px;
    line-height: 1.5;
}
.home-help-thumb .home-articles-icon { width: 30px; height: 30px; stroke-width: 1.5; }
.home-help-thumb > i { font-size: 28px; line-height: 1; }
.home-help-thumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.home-help-copy { display: block; min-width: 0; }
.home-help-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; color: var(--ha-muted); font-size: 12px; line-height: 1.5; }
.home-help-category { padding: 2px 8px; border-radius: 4px; background: #edf6f4; color: #287265; overflow-wrap: anywhere; }
.home-help-meta time, .home-help-views { white-space: nowrap; font-variant-numeric: tabular-nums; }
.home-help-views i { margin-right: 3px; }
.home-help-copy h4 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: inherit; font-size: 16px; font-weight: 600; line-height: 1.55; word-break: normal; overflow-wrap: anywhere; }
.home-help-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin-top: 8px; overflow: hidden; color: var(--ha-muted); font-size: 13px; line-height: 1.7; word-break: normal; overflow-wrap: anywhere; }
.home-articles-section .home-help-arrow { width: 17px; height: 17px; color: #7e95b1; transition: color var(--ha-transition), transform var(--ha-transition); }
.home-help-item:hover { color: var(--ha-primary); border-color: #b9d0ef; box-shadow: 0 6px 20px rgba(34, 68, 109, .06); }
.home-help-item:hover .home-help-arrow { color: var(--ha-primary); transform: translateX(3px); }
.home-articles-section .home-articles-empty { margin: 0; padding: 32px 24px; border: 1px dashed #d9e4f2; border-radius: 12px; background: #f8fbff; color: var(--ha-muted); font-size: 14px; line-height: 1.7; text-align: center; }

@media (hover: hover) and (pointer: fine) {
    .home-news-card:hover { border-color: #b9d0ef; box-shadow: 0 14px 32px rgba(34, 68, 109, .085); transform: translateY(-3px); }
    .home-news-card:hover .home-news-title { color: var(--ha-primary); }
    .home-news-card:hover .home-news-read .home-articles-icon { transform: translateX(3px); }
}
@media (max-width: 1100px) {
    .home-articles-heading h2 { font-size: 34px; }
    .home-news-grid { gap: 20px; }
    .home-articles-section .home-news-title { font-size: 19px; }
    .home-help-item { gap: 16px; padding: 20px; }
}
@media (min-width: 1025px) and (max-width: 1550px) {
    .home-articles-header > .home-articles-more { right: 80px; }
    .home-help-more { margin-right: 80px; }
}
@media (max-width: 1000px) and (min-width: 601px) {
    .home-news-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .home-news-link { flex-direction: row; }
    .home-news-media { align-self: stretch; width: 32%; height: auto; min-height: 192px; }
    .home-news-content { padding: 24px; }
    .home-articles-section .home-news-title { font-size: 20px; }
    .home-news-footer { padding-top: 18px; }
}
@media (max-width: 900px) {
    .home-articles-header { padding-inline: 0; gap: 18px; }
    .home-articles-header > .home-articles-more { position: static; }
    .home-help-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; gap: 16px; }
}
@media (max-width: 760px) {
    .home-help-header { flex-wrap: wrap; gap: 12px; }
    .home-help-more { padding-left: 0; }
}
@media (max-width: 600px) {
    .home-articles-section { padding: 28px 0 48px; }
    .home-articles-section .home-articles-shell { width: calc(100% - 32px); }
    .home-articles-header { gap: 16px; margin-bottom: 26px; }
    .home-articles-section .home-articles-eyebrow { margin-bottom: 10px; font-size: 10px; }
    .home-articles-heading h2 { font-size: 27px; letter-spacing: 0; }
    .home-articles-section .home-articles-intro { font-size: 15px; margin-top: 10px; }
    .home-articles-more { padding: 9px 14px; }
    .home-news-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .home-news-card { border-radius: 14px; }
    .home-news-media { height: 140px; }
    .home-news-category { top: 16px; left: 18px; }
    .home-news-content { padding: 22px; }
    .home-articles-section .home-news-title { display: block; overflow: visible; font-size: 20px; }
    .home-articles-section .home-news-description { font-size: 14px; margin-top: 10px; }
    .home-news-footer { padding-top: 20px; }
    .home-help-panel { margin-top: 32px; }
    .home-help-header { align-items: flex-start; margin-bottom: 16px; }
    .home-help-heading h3 { font-size: 21px; }
    .home-help-heading p { font-size: 13px; margin-top: 5px; }
    .home-help-more { padding-left: 0; padding-right: 0; }
    .home-help-list, .home-help-grid { gap: 12px; }
    .home-help-item { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; min-height: 140px; padding: 16px; }
    .home-help-thumb { width: 72px; height: 82px; }
    .home-help-thumb .home-articles-icon { width: 26px; height: 26px; }
    .home-help-thumb > i { font-size: 26px; }
    .home-help-meta { gap: 6px 10px; margin-bottom: 8px; }
    .home-help-copy h4 { text-wrap: balance; font-size: 15px; }
    .home-help-description { font-size: 12px; }
    .home-articles-section .home-help-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .home-articles-section *, .home-articles-section *::before, .home-articles-section *::after { transition: none !important; animation: none !important; }
    .home-news-card:hover, .home-help-item:hover .home-help-arrow, .home-news-card:hover .home-news-read .home-articles-icon { transform: none; }
}
