/* dobre_audio_news — styl działu treści. Korzysta ze zmiennych Bootstrap/Hummingbird. */

.dn-list,
.dn-post,
.dn-home {
  --dn-radius: 12px;
  --dn-gap: 1.25rem;
  --dn-border: var(--bs-border-color, #dee2e6);
  --dn-muted: var(--bs-secondary-color, #6c757d);
  --dn-surface: var(--bs-tertiary-bg, #f8f9fa);
  --dn-accent: var(--bs-primary, #0b69f6);
}

/* ---------- zakładki typów ---------- */
.dn-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1.5rem;
}
.dn-tabs__item {
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--dn-border);
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.dn-tabs__item:hover { background: var(--dn-surface); }
.dn-tabs__item.is-active {
  background: var(--dn-accent);
  border-color: var(--dn-accent);
  color: #fff;
}

/* ---------- układ lista + panel boczny ---------- */
.dn-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
@media (min-width: 992px) {
  .dn-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}

/* ---------- kafelki ---------- */
.dn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--dn-gap);
}
.dn-grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (min-width: 992px) {
  .dn-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dn-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.dn-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--dn-border);
  border-radius: var(--dn-radius);
  background: var(--bs-body-bg, #fff);
  overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.dn-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}
.dn-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--dn-surface);
  overflow: hidden;
}
.dn-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dn-card__img--empty { background: var(--dn-surface); }
.dn-card__body {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem;
  flex: 1;
}
.dn-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .75rem;
  font-size: .8125rem;
  color: var(--dn-muted);
}
.dn-card__meta a { color: var(--dn-accent); text-decoration: none; font-weight: 600; }
.dn-card__meta a:hover { text-decoration: underline; }
.dn-card__title {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.35;
}
.dn-card__title a { color: inherit; text-decoration: none; }
.dn-card__title a:hover { color: var(--dn-accent); }
.dn-card__excerpt {
  margin: 0;
  color: var(--dn-muted);
  font-size: .9375rem;
}

/* wyróżniony wpis */
.dn-card--hero { margin-bottom: var(--dn-gap); }
.dn-card--hero .dn-card__media { aspect-ratio: 21 / 9; }
.dn-card--hero .dn-card__body { padding: 1.5rem; }
.dn-card--hero .dn-card__title { font-size: 1.5rem; }
@media (min-width: 768px) {
  .dn-card--hero { flex-direction: row; }
  .dn-card--hero .dn-card__media { flex: 0 0 55%; aspect-ratio: auto; min-height: 280px; }
  .dn-card--hero .dn-card__body { justify-content: center; }
}

/* plakietki */
.dn-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  padding: .25rem .625rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  background: var(--dn-accent);
}
.dn-badge--nowosc { background: #198754; }
.dn-badge--polecamy { background: #d63384; }
.dn-badge--inline { position: static; display: inline-block; }

/* ---------- paginacja ---------- */
.dn-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin: 2rem 0 0;
}
.dn-pagination__item {
  min-width: 2.5rem;
  padding: .5rem .75rem;
  text-align: center;
  border: 1px solid var(--dn-border);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}
.dn-pagination__item:hover { background: var(--dn-surface); }
.dn-pagination__item.is-current {
  background: var(--dn-accent);
  border-color: var(--dn-accent);
  color: #fff;
}
.dn-empty { padding: 2rem 0; color: var(--dn-muted); }

/* ---------- panel boczny ---------- */
.dn-sidebar { display: flex; flex-direction: column; gap: var(--dn-gap); }
.dn-box {
  padding: 1.25rem;
  border: 1px solid var(--dn-border);
  border-radius: var(--dn-radius);
  background: var(--bs-body-bg, #fff);
}
.dn-box__title { margin: 0 0 .75rem; font-size: 1.0625rem; }
.dn-cats { list-style: none; margin: 0; padding: 0; }
.dn-cats a {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem .75rem;
  margin: 0 -.75rem;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}
.dn-cats a:hover { background: var(--dn-surface); }
.dn-cats a.is-active { color: var(--dn-accent); font-weight: 700; }
.dn-cats__count { color: var(--dn-muted); font-size: .875rem; }
.dn-best { list-style: none; margin: 0; padding: 0; display: grid; gap: .875rem; }
.dn-best__item { display: flex; gap: .75rem; align-items: center; }
.dn-best__img { flex: 0 0 64px; }
.dn-best__img img { display: block; width: 64px; height: 64px; object-fit: contain; border-radius: 8px; }
.dn-best__info { display: flex; flex-direction: column; min-width: 0; }
.dn-best__name { color: inherit; text-decoration: none; font-size: .9375rem; line-height: 1.3; }
.dn-best__name:hover { color: var(--dn-accent); }
.dn-best__price { font-weight: 700; }

/* ---------- strona wpisu ---------- */
/* Nagłówek, treść i panel boczny startują z tej samej lewej krawędzi (kontener strony) */
.dn-article__header { max-width: 820px; margin: 0 0 1.5rem; text-align: left; }
.dn-article__badges { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.dn-pill {
  padding: .25rem .75rem;
  border-radius: 999px;
  background: var(--dn-accent);
  color: #fff;
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
}
.dn-pill--ghost { background: var(--dn-surface); color: inherit; border: 1px solid var(--dn-border); }
.dn-article__title { margin: 0 0 .75rem; line-height: 1.2; }
.dn-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  color: var(--dn-muted);
  font-size: .9375rem;
}
.dn-article__lead { margin: 1rem 0 0; font-size: 1.125rem; color: var(--bs-secondary-color, #495057); }
.dn-article__cover { margin: 1.5rem 0 0; max-width: 820px; }
.dn-article__cover img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--dn-radius);
}
.dn-article__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  margin: 0;
}
@media (min-width: 992px) {
  .dn-article__layout { grid-template-columns: minmax(0, 820px) 300px; }
}
.dn-article__side { align-self: start; }
@media (min-width: 992px) {
  /* motyw ma przyklejony nagłówek (~130 px) — odsuwamy panel pod niego */
  .dn-article__side { position: sticky; top: 9rem; max-height: calc(100vh - 10rem); overflow-y: auto; }
}
.dn-article__main { min-width: 0; }

/* spis treści */
.dn-toc {
  margin: 0 0 1.5rem;
  border: 1px solid var(--dn-border);
  border-radius: var(--dn-radius);
  background: var(--dn-surface);
}
.dn-toc details { padding: .875rem 1.25rem; }
.dn-toc__title { cursor: pointer; font-weight: 700; }
.dn-toc__list { margin: .75rem 0 0; padding-left: 1.25rem; }
.dn-toc__item { margin: .25rem 0; }
.dn-toc__item--l3 { margin-left: 1rem; list-style: circle; font-size: .9375rem; }
.dn-toc a { color: inherit; text-decoration: none; }
.dn-toc a:hover { color: var(--dn-accent); text-decoration: underline; }

/* treść */
.dn-content { font-size: 1.0625rem; line-height: 1.7; }
.dn-content h2, .dn-content h3 { scroll-margin-top: 1.5rem; margin: 2rem 0 .75rem; line-height: 1.3; }
.dn-content img { max-width: 100%; height: auto; border-radius: 8px; }
.dn-content table { max-width: 100%; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* wideo */
.dn-video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0 0 1.5rem;
  border-radius: var(--dn-radius);
  overflow: hidden;
  background: #000;
}
.dn-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* FAQ */
.dn-faq { margin: 2.5rem 0 0; }
.dn-faq__title { font-size: 1.375rem; margin: 0 0 1rem; }
.dn-faq__item {
  border: 1px solid var(--dn-border);
  border-radius: 10px;
  margin-bottom: .625rem;
  background: var(--bs-body-bg, #fff);
}
.dn-faq__item summary { cursor: pointer; padding: .875rem 1.125rem; font-weight: 600; }
.dn-faq__item[open] summary { border-bottom: 1px solid var(--dn-border); }
.dn-faq__item p { margin: 0; padding: .875rem 1.125rem; }

/* stopka wpisu */
.dn-article__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 0;
  padding: 1rem 0;
  border-top: 1px solid var(--dn-border);
}
.dn-share { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.dn-share__label { color: var(--dn-muted); }
.dn-share__link {
  padding: .25rem .75rem;
  border: 1px solid var(--dn-border);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  font-size: .875rem;
}
.dn-share__link:hover { background: var(--dn-surface); }
.dn-back { color: var(--dn-accent); text-decoration: none; }

/* sekcje pod wpisem */
.dn-products, .dn-related { margin: 3rem 0 0; }
.dn-section-title { font-size: 1.5rem; margin: 0 0 1.25rem; }
.dn-products__more { margin: 1.25rem 0 0; text-align: center; }

/* ---------- karta produktu w treści ---------- */
.dn-pbox {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.75rem 0;
  padding: 1.25rem;
  border: 1px solid var(--dn-border);
  border-radius: var(--dn-radius);
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}
@media (min-width: 576px) {
  .dn-pbox { flex-direction: row; align-items: center; }
}
.dn-pbox--ranked { padding-left: 3.75rem; }
.dn-pbox__place {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--dn-accent);
  color: #fff;
  font-weight: 800;
  font-size: .9375rem;
}
.dn-pbox__img { flex: 0 0 160px; }
.dn-pbox__img img { display: block; width: 160px; height: 160px; object-fit: contain; }
.dn-pbox__body { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; min-width: 0; }
.dn-pbox__label {
  padding: .125rem .625rem;
  border-radius: 999px;
  background: #fff3cd;
  color: #664d03;
  font-size: .75rem;
  font-weight: 700;
}
.dn-pbox__name { font-size: 1.125rem; font-weight: 700; color: inherit; text-decoration: none; line-height: 1.3; }
.dn-pbox__name:hover { color: var(--dn-accent); }
.dn-pbox__note { margin: 0; color: var(--dn-muted); font-size: .9375rem; }
.dn-pbox__prices { display: flex; align-items: baseline; gap: .625rem; }
.dn-pbox__price { font-size: 1.375rem; font-weight: 800; }
.dn-pbox__regular { color: var(--dn-muted); text-decoration: line-through; }

/* siatka produktów w treści */
.dn-pgrid { margin: 2rem 0; }
.dn-pgrid__title { margin: 0 0 1rem; }

/* tabela porównawcza */
.dn-compare { margin: 2rem 0; }
.dn-compare__title { margin: 0 0 1rem; }
.dn-compare__scroll {
  overflow-x: auto;
  border: 1px solid var(--dn-border);
  border-radius: var(--dn-radius);
}
.dn-compare__table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .9375rem; }
.dn-compare__table th, .dn-compare__table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--dn-border);
  vertical-align: middle;
  text-align: left;
}
.dn-compare__table tbody th { background: var(--dn-surface); font-weight: 600; width: 22%; }
.dn-compare__product { text-align: center !important; min-width: 150px; vertical-align: top !important; }
.dn-compare__img img { display: block; margin: 0 auto .5rem; width: 96px; height: 96px; object-fit: contain; }
.dn-compare__name { color: inherit; font-weight: 700; text-decoration: none; }
.dn-compare__name:hover { color: var(--dn-accent); }
.dn-compare__table tbody td { text-align: center; }
.dn-compare__regular { color: var(--dn-muted); font-size: .8125rem; }
.dn-compare__row:last-child th, .dn-compare__row:last-child td { border-bottom: 0; }

/* ---------- blok na stronie głównej / w kategorii ---------- */
.dn-home { margin: 2.5rem 0; }
.dn-home--category { margin: 2.5rem 0 1rem; }
.dn-home__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.dn-home__head .section-title { margin: 0; }
.dn-home__all { color: var(--dn-accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.dn-home__all:hover { text-decoration: underline; }

/* newsletter w ramce */
.dn-box--newsletter > * { margin-top: 0; }

/* Widget ps_emailsubscription jest projektowany pod szeroką stopkę (siatka col-lg-*).
   W wąskim panelu bocznym układamy go w jednej kolumnie. */
.dn-box--newsletter { padding: 0; overflow: hidden; }
.dn-box--newsletter .ps-emailsubscription {
  padding: 1.25rem !important;
  background: transparent !important;
}
.dn-box--newsletter .container { max-width: none; padding: 0; }
.dn-box--newsletter .row { flex-direction: column; flex-wrap: nowrap; gap: .75rem; margin: 0; }
.dn-box--newsletter .row > * { width: 100%; max-width: 100%; flex: 0 0 auto; padding: 0; margin: 0; }
.dn-box--newsletter .h3 { font-size: 1.0625rem; line-height: 1.35; margin: 0; }
.dn-box--newsletter form .d-flex { flex-direction: column; align-items: stretch !important; }
.dn-box--newsletter form .form-control { width: 100%; min-width: 0; }
.dn-box--newsletter form .btn { width: 100%; }
.dn-box--newsletter .form-check { display: flex; gap: .5rem; align-items: flex-start; padding-left: 0; }
.dn-box--newsletter .form-check-input { flex: 0 0 auto; margin: .2rem 0 0; float: none; }
.dn-box--newsletter .form-check-label { font-size: .8125rem; line-height: 1.4; }
