/* =============================================================
   BACKFIST DOJO | LISTY ARTYKULOW JOOMLA | GLOBAL PREMIUM v3.0
   Joomla / Helix Ultimate

   Dziala na WSZYSTKICH listach .article-list w #sp-component.
   Bez powiazania z identyfikatorami menu ani kategoriami.
   Nie zmienia widoku pojedynczego artykulu.

   ZASTAP caly stary CSS PREMIUM v1/v2. Nie doklejaj pod nim.
   ============================================================= */

/* Zmienne tylko dla list artykulow. */
#sp-component .article-list {
  --bf-red: #ed686a;
  --bf-dark: #191a1f;
  --bf-muted: #6b6d76;
  --bf-line: #e6e6eb;
  margin: 0 auto;
}

/* Tlo oraz szerokosc w widokach list kategorii i wyroznionych. */
body:is(.view-category, .view-featured) #sp-main-body {
  background: #f6f6f8;
}
body:is(.view-category, .view-featured) #sp-main-body > .container {
  width: 1280px;
  max-width: 1280px;
  margin-inline: auto;
}

/* Wiersze i rowna wysokosc kart. Zachowujemy kolumny Joomla. */
#sp-component .article-list .row {
  row-gap: 28px;
}
#sp-component .article-list .row > [class*="col-"] {
  display: flex;
}

/* Karta artykulu. */
#sp-component .article-list .article {
  position: relative;
  isolation: isolate;
  display: flex !important;
  flex-direction: column !important;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--bf-line) !important;
  border-radius: 4px;
  box-shadow: 0 5px 18px rgba(20,22,30,.035), 0 16px 44px rgba(20,22,30,.035);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
#sp-component .article-list .article:is(:hover, :focus-within) {
  transform: translateY(-5px);
  border-color: #ecb7b8 !important;
  box-shadow: 0 16px 48px rgba(20,22,30,.11);
}

/* Obraz wprowadzenia: 16:10, bez deformacji. */
#sp-component .article-list .article .article-intro-image {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #e8e8eb;
}
#sp-component .article-list .article .article-intro-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  border: 0 !important;
  transition: transform .55s cubic-bezier(.2,.65,.3,1);
}
#sp-component .article-list .article:hover .article-intro-image img {
  transform: scale(1.045);
}

/* Zastepcza plansza dla artykulow bez obrazu wprowadzenia. */
@supports selector(.article:has(img)) {
  #sp-component .article-list .article:not(:has(.article-intro-image img))::before {
    content: "BACKFIST DOJO\A ARTYKULY";
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    padding: 20px;
    white-space: pre-line;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 2;
    letter-spacing: 2px;
    text-align: center;
    background:
      radial-gradient(circle at 82% 12%, rgba(237,104,106,.36), transparent 35%),
      linear-gradient(138deg, #24252c, #111216);
  }
}

/* Wnetrze karty. Puste introtext nie zajmuje miejsca. */
#sp-component .article-list .article :is(.article-body, .articleBody) {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column !important;
  min-width: 0;
  padding: 25px 25px 24px !important;
}
#sp-component .article-list .article .article-introtext {
  display: none !important;
}

/* Tytuly: 20 px. Link obejmuje cala karte. */
#sp-component .article-list .article .article-header {
  position: static !important;
  order: 0;
  margin: 0 0 18px !important;
}
#sp-component .article-list .article .article-header :is(h2,h3) {
  position: static !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--bf-dark) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  letter-spacing: -.35px;
  text-align: left !important;
  text-transform: none !important;
  overflow-wrap: anywhere;
}
#sp-component .article-list .article .article-header :is(h2,h3) a {
  position: static !important;
  color: var(--bf-dark) !important;
  text-decoration: none !important;
  transition: color .2s ease;
}
#sp-component .article-list .article .article-header :is(h2,h3) a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: pointer;
}
#sp-component .article-list .article:hover .article-header :is(h2,h3) a {
  color: #d9545b !important;
}
#sp-component .article-list .article .article-header :is(h2,h3) a:focus-visible {
  outline: 2px solid var(--bf-red);
  outline-offset: 4px;
}

/* Data, bez zbednych metadanych. */
#sp-component .article-list .article .article-info {
  order: -1;
  display: flex !important;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin: 0 0 15px !important;
  padding: 0 !important;
  color: var(--bf-muted) !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  letter-spacing: .75px;
  text-transform: uppercase;
}
#sp-component .article-list .article .article-info :is(.createdby, .category-name, .hits),
#sp-component .article-list .article .readmore {
  display: none !important;
}
#sp-component .article-list .article .article-info :is(.published, .create)::before {
  display: none !important;
}

/* Wizualny przycisk CTA wewnatrz klikanej karty. */
#sp-component .article-list .article :is(.article-body, .articleBody)::after {
  content: "PRZECZYTAJ ARTYKUŁ  ↗";
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 48px;
  margin-top: auto;
  padding: 13px 16px;
  color: #fff;
  background: var(--bf-dark);
  border: 1px solid var(--bf-dark);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .8px;
  text-align: center;
  pointer-events: none;
  transition: background .2s ease, border-color .2s ease;
}
#sp-component .article-list .article:hover :is(.article-body, .articleBody)::after {
  background: #d9545b;
  border-color: #d9545b;
}

/* Paginacja. */
body:is(.view-category, .view-featured) #sp-component .pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 38px;
}
body:is(.view-category, .view-featured) #sp-component .pagination .page-link {
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  color: #191a1f;
  background: #fff;
  border: 1px solid #e6e6eb;
  border-radius: 2px;
  text-decoration: none;
}
body:is(.view-category, .view-featured) #sp-component .pagination .active .page-link,
body:is(.view-category, .view-featured) #sp-component .pagination .page-link:hover {
  color: #fff;
  background: #ed686a;
  border-color: #ed686a;
}

/* Standard szerokosci JAPI. */
@media (max-width: 1599px) {
  body:is(.view-category, .view-featured) #sp-main-body > .container {
    width: 1120px;
    max-width: 1120px;
  }
}
@media (max-width: 1199px) {
  body:is(.view-category, .view-featured) #sp-main-body > .container {
    width: 920px;
    max-width: 920px;
  }
  #sp-component .article-list .article .article-header :is(h2,h3) {
    font-size: 19px !important;
  }
}
@media (max-width: 991px) {
  body:is(.view-category, .view-featured) #sp-main-body > .container {
    width: 720px;
    max-width: 720px;
  }
  #sp-component .article-list .row > [class*="col-"] {
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
  }
}
@media (max-width: 767px) {
  body:is(.view-category, .view-featured) #sp-main-body > .container {
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
  }
  #sp-component .article-list .row {
    row-gap: 18px;
  }
  #sp-component .article-list .row > [class*="col-"] {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }
  #sp-component .article-list .article :is(.article-body, .articleBody) {
    padding: 23px 20px 21px !important;
  }
  #sp-component .article-list .article .article-header :is(h2,h3) {
    font-size: 20px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #sp-component .article-list .article,
  #sp-component .article-list .article .article-intro-image img,
  #sp-component .article-list .article .article-header :is(h2,h3) a {
    transition: none !important;
  }
}


/* Odstęp między wierszami kart artykułów */
#sp-component .article-list > .row:not(:last-child) {
    margin-bottom: 28px !important;
}

@media (max-width: 767px) {
    #sp-component .article-list > .row:not(:last-child) {
        margin-bottom: 18px !important;
    }
}