/* Pełne aktualności D11. Wartości bazowe porównane z widokiem D7. */
@media (min-width: 901px) {
  #newsDetail.news-article-layout {
    /* Dotychczas: 2.25fr / .8fr, odstęp 34px, minimum prawej 285px.
       Przenosimy dokładnie 40px z prawej kolumny do lewej. */
    grid-template-columns: minmax(0, 1fr) max(245px, calc((100% - 34px) * .262295081967 - 40px));
    gap: 34px;
  }
  #newsDetail > .news-article-sidebar {
    margin-top: var(--kb-article-sidebar-offset, 0px);
  }
  #newsDetail .news-detail-head {
    /* Nagłówek biegnie od lewej do prawej krawędzi całego układu. */
    width: var(--kb-article-full-width, 100%);
    max-width: none;
  }
}

#newsDetail .news-detail-head h1 {
  width: 100%;
  max-width: none;
  margin: 0 0 28px;
  text-align: left;
  text-wrap: wrap;
  overflow-wrap: anywhere;
  font-size: 48.5px;
  line-height: 1.1;
}

#newsDetail #newsDetailBody {
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.4285714286;
}
#newsDetailBody :where(p, li, td, th, blockquote) {
  font-size: 15px;
  line-height: 1.4285714286;
}
#newsDetailBody p { margin: 0 0 10.5px; }
#newsDetailBody :is(ul, ol) { margin-block: 0 10.5px; }
#newsDetailBody :is(h1, h2, h3) {
  margin: 21px 0 10.5px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
#newsDetailBody h1 { font-size: 48.5px; }
#newsDetailBody h2 { font-size: 32px; }
#newsDetailBody h3 { font-size: 23px; }

/* Jedno istniejące łącze obejmuje zarówno fotografię, jak i tytuł. */
#newsDetail #newsArticleLatest {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
#newsDetail #newsArticleLatest > .news-side-item {
  display: block;
  position: relative;
  isolation: isolate;
  aspect-ratio: 290 / 190;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  background: #24211f;
  color: #fff;
  text-decoration: none;
}
#newsDetail #newsArticleLatest > .news-side-item::after {
  content: "";
  position: absolute;
  inset: 28% 0 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, .92));
}
#newsDetail #newsArticleLatest > .news-side-item img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  transition: transform 600ms ease-in-out;
}
#newsDetail #newsArticleLatest > .news-side-item > span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 17px;
  z-index: 2;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .65);
}
#newsDetail #newsArticleLatest > .news-side-item:is(:hover, :focus-visible) img {
  transform: scale(1.05);
}
#newsDetail #newsArticleLatest > .news-side-item:focus-visible {
  outline: 3px solid #c42424;
  outline-offset: -3px;
}

@media (max-width: 900px) {
  #newsDetail > .news-article-sidebar { margin-top: 0; }
  #newsDetail > .news-article-sidebar > section:first-child { grid-column: 1 / -1; }
  #newsDetail #newsArticleLatest { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  #newsDetail .news-detail-head h1 { font-size: 32px; margin-bottom: 22px; }
  #newsDetailBody h1 { font-size: 32px; }
  #newsDetailBody h2 { font-size: 26px; }
  #newsDetailBody h3 { font-size: 22px; }
  #newsDetail #newsArticleLatest { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  #newsDetail #newsArticleLatest > .news-side-item img { transition: none; }
  #newsDetail #newsArticleLatest > .news-side-item:is(:hover, :focus-visible) img { transform: none; }
}

/* Małe zdjęcia list i tagów: stała ramka zapobiega nachodzeniu na tekst. */
.news-page :is(.news-latest, .news-side-item, .news-tag-item) > .kb-news-thumbnail {
  display: block;
  min-width: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  line-height: 0;
}
.news-page .news-latest > .kb-news-thumbnail { width: 95px; height: 58px; }
.news-page .news-side-item > .kb-news-thumbnail { width: 96px; height: 64px; }
.news-page #newsTags .news-tag-item > .kb-news-thumbnail { width: 96px; height: 56px; }
.news-page .kb-news-thumbnail > img,
.news-page #newsTags .kb-news-thumbnail > img {
  display: block;
  position: static;
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0;
  object-fit: contain;
  transform: scale(1);
  transition: transform 600ms ease-in-out;
}
@media (hover: hover) {
  .news-page :is(.news-latest, .news-side-item, .news-tag-item):hover .kb-news-thumbnail > img {
    transform: scale(1.05);
  }
}
.news-page :is(.news-latest, .news-side-item, .news-tag-item):focus-visible .kb-news-thumbnail > img {
  transform: scale(1.05);
}
@media (max-width: 620px) {
  .news-page .news-side-item > .kb-news-thumbnail { width: 82px; height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .news-page .kb-news-thumbnail > img,
  .news-page #newsTags .kb-news-thumbnail > img { transition: none; transform: none !important; }
}
