/* Homepage-only layouts. Shared cards and editor content stay in main.css. */
/* Opinion cards use each article's featured image with a readable title overlay. */
.layout-opinion .section-posts{display:grid;grid-template-columns:repeat(var(--kn-card-columns,4),minmax(0,1fr));gap:16px;padding:20px}
.opinion-card{min-width:0;border:1px solid var(--kn-border);overflow:hidden}
.opinion-card>a{display:block;height:100%;color:#fff;text-decoration:none}
.opinion-card__image{position:relative;aspect-ratio:4/3;overflow:hidden;background:var(--kn-ink)}
.opinion-card__image>img,.opinion-card__image>.image-placeholder{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.opinion-card__image:after{position:absolute;inset:25% 0 0;background:linear-gradient(transparent,#000e);content:"";pointer-events:none}
.opinion-card h3{position:absolute;z-index:1;inset-inline:16px;bottom:14px;margin:0;color:#fff;font-size:14px;line-height:1.8;text-shadow:0 1px 3px #000}
@container kn-section (max-width:700px){.layout-opinion .section-posts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container kn-section (max-width:380px){.layout-opinion .section-posts{grid-template-columns:1fr}}
.ktnews-placement--home { width: min(100%, 970px); aspect-ratio: 970 / 250; margin-block: 0 36px; }
.ktnews-placement--home small { font-size: 32px; }
/* Homepage and manual, keyboard-accessible slider. */
.home-main { padding-block: 30px 64px; }
.lead-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2.3fr) minmax(0,1fr); gap: 24px; align-items: stretch; margin-block-end: 36px; }
.panel-heading { display: flex; align-items: center; gap: 9px; position: relative; margin: 0; padding: 15px 16px; min-height: 62px; font-size: 16px; font-weight: 800; border-bottom: 1px solid var(--kn-border); }
.latest-panel { display: flex; flex-direction: column; min-height: 0; }
.news-rail-heading { display: flex; align-items: center; border-bottom: 1px solid var(--kn-border); }
.news-rail-heading .panel-heading { border: 0; flex: 1; min-width: 0; }
.news-rail-toggle { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-inline-end: 12px; border: 1px solid var(--kn-border); border-radius: 50%; color: var(--kn-text); background: var(--kn-surface-alt); flex: none; }
.news-rail-toggle .icon { width: 16px; height: 16px; }
.news-rail-toggle[aria-pressed="true"] .rail-play-icon { display: block; }
.news-rail-toggle[aria-pressed="true"] .rail-pause-icon { display: none; }
.news-rail-viewport { position: relative; height: 390px; flex: none; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--kn-border) transparent; }
.latest-list { list-style: none; margin: 0; padding: 0 15px; }
.latest-list li { display: flex; gap: 11px; padding-block: 18px; border-bottom: 1px solid var(--kn-border); }
.latest-list h3 { font-size: 12px; font-weight: 500; line-height: 2; margin: 0; }
.latest-list time { color: var(--kn-link); font-size: 10px; white-space: nowrap; padding-inline-end: 9px; border-inline-end: 2px solid var(--kn-accent); line-height: 2; }
.latest-all { display: flex; justify-content: flex-end; padding: 13px 15px; margin-block-start: auto; }
.news-slider { height: 100%; border-radius: 0; overflow: hidden; background: #101623; position: relative; }
.slider-track { min-width: 0; height: 100%; }
.lead-stories { min-width: 0; }
.lead-slide { height: 100%; }
.lead-slide:not(.is-current) { display: none; }
.slide-meta { display: none; }
.slide-link { display: grid; height: 100%; min-height: 440px; position: relative; color: #fff; }
.slide-link:hover { color: #fff; }
.slide-image, .slide-copy { grid-area: 1/1; min-width: 0; }
.slide-image { position: relative; aspect-ratio: 1.45; min-height: 440px; height: 100%; }
.slide-image img, .slide-image>.image-placeholder { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.slide-image:after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #000f 0%, #000b 55%, #0002 100%); }
.slide-copy { align-self: end; z-index: 1; padding: 60px 26px 56px; }
.slide-copy h2 { margin: 0; font-size: clamp(21px, 2.1vw, 30px); line-height: 1.8; font-weight: 800; text-shadow: 0 1px 4px #0008; }
.slider-controls { z-index: 3; position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: space-between; padding: 12px; }
.slider-arrow { pointer-events: auto; width: 38px; height: 44px; border: 1px solid #ffffffa0; border-radius: 0; background: #0008; color: #fff; display: flex; align-items: center; justify-content: center; }
.slider-arrow:hover { background: var(--kn-accent); }
.ktnews-rtl .slider-prev .icon, .ktnews-ltr .slider-next .icon { transform: rotate(180deg); }
.slider-dots { z-index: 3; display: flex; justify-content: center; gap: 4px; position: absolute; bottom: 10px; inset-inline: 0; }
.slider-dots button { position: relative; width: 28px; height: 28px; border: 0; padding: 0; background: transparent; border-radius: 50%; }
.slider-dots button:after { content: ""; position: absolute; top: 10px; left: 10px; width: 8px; height: 8px; border-radius: 50%; background: #c4c9d2; }
.slider-dots [aria-current="true"]:after { background: #fff; transform: scale(1.5); }
.news-card--editorial .card-image { margin: 12px 12px 0; border-radius: 5px; aspect-ratio: 16 / 10; }
.news-card--editorial .card-copy { align-items: center; gap: 8px; }
.news-card--editorial .card-title { font-size: 16px; text-align: center; font-weight: 800; }
.news-card--editorial .post-date { display: none; }
.share-tools--compact { padding: 0 12px 16px; justify-content: center; }
.share-tools--compact .share-links { gap: 5px; justify-content: center; }
.share-tools--compact .share-icon { width: 32px; height: 32px; padding: 7px; }
.share-tools--compact .share-icon .icon { width: 16px; height: 16px; }
/* Image-led category sections, still using the owner's existing section settings. */
.home-sections { display: grid; grid-template-columns: repeat(var(--kn-home-columns,3), minmax(0,1fr)); gap: 32px; align-items: stretch; }
.news-section { overflow: hidden; border-radius: 0; border-color: var(--kn-border); box-shadow: 0 8px 24px #0d142405; display: flex; flex-direction: column; }
.section-posts { padding: 16px; flex: 1; }
.layout-magazine .section-posts { display: flex; flex-direction: column; gap: 16px; }
.layout-magazine .news-card--standard .card-link { display: block; color: var(--kn-text); }
.layout-magazine .news-card--standard .card-link:hover { color: var(--kn-link); }
.layout-magazine .news-card--standard .card-image { aspect-ratio: 16 / 10; border-radius: 10px; }
.layout-magazine .news-card--standard .card-copy { gap: 8px; padding: 15px 2px 8px; }
.layout-magazine .news-card--standard .card-title { min-height: 3.9em; font-size: 16px; line-height: 1.95; font-weight: 800; }
.layout-magazine .news-card--compact { background: transparent; padding: 15px 0 0; border-top: 1px solid var(--kn-border); border-radius: 0; flex: 1; }
.layout-magazine .news-card--compact .category-label { display: none; }
.news-section .news-card--compact .card-image { border-radius: 9px; width: 92px; aspect-ratio: 4 / 3; }
.news-section .news-card--compact .card-title { font-size: 12px; line-height: 2; }
.layout-magazine .news-card--compact .post-date { display: inline-flex; }
.layout-grid .section-posts { display: grid; grid-template-columns: repeat(var(--kn-card-columns,2), minmax(0,1fr)); grid-auto-rows: minmax(0,1fr); gap: 20px 14px; }
.layout-grid .news-card .card-link { display: flex; flex-direction: column; }
.layout-grid .card-image { flex: none; width: 100%; min-height: 0; aspect-ratio: 16 / 10; border-radius: 9px; }
.layout-grid .card-copy { gap: 6px; padding: 10px 0; }
.layout-grid .card-title { font-size: 12px; }
.home-sections > .news-section { grid-column: span var(--kn-section-span,1); min-width: 0; container: kn-section / inline-size; }
@container kn-section (max-width:480px) { .layout-grid .section-posts { grid-template-columns: repeat(var(--kn-card-tablet,2),minmax(0,1fr)); } }
@container kn-section (max-width:280px) { .layout-grid .section-posts { grid-template-columns: minmax(0,1fr); } }
.layout-list .section-posts { display: flex; flex-direction: column; gap: 0; }
.layout-list .news-card { flex: 1; display: flex; align-items: center; padding-block: 16px; }
.layout-list .card-link { height: auto; width: 100%; }
.layout-list .news-card--compact .card-image { width: 112px; aspect-ratio: 4 / 3; }
.layout-list .news-card--compact .card-title { font-size: 13px; }
.layout-list .news-card+.news-card { border-top: 1px solid var(--kn-border); padding-block-start: 13px; }
.style-accent .section-heading { background: var(--kn-accent); color: #fff; }
.style-accent .section-heading .text-link { color: #fff; }
.style-accent .section-heading h2:before { background: #fff; }
.style-dark { --kn-surface: #141d30; --kn-surface-alt: #202c43; --kn-border: #34425d; --kn-text: #f0f3fa; --kn-muted: #b0bdd0; --kn-link: #ff7a89; background: var(--kn-surface); color: var(--kn-text); border-color: var(--kn-border); }
.special-block-content { padding: 18px; }
.special-block-content figure img { width: 100%; height: auto; border-radius: 5px; }
.special-block-content figcaption { color: var(--kn-muted); font-size: 12px; margin-block: 10px; }
.special-block-content .widget { border: 0; background: transparent; }
.special-block-content .widget-title { padding: 0 0 12px; font-size: 15px; }
.special-block-content :is(input, select, textarea) { max-width: 100%; }
.homepage-editor-content { padding: 24px; margin-block-start: 24px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .news-section .card-image img { transition: transform 180ms ease-out; }
  .news-section .card-link:hover .card-image img { transform: scale(1.025); }
}
/* Full-width, server-rendered video showcase. */
.home-videos { margin-block: 40px; padding: 28px; background: #c60018; color: #fff; border-radius: 16px; overflow: hidden; }
.video-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 18px; }
.video-eyebrow { display: block; margin-bottom: 4px; color: #ffe1e5; font-size: 11px; }
.video-heading h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 27px; line-height: 1.6; }
.video-heading-play { display: grid; place-items: center; width: 32px; height: 32px; padding-right: 2px; border: 1px solid #ffffff80; border-radius: 50%; font-size: 15px; }
.video-more { color: #fff; font-size: 12px; }
.video-showcase { display: grid; grid-template-columns: 1.65fr 1fr; grid-template-rows: repeat(4,100px); gap: 12px 24px; }
.video-item { position: relative; min-width: 0; overflow: hidden; border-radius: 10px; color: #fff !important; }
.video-feature { grid-row: span 4; background: #71000d; }
.video-picture { position: relative; height: 100%; overflow: hidden; }
.video-picture img { width: 100%; height: 100%; object-fit: cover; }
.video-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 56px; height: 42px; padding-left: 3px; transform: translate(-50%,-50%); border-radius: 10px; background: #d40019; box-shadow: 0 3px 16px #0003; font-family: Arial, sans-serif; font-size: 22px; }
.video-feature .video-picture:after { position: absolute; inset: 30% 0 0; background: linear-gradient(transparent,#000e); content: ""; pointer-events: none; }
.video-feature .video-play { z-index: 1; width: 72px; height: 54px; font-size: 28px; }
.video-feature .video-copy { position: absolute; z-index: 1; bottom: 0; padding: 24px; }
.video-category { display: inline-block; color: #fff; font-size: 10px; font-weight: 700; }
.video-feature .video-category { margin-bottom: 9px; padding: 3px 10px; border-radius: 4px; background: #c60018; }
.video-feature h3 { margin: 0; font-size: 23px; line-height: 1.85; }
.video-small { display: grid; grid-template-columns: 142px 1fr; align-items: center; gap: 14px; background: #970013; }
.video-small .video-copy { padding: 8px 0 8px 12px; }
.video-small h3 { display: -webkit-box; overflow: hidden; margin: 3px 0 0; font-size: 12px; line-height: 1.9; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.video-small .video-category { color: #ffd0d7; font-size: 9px; }
.video-small .video-play { width: 36px; height: 28px; border-radius: 6px; font-size: 15px; }
.video-item:focus-visible { box-shadow: inset 0 -3px 0 #fff !important; }
.video-item:hover .video-play { background: #970013; }
.video-more:hover { color: #fff; text-decoration: underline; }
.video-single .video-showcase { display: block; }
.video-single .video-feature { display: block; height: 440px; }
.home-sections > .home-videos { grid-column: 1 / -1; margin-block: 0; }
@media (max-width: 1200px) {
  .lead-layout { grid-template-columns: minmax(0,1fr) minmax(0,2.2fr) minmax(0,1fr); gap: 18px; }
  .panel-heading { font-size: 13px; padding-inline: 11px; }
  .news-rail-toggle { margin-inline-end: 8px; width: 28px; height: 28px; }
  .latest-list { padding-inline: 11px; }
  .latest-list li { gap: 7px; }
  .latest-list h3 { font-size: 11px; }
  .slide-copy { padding-inline: 20px; }
  .slide-copy h2 { font-size: 22px; }
  .news-card--editorial .card-title { font-size: 13px; }
  .share-tools--compact .share-icon { width: 28px; height: 28px; }
  .home-sections { grid-template-columns: repeat(var(--kn-home-tablet,2),minmax(0,1fr)); gap: 26px; }
  .home-sections > .news-section { grid-column: span var(--kn-section-tablet,1); }
}
@media (max-width: 800px) {
  .slide-link, .slide-image, .news-card, .card-image, .news-section, .home-videos, .video-item { border-radius: 0 !important; }
  .ktnews-placement--home { width: min(100%, 300px); aspect-ratio: 3 / 1; }
  .ktnews-placement--home.is-configured { width: min(100%, 300px); aspect-ratio: 3 / 1; }
  .ktnews-placement--home.has-mobile-ad { height: auto; min-height: 0; aspect-ratio: auto; overflow: visible; }
  .home-sections { grid-template-columns: minmax(0,1fr) !important; }
  .home-sections > .news-section { grid-column: 1 / -1 !important; }
  .home-sections .section-posts { grid-template-columns: minmax(0,1fr) !important; }
  .home-main { padding-block-start: 18px; }
  .lead-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 24px; margin-block-end: 28px; }
  .lead-stories { grid-column: 1; grid-row: 1; }
  .latest-panel { grid-column: 1; grid-row: 2; display: flex; }
  .editorial-panel { display: none; }
  .news-slider { height: auto; background: transparent; overflow: visible; border-radius: 0; }
  .slider-track { display: grid; gap: 22px; height: auto; }
  .lead-slide, .lead-slide:not(.is-current) { display: block; height: auto; }
  .slide-link { display: block; min-height: 0; height: auto; padding: 0; overflow: hidden; background: var(--kn-surface); border: 0; border-radius: 16px; color: var(--kn-text); box-shadow: 0 4px 16px #00000009; }
  .slide-link:hover { color: var(--kn-link); }
  .slide-image { width: 100%; aspect-ratio: 16/10; height: auto; min-height: 0; border-radius: 0; overflow: hidden; }
  .slide-image:after { display: none; }
  .slide-copy { padding: 18px 18px 22px; min-width: 0; align-self: auto; }
  .slide-copy h2 { font-size: 18px; line-height: 1.95; text-shadow: none; font-weight: 700; }
  .slide-meta { display: block; margin-block-end: 10px; }
  .slide-meta .category-label { display: inline-block; border: 0; padding: 4px 12px; background: var(--kn-accent); color: #fff; border-radius: 6px; font-size: 11px; margin: 0; }
  .slide-meta .post-date { display: none; }
  .slider-controls, .slider-dots { display: none; }
  .news-rail-viewport { height: 228px; }
  .latest-list { display: block; }
  .latest-list h3 { font-size: 12px; }
  .panel-heading { font-size: 16px; }
  .home-videos { padding: 18px; margin-block: 28px; border-radius: 12px; }
  .video-heading { margin-bottom: 16px; }
  .video-heading h2 { font-size: 22px; }
  .video-eyebrow, .video-more { font-size: 9px; }
  .video-showcase { display: flex; flex-direction: column; gap: 12px; }
  .video-feature, .video-single .video-feature { height: 260px; }
  .video-feature .video-copy { padding: 16px; }
  .video-feature h3 { font-size: 16px; }
  .video-feature .video-copy h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .video-feature .video-play { top: 30%; width: 52px; height: 40px; font-size: 22px; }
  .video-small { height: 94px; grid-template-columns: 112px 1fr; gap: 12px; }
  .video-small h3 { font-size: 11px; }
  .video-small .video-copy { padding-left: 10px; }
}
@media (max-width: 600px) {
  .ktnews-placement--home.is-configured { width: min(100%, 320px); aspect-ratio: 320 / 100; }
  .ktnews-placement--home.has-mobile-ad { height: auto; min-height: 0; aspect-ratio: auto; }
  .home-main { padding-block-start: 14px; }
  .ktnews-placement--home { margin-block: 0 26px; }
  .ktnews-placement--home small { font-size: 22px; }
  .home-sections { gap: 28px; }
  .layout-opinion .section-posts { grid-template-columns: minmax(0,1fr); padding: 14px; }
  .opinion-card__image { aspect-ratio: 16 / 9; }
  .home-sections .news-section:not(.special-block) { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .home-sections .section-posts { padding: 0; display: grid; gap: 11px; }
  .home-sections .news-card, .home-sections .layout-magazine .news-card--compact { padding: 12px; border: 0; border-radius: 17px; background: var(--kn-surface); }
  .home-sections .news-card .card-link, .home-sections .layout-magazine .news-card--standard .card-link { display: flex; align-items: flex-start; gap: 12px; color: var(--kn-text); }
  .home-sections .news-card .card-link:hover { color: var(--kn-link); }
  .home-sections .layout-grid .card-link { flex-direction: row; }
  .home-sections .layout-grid .card-image { flex: none; min-height: 0; }
  .home-sections .layout-grid .section-posts { grid-auto-rows: auto; }
  .home-sections .news-card .card-image, .home-sections .layout-magazine .news-card--standard .card-image { width: 88px; aspect-ratio: 4 / 3; flex: none; border-radius: 13px; }
  .home-sections .layout-magazine .news-card--standard .card-image:after { display: none; }
  .home-sections .news-card .card-copy, .home-sections .layout-magazine .news-card--standard .card-copy { padding: 0; flex: 1; min-width: 0; align-self: auto; }
  .home-sections .news-card .card-title, .home-sections .layout-magazine .news-card--standard .card-title { font-size: 14px; line-height: 1.95; font-weight: 500; margin: 0; min-height: 0; }
  .home-sections .news-card .post-date { display: none; }
  .home-sections .news-card .category-label, .home-sections .layout-magazine .news-card--standard .category-label, .home-sections .layout-magazine .news-card--compact .category-label { display: inline-flex; padding: 3px 8px; border: 0; border-radius: 4px; background: var(--kn-surface-alt); color: var(--kn-link); font-size: 10px; margin: 0; }
  .home-sections .style-dark .news-card { background: var(--kn-surface); }
  .home-sections .style-accent .section-heading { padding: 8px 10px; margin-block-end: 10px; border-radius: 6px; }
  .home-sections .special-block .section-heading { padding: 12px; }
}

.block-widgets .special-block-content > .widget { margin-block-end:20px; }
.block-widgets .special-block-content > .widget:last-child { margin-block-end:0; }
