/* Olszany.pl 0.1.28 — pełnowymiarowa lista aktualności */
.compact-news-grid{
  display:flex;
  flex-direction:column;
  gap:16px;
  align-items:stretch;
}
.compact-news-grid.is-masonry{
  display:flex;
  grid-auto-rows:auto;
  row-gap:16px;
}
.compact-feed-item{
  min-width:0;
  width:100%;
}
.compact-news-card{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  overflow:hidden;
  border-radius:24px;
  border:1px solid #d7e1db;
  background:#fff;
  box-shadow:0 12px 28px rgba(18,63,49,.06);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.compact-news-card:hover{
  transform:translateY(-2px);
  border-color:#c7d8d0;
  box-shadow:0 16px 34px rgba(18,63,49,.10);
}
.compact-news-card.has-media{
  grid-template-columns:minmax(0,1fr) minmax(260px, 36%);
}
.compact-media{
  order:2;
  min-height:220px;
  height:100%;
  overflow:hidden;
  background:#eef4f0;
  border-left:1px solid #e7efea;
}
.compact-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .28s ease;
}
.compact-news-card:hover .compact-media img{transform:scale(1.02)}
.compact-news-body{
  order:1;
  padding:24px 26px 20px;
}
.compact-news-card.no-media .compact-news-body{padding-top:24px}
.compact-card-top{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:0;
  min-width:0;
  margin-bottom:12px;
}
.compact-source{
  min-width:0;
  margin-left:0;
  margin-right:auto;
  flex:0 1 auto;
  order:0;
}
.compact-source>span:last-child{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:320px;
}
.compact-source .mini-logo{
  flex:0 0 auto;
  overflow:hidden;
  font-size:10px;
}
.compact-source .mini-logo img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.compact-news-card h3{
  font-size:20px;
  line-height:1.22;
  letter-spacing:-.02em;
  margin:0 0 10px;
}
.compact-preview{
  font-size:15px;
  line-height:1.6;
  color:#587068;
  margin:0 0 14px;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
}
.compact-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-top:12px;
  border-top:1px solid #edf2ef;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}
.compact-meta>span{min-width:0}
.compact-news-card.no-media{border-left:4px solid #d8e7df}

/* klikalne całe karty */
.compact-card-link{display:block;color:inherit;text-decoration:none;cursor:pointer}
.compact-card-link:visited{color:inherit}
.compact-card-link:focus-visible{outline:3px solid rgba(11,95,70,.28);outline-offset:3px}
.important-card-link{display:block;color:inherit;text-decoration:none;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease}
.important-card-link:hover{transform:translateY(-2px);box-shadow:0 15px 34px rgba(18,63,49,.12)}
.important-card-link:visited{color:inherit}

@media(max-width:1100px){
  .compact-news-card.has-media{grid-template-columns:minmax(0,1fr) minmax(220px, 33%)}
  .compact-source>span:last-child{max-width:250px}
}
@media(max-width:860px){
  .compact-news-card.has-media{grid-template-columns:1fr}
  .compact-media{
    order:1;
    min-height:210px;
    border-left:0;
    border-bottom:1px solid #e7efea;
  }
  .compact-news-body{order:2}
  .compact-source>span:last-child{max-width:190px}
}
@media(max-width:640px){
  .compact-news-grid,.compact-news-grid.is-masonry{gap:12px}
  .compact-news-card{border-radius:18px}
  .compact-media{min-height:180px}
  .compact-news-body{padding:16px 16px 15px}
  .compact-news-card h3{font-size:18px}
  .compact-preview{font-size:14px;line-height:1.5;-webkit-line-clamp:3}
  .compact-card-top{align-items:flex-start;gap:10px}
  .compact-source>span:last-child{max-width:160px}
  .compact-meta{font-size:11px}
}


/* 0.1.29 — naprawa kart z obrazkiem na stronie głównej */
.compact-news-card.compact-card-link{display:grid}
.compact-news-card.has-media .compact-media{max-height:260px}
@media(min-width:861px){
  .compact-news-card.has-media{align-items:stretch}
  .compact-news-card.has-media .compact-news-body{display:flex;flex-direction:column;justify-content:center}
}
@media(max-width:860px){
  .compact-news-card.compact-card-link{display:grid}
  .compact-news-card.has-media .compact-media{max-height:220px}
}


/* 0.1.30 — nazwa instytucji w lewym górnym rogu */
.compact-source{margin-left:0;margin-right:auto;order:0}
.compact-card-top{justify-content:flex-start}


/* 0.1.65 — czysty feed: bez zbędnych badge'y WYDARZENIE / OSP / WIDEO */
.compact-card-top{justify-content:flex-start;gap:0}
.compact-source{margin-left:0;margin-right:auto;order:0}


/* 0.1.66 — jedna karta dla każdej instytucji i każdego typu wpisu */
.compact-news-card{background:#fff}
.compact-news-card.no-media{border-left-color:#d8e7df}
.compact-news-card .compact-source{color:var(--green)}
.compact-meta{font-weight:400}

/* 0.1.67 — jeden kolor organizacji sterowany z Mega Admina */
.compact-news-card{
  border-left:4px solid var(--org-accent,#d8e7df)!important;
}
.compact-source .mini-logo{
  background:#fff!important;
  border:1px solid #e7eeea;
  overflow:hidden;
}
.compact-source .mini-logo img{
  object-fit:contain!important;
  padding:1px;
}


/* Olszany.pl 1.1.18 — na PC maks. 8 wpisów, na telefonie poziomy feed */
.home-news-feed .home-feed-item:nth-child(n+9){display:none}
.home-news-feed.is-expanded .home-feed-item:nth-child(n+9){display:block}
.home-feed-toggle{width:100%;margin-top:14px;border:1px solid #dce7e1;background:#fff;border-radius:16px;padding:12px 16px;display:flex;align-items:center;justify-content:center;gap:8px;color:#315e50;font-weight:900;cursor:pointer;box-shadow:0 6px 18px rgba(18,63,49,.05)}
.home-feed-toggle b{display:inline-grid;place-items:center;min-width:28px;height:28px;padding:0 7px;border-radius:999px;background:#edf5f1;color:#0b6b50}.home-feed-toggle small{font-size:11px;color:#7a8983}
.home-feed-toggle:hover{border-color:#c9dbd2;background:#fbfdfc}
@media(max-width:640px){
  .home-news-feed{display:flex!important;flex-direction:row!important;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;gap:12px!important;margin-inline:-10px;padding:2px 10px 12px;scrollbar-width:none}
  .home-news-feed::-webkit-scrollbar{display:none}
  .home-news-feed .home-feed-item,.home-news-feed .home-feed-item:nth-child(n+9){display:block!important;flex:0 0 min(86vw,360px);width:min(86vw,360px);scroll-snap-align:start}
  .home-news-feed .compact-news-card{height:100%}
  .home-feed-toggle{display:none}
}

/* Olszany.pl HOTFIX 1.1.20b — prosty placeholder z samą ikoną */
.compact-news-card.has-placeholder-media .compact-media{
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 78% 82%, rgba(255,255,255,.75) 0, rgba(255,255,255,0) 26%),
    linear-gradient(180deg,#f6faf8 0%,#eef4f0 100%);
}
.compact-news-card.has-placeholder-media .compact-media::before{
  content:"";
  position:absolute;
  width:156px;
  height:156px;
  border-radius:999px;
  background:var(--org-accent,#0B6B50);
  opacity:.10;
  right:-36px;
  bottom:-36px;
}
.compact-news-card.has-placeholder-media .compact-media::after{
  content:"";
  position:absolute;
  inset:14px;
  border-radius:22px;
  border:1px dashed rgba(11,95,70,.10);
}
.placeholder-media.icon-only .placeholder-icon.solo{
  position:relative;
  z-index:1;
  width:86px;
  height:86px;
  border-radius:24px;
  display:grid;
  place-items:center;
  font-size:42px;
  background:#fff;
  border:1px solid rgba(11,95,70,.10);
  box-shadow:0 14px 28px rgba(18,63,49,.08);
}
@media(max-width:860px){
  .compact-news-card.has-placeholder-media .compact-media::after{inset:12px;border-radius:18px}
  .placeholder-media.icon-only .placeholder-icon.solo{width:76px;height:76px;border-radius:22px;font-size:38px}
}
@media(max-width:640px){
  .compact-news-card.has-placeholder-media .compact-media::after{inset:10px;border-radius:16px}
  .placeholder-media.icon-only .placeholder-icon.solo{width:68px;height:68px;border-radius:20px;font-size:34px}
}
