/* =========================================================
   PS BLOG ARCHIVE (home + category)
========================================================= */

:root{
  --ps-ba-primary: var(--polsteam-primary, #00357d);
  --ps-ba-text: #171718;

  --ps-ba-line: rgba(0,0,0,.55);
  --ps-ba-line-soft: rgba(0,0,0,.18);

  --ps-ba-max: 1200px;

  /* pozycja markera w oknie listy (0..1) */
  --ps-ba-marker-pos: .32;

  /* gdzie ma stać pionowa linia względem startu prawej kolumny */
  --ps-ba-line-x: -22px;

  /* fade “w dół” (JS) */
  --ps-ba-fade-range: 720; /* px */
  --ps-ba-fade-min: .22;   /* min opacity */
}

/* nie robimy tu padding-top “na pałę” */
.ps-ba{
  background:#fff;
  color:var(--ps-ba-text);
}

/* HERO / BREADCRUMB
   - padding-top sterowany JS na podstawie realnej wysokości headera */
.ps-ba__hero{
  max-width:var(--ps-ba-max);
  margin:0 auto;
  padding: calc(var(--ps-ba-header-offset, 120px)) 20px 0;
}

.ps-ba__hero h1,
.ps-ba__hero .ps-ba__title{
  margin:0 0 12px;
  border:0 !important;
  text-decoration:none !important;
  font-family:"Teko", sans-serif;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.02em;
  font-size: 30px;
  line-height: 1.05;
}

.ps-breadcrumb{
  font-size:14px;
  color: rgba(0,0,0,.55);
  margin:0 0 10px;
}
.ps-breadcrumb a{
  color: inherit;
  text-decoration:none;
}
.ps-breadcrumb a:hover{ text-decoration:underline; }
.ps-breadcrumb__sep{ margin:0 8px; }

/* WRAP */
.ps-ba__wrap{
  max-width:var(--ps-ba-max);
  margin:0 auto;
  padding: 34px 20px 84px;
}

.ps-ba__grid{
  display:grid;
  grid-template-columns: 340px 1fr;
  gap:44px;
  align-items:start;
}

/* LEWA DATA */
.ps-ba__date{
  position:sticky;
  top:140px;
  align-self:start;
}

.ps-ba__date-inner{
  display:flex;
  align-items:flex-start;
}

.ps-ba__ym{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  line-height:1;
}

.ps-ba__year{
  font-family: "Teko", sans-serif;
  font-weight:700;
  letter-spacing:.5px;
  font-size:clamp(64px, 6.2vw, 108px);
  color:var(--ps-ba-primary);
}

.ps-ba__month{
  margin-top:2px;
  font-family: "Teko", sans-serif;
  font-weight:500;
  letter-spacing:.2px;
  font-size:clamp(40px, 3.5vw, 72px);
  color:rgba(23,23,24,.82);
}

/* separator + lista kategorii pod datą */
.ps-ba__cats{
  margin-top:22px;
}

.ps-ba__cats-sep{
  height:1px;
  background: rgba(0,0,0,.14);
  margin:0 0 14px;
}

.ps-ba__cats-title{
  font-family: "Teko", sans-serif;
  font-weight:500;
  letter-spacing:.2px;
  font-size:27px;
  margin:0 0 10px;
  color:rgba(0,0,0,.72);
}

.ps-ba__cats-nav{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.ps-ba__catlink{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  font-family: "Teko", sans-serif;
  font-weight:500;
  letter-spacing:.2px;
  font-size:21px;
  line-height:1;
  color:rgba(0,0,0,.78);
  transition:transform 180ms ease, color 180ms ease;
  padding:2px 0;
}

.ps-ba__catlink:hover{
  transform: translateX(8px);
  color:rgba(0,0,0,.92);
}

.ps-ba__catlink.is-current{
  color: var(--ps-ba-primary);
}

.ps-ba__catlink:focus-visible{
  outline:none;
  box-shadow:0 0 0 4px rgba(0,53,125,.22);
  border-radius:10px;
  padding:6px 8px;
  margin-left:-8px;
}

/* nie chcemy dodatkowej pionowej kreski */
.ps-ba__divider{ display:none !important; }

/* PRAWA LISTA */
.ps-ba__rail{
  position:relative;
  min-height:70vh;
  padding-left:22px;
}

/* jedyna pionowa linia */
.ps-ba__rail::before{
  content:"";
  position:absolute;
  left: var(--ps-ba-line-x);
  top:0;
  bottom:0;
  width:1px;
  background:var(--ps-ba-line);
  opacity:.9;
  pointer-events:none;
}

/* marker */
.ps-ba__marker{
  position:absolute;
  left: var(--ps-ba-line-x);
  top: var(--ps-ba-marker-y, 220px);
  width:0;
  height:0;
  border-top:10px solid transparent;
  border-bottom:10px solid transparent;
  border-left:12px solid var(--ps-ba-line);
  pointer-events:none;
  opacity:.92;
}

/* maski góra/dół */
.ps-ba__mask{
  position:absolute;
  left:0;
  right:0;
  top:0;
  bottom:0;
  pointer-events:none;
  background:
    linear-gradient(to bottom, #fff 0%, rgba(255,255,255,.94) 16%, rgba(255,255,255,0) 34%),
    linear-gradient(to top,    #fff 0%, rgba(255,255,255,.94) 16%, rgba(255,255,255,0) 34%);
  background-repeat:no-repeat;
  background-size:100% 50%;
  background-position:top, bottom;
  opacity:1;
}

/* scroll container */
.ps-ba__list{
  height: min(72vh, 720px);
  overflow:auto;
  scroll-behavior:smooth;
  padding: 0 10px 0 0;
  scrollbar-width:none;
}
.ps-ba__list::-webkit-scrollbar{ width:0; height:0; }

/* ITEM */
.ps-ba__item{
  position:relative;
  padding:22px 0 22px;
  border-bottom:1px solid var(--ps-ba-line-soft);
  transition:transform 180ms ease;
  will-change: transform, opacity;
}
.ps-ba__item:last-child{ border-bottom:0; }

/* meta */
.ps-ba__meta{
  display:flex;
  align-items:center;
  gap:12px;
  font-size:13px;
  color:rgba(0,0,0,.40);
  margin-bottom:6px;
}
.ps-ba__meta-cat{ font-weight:500; }
.ps-ba__meta-date{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.ps-ba__meta-date i{
  font-size:12px;
  opacity:.85;
}

/* tytuł */
.ps-ba__title{
  font-family: "Poppins", sans-serif;
  font-weight:700;
  font-size:clamp(18px, 1.35vw, 22px);
  margin:0 0 6px;
  color:rgba(0,0,0,.82);
}

/* excerpt */
.ps-ba__excerpt{
  margin:0;
  font-family: "Poppins", sans-serif;
  font-size:14px;
  line-height:1.6;
  color:rgba(0,0,0,.55);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* link całej karty */
.ps-ba__link{
  position:absolute;
  inset:0;
  text-indent:-9999px;
  overflow:hidden;
}

/* hover: tylko lekki zoom-out */
.ps-ba__item:hover{
  transform:scale(.985);
}

/* focus (WCAG) */
.ps-ba__item:focus-within{
  outline:3px solid rgba(0,53,125,.30);
  outline-offset:4px;
  border-radius:10px;
}

/* mniej ruchu */
@media (prefers-reduced-motion: reduce){
  .ps-ba__item,
  .ps-ba__catlink{ transition:none; }
  .ps-ba__list{ scroll-behavior:auto; }
}

/* MOBILE */
@media (max-width: 991px){
  .ps-ba__grid{
    grid-template-columns: 1fr;
    gap:18px;
  }

  /* NA MOBILE chowamy całą lewą kolumnę (data + kategorie) */
  .ps-ba__date{
    display:none !important;
  }

  .ps-ba__rail{
    padding-left:18px;
  }

  :root{
    --ps-ba-line-x: -18px;
  }

  .ps-ba__list{
    height: auto;            /* full height */
    max-height: none;
    overflow: visible;       /* scroll całej strony */
  }

  /* marker i maski nie przeszkadzają na mobile */
  .ps-ba__mask{ display:none; }
  .ps-ba__marker{ display:none; }
  .ps-ba__rail::before{ display:none; }
}
