.home-news-section { padding: 48px 0; background: #f2f4f7; }
.news-section-heading { display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px; }
.home-news-layout { display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);gap:24px;align-items:start; }
.home-news-main,.home-news-side { display:grid;gap:20px;min-width:0; }
.news-card { min-width:0;background:#fff;border:1px solid #dce1e9;border-radius:16px;overflow:hidden; }
.news-card-horizontal { display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); }
.news-cover { display:block;overflow:hidden;background:#e8edf7; }
.news-cover img { width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s ease; }
.news-card:hover .news-cover img { transform:scale(1.025); }
.news-card-horizontal .news-cover { min-height:230px; }
.news-card-vertical .news-cover { aspect-ratio:16/7; }
.news-card-body { padding:22px;min-width:0; }
.news-card h3 { font-size:1.0625rem!important;line-height:1.5;margin:10px 0;overflow-wrap:anywhere; }
.news-card h3 a { text-decoration:none; }.news-card h3 a:hover { color:#1747d1; }
.news-date { color:#64748b;font-size:.75rem; }
.news-read { display:inline-flex;align-items:center;gap:9px;font-size:.8125rem;font-weight:700;color:#1747d1;text-decoration:none; }
.news-excerpt { color:#64748b;overflow-wrap:anywhere; }
.news-placeholder { display:grid;place-items:center;height:100%;min-height:150px;background:linear-gradient(135deg,#e8eeff,#dce1e9);font-size:3rem;color:#245bff; }
.news-list-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px; }
.news-pagination { display:flex;align-items:center;justify-content:center;gap:20px;margin-top:28px; }
.news-article { max-width:820px;background:#fff;border:1px solid #dce1e9;border-radius:18px;padding:clamp(20px,4vw,40px); }
.news-detail-title { max-width:900px;margin-inline:auto;overflow-wrap:anywhere; }
.news-article-cover { width:100%;height:auto;max-height:480px;object-fit:contain;border-radius:12px;margin:12px 0 28px; }
.news-article-body { line-height:1.85;overflow-wrap:anywhere; }.news-article-body img { max-width:100%;height:auto; }.news-article-body table { display:block;overflow-x:auto;max-width:100%; }
@media(max-width:991.98px){.home-news-layout{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:18px;}.news-card-horizontal{grid-template-columns:1fr;}.news-card-horizontal .news-cover{min-height:0;aspect-ratio:16/9;}.news-list-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:575.98px){.home-news-layout,.news-list-grid{grid-template-columns:1fr;}.news-section-heading{align-items:start;flex-direction:column;}.home-news-section{padding:32px 0;}.news-card-body{padding:18px;}}
@media(prefers-reduced-motion:reduce){.news-cover img{transition:none;}}

/* Five random articles: two horizontal cards, three compact vertical cards. */
.news-card-meta { display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:8px; }
.news-category { display:inline-block;padding:4px 8px;background:#edf2ff;border:1px solid #dce5ff;border-radius:6px;color:#1747d1;font-size:.6875rem;font-weight:700;line-height:1.4;overflow-wrap:anywhere; }
.home-news-compact { padding-block:30px; }
.home-news-compact .container { max-width:1100px; }
.home-news-compact .news-section-heading { margin-bottom:18px; }
.home-news-compact .home-news-layout { align-items:stretch;gap:20px;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); }
.home-news-compact .home-news-main,.home-news-compact .home-news-side { display:grid;grid-auto-rows:minmax(0,1fr);gap:16px; }
.home-news-compact .news-card-body { padding:16px; }
.home-news-compact .news-card h3 { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:.9375rem!important;margin-block:7px; }
.home-news-compact .news-excerpt { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;margin-bottom:12px; }
.home-news-compact .news-card .news-cover { position:relative;min-height:0;aspect-ratio:auto; }
.home-news-compact .news-card .news-cover img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover; }
.home-news-compact .news-card-horizontal { min-height:220px; }
.home-news-compact .news-card-horizontal .news-card-body { display:flex;flex-direction:column;justify-content:flex-start;gap:0;padding:14px 16px; }
.home-news-compact .news-card-vertical { display:grid;grid-template-rows:80px auto; }
.home-news-compact .news-card-vertical .news-card-body { padding:12px 14px; }
.home-news-compact .news-card-vertical .news-excerpt { display:none; }
.home-news-compact .news-placeholder { min-height:0; }
@media(max-width:991.98px){.home-news-compact .news-card-horizontal{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);}}
@media(max-width:575.98px){.home-news-compact .home-news-layout{grid-template-columns:1fr;}.home-news-compact .home-news-main,.home-news-compact .home-news-side{grid-auto-rows:auto;}.home-news-compact .news-card-horizontal{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);min-height:190px;}.home-news-compact .news-card-vertical{grid-template-rows:130px auto;}}


.news-card-slider { --news-window:620px; --news-gap:16px; min-width:0; }
.news-card-window { height:var(--news-window); overflow:hidden; }
.news-card-track { position:relative; display:flex; flex-direction:column; gap:var(--news-gap); }
.news-card-slot { flex:0 0 auto; height:calc((var(--news-window) - (var(--news-visible) - 1) * var(--news-gap)) / var(--news-visible)); min-height:0; }
.home-news-compact .news-card-slot .news-card { height:100%; min-height:0; }
.home-news-compact .news-card-slot .news-card-vertical { grid-template-rows:60px minmax(0,1fr); }
.home-news-compact .news-card-slot .news-card-body { overflow:hidden; }
.news-card-bullets { display:flex; flex-wrap:wrap; justify-content:center; gap:3px; margin-top:12px; }
.news-card-bullets button { width:28px; height:28px; padding:0; border:0; background:transparent; position:relative; }
.news-card-bullets button::after { content:''; position:absolute; top:50%;left:50%;transform:translate(-50%,-50%);width:7px;height:7px;border-radius:20px;background:#a8b2c2; }
.news-card-bullets button.active::after { width:18px;background:#245bff; }
.news-card-bullets button:focus-visible { outline:2px solid #245bff;border-radius:5px; }
@media(max-width:575.98px){.news-card-slider{--news-window:600px;}}

/* The right-hand cards keep a near-square footprint and show their summaries. */
@media(min-width:576px){.home-news-compact .home-news-layout{grid-template-columns:minmax(0,1fr) minmax(260px,320px);}}
.home-news-compact .news-card-slot .news-card-vertical { grid-template-rows:minmax(100px,1fr) auto; }
.home-news-compact .news-card-vertical .news-excerpt { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-bottom:8px; }
.home-news-compact .news-card-vertical .news-card-body { display:block;padding:12px 14px 14px; }
.home-news-compact .news-card-vertical .news-read { margin-top:2px; }
.home-news-compact .news-card-vertical .news-cover { display:block;overflow:hidden;background:#e8edf7; }
.home-news-compact .news-card-vertical .news-cover img { object-fit:cover;object-position:center; }
.home-news-compact .news-card-vertical .news-card-meta { margin-bottom:5px;gap:6px; }
.home-news-compact .news-card-vertical h3 { margin:5px 0 7px; }
.frontend-app .home-news-compact .news-card-vertical .news-excerpt { margin:0 0 8px;line-height:1.6 !important; }

.home-news-compact .news-card-horizontal .news-card-meta { margin-bottom:5px; }
.home-news-compact .news-card-horizontal h3 { margin:5px 0 8px; }
.frontend-app .home-news-compact .news-card-horizontal .news-excerpt { line-height:1.6 !important; margin:0 0 10px; -webkit-line-clamp:3; }
.home-news-compact .news-card-horizontal .news-read { margin-top:0; }

/* Article reading layout: title, date, category, cover, then content. */
.frontend-app .news-detail-section { padding: 140px 0 56px; background: #f2f4f7; }
.frontend-app .news-detail-article { width: 100%; max-width: 860px; padding: clamp(24px,4vw,44px); }
.frontend-app .news-article-header { text-align: center; margin-bottom: 24px; }
.frontend-app .news-detail-title { margin: 0 0 14px; line-height: 1.35; text-wrap: balance; }
.frontend-app .news-article-header .news-date { display: block; font-size: .8125rem; line-height: 1.6; }
.frontend-app .news-article-category { margin-top: 10px; }
.frontend-app .news-article-figure { margin: 0 0 28px; border-radius: 14px; overflow: hidden; background: #f2f4f7; }
.frontend-app .news-detail-article .news-article-cover { display: block; width: 100%; height: auto; max-height: 560px; object-fit: contain; margin: 0; border-radius: 0; }
.frontend-app .news-detail-article .news-article-body { max-width: 70ch; margin-inline: auto; }
.frontend-app .news-article-body > :first-child { margin-top: 0; }
.frontend-app .news-article-body > :last-child { margin-bottom: 0; }
.frontend-app .news-article-body :is(ul,ol) { padding-left: 1.4rem; }
.frontend-app .news-article-body li { margin-bottom: 8px; }
.frontend-app .news-article-body blockquote { margin: 24px 0; padding: 16px 20px; border-left: 3px solid #245bff; background: #f4f7ff; border-radius: 0 12px 12px 0; }
.frontend-app .news-article-footer { margin-top: 28px; padding-top: 20px; border-top: 1px solid #e8ecf2; }
.frontend-app .news-article-footer .news-read { min-height: 44px; }
@media (max-width: 991.98px) {
    .frontend-app .news-detail-section { padding-top: 112px; padding-bottom: 40px; }
}
@media (max-width: 575.98px) {
    .frontend-app .news-detail-section { padding: 96px 0 28px; }
    .frontend-app .news-detail-section > .container { padding-inline: 12px; }
    .frontend-app .news-detail-article { padding: 20px 16px; border-radius: 16px; }
    .frontend-app .news-detail-title { font-size: clamp(1.4rem,6vw,1.75rem) !important; line-height: 1.4; }
    .frontend-app .news-article-header { margin-bottom: 20px; }
    .frontend-app .news-article-figure { margin-bottom: 20px; border-radius: 10px; }
    .frontend-app .news-article-body blockquote { padding: 12px 14px; margin-block: 20px; }
}

/* Small recommendations below the article, without horizontal scrolling. */
.frontend-app .news-related { max-width: 860px; margin-top: 32px; }
.frontend-app .news-related-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.frontend-app .news-related-heading h2 { margin: 0; }
.frontend-app .news-related-heading .news-read { min-height: 44px; }
.frontend-app .news-related-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.frontend-app .news-related-card { min-width: 0; overflow: hidden; border: 1px solid #dce1e9; border-radius: 14px; background: #fff; transition: border-color .2s; }
.frontend-app .news-related-card:hover { border-color: #245bff; }
.frontend-app .news-related-link { display: block; height: 100%; text-decoration: none; color: #293548; }
.frontend-app .news-related-cover { aspect-ratio: 16/10; display: grid; place-items: center; background: #e8edf7; color: #245bff; font-size: 2rem; overflow: hidden; }
.frontend-app .news-related-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.frontend-app .news-related-body { padding: 12px; }
.frontend-app .news-related-body h3 { font-size: .875rem !important; line-height: 1.5; margin: 10px 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
@media (max-width: 767.98px) { .frontend-app .news-related-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; } }
@media (max-width: 359.98px) { .frontend-app .news-related-grid { grid-template-columns: minmax(0,1fr); } }
@media (prefers-reduced-motion: reduce) { .frontend-app .news-related-card { transition: none; } }

/* Compact homepage news; both desktop windows share one measured height. */
.frontend-app .home-news-compact { padding-block: 24px; }
.frontend-app .home-news-compact .home-news-layout { gap: 18px; }
.frontend-app .home-news-compact .news-card-slider { display: flex; flex-direction: column; }
.frontend-app .home-news-compact .news-card-window { flex-shrink: 0; }
.frontend-app .home-news-compact .news-card-bullets { flex: 1; align-content: flex-start; }
.frontend-app .home-news-compact .news-card-horizontal .news-card-body { padding: 12px 14px; }
.frontend-app .home-news-compact .news-card h3 { font-size: .875rem !important; line-height: 1.4; margin-block: 5px 6px; }
.frontend-app .home-news-compact .news-card .news-excerpt { font-size: .8125rem !important; line-height: 1.5 !important; -webkit-line-clamp: 2; margin: 0 0 7px; }
.frontend-app .home-news-compact .news-card-vertical .news-card-body { padding: 10px 12px; }
.frontend-app .home-news-compact .news-card-slot .news-card-vertical { grid-template-rows: minmax(90px,1fr) auto; }
.frontend-app .home-news-compact .news-card-meta { gap: 5px; margin-bottom: 4px; }
.frontend-app .home-news-compact .news-read { font-size: .75rem; }
.frontend-app .home-news-compact .news-category { padding: 3px 6px; }
