.site-header{
  position: sticky; top:0; z-index:50;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-muted);
}
.header__row{display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 0}
.brand{display:flex; flex-direction:column; gap:4px}
.brand__name{font-weight:800}
.nav ul{list-style:none; margin:0; padding:0; display:flex; gap:12px}
.nav a{padding:8px 10px; border-radius:12px}
.nav a:hover{background:var(--highlight)}
.header__cta{display:flex; gap:10px}

.section{padding:26px 0}
.section__head{display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:14px}
.section__head h1,.section__head h2{margin:0}
.section__head p{margin:6px 0 0}

.grid{display:grid; gap:18px}
.grid--2{grid-template-columns:1fr 1fr}
@media (max-width: 980px){ .grid--2{grid-template-columns:1fr} .nav--desktop{display:none} }

.card{
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--surface-1) 92%, #ffffff 8%);
  border: 1px solid var(--border-muted);
  box-shadow: var(--shadow-sm);
}
.card__in{padding:18px}
.card__top{display:flex; align-items:center; justify-content:space-between; gap:10px}
.card__title{margin:0; font-size:var(--fs-3)}
.excerpt{margin:10px 0 0; color:var(--text-muted)}
.meta{margin:8px 0 0; color:var(--text-muted); font-size:var(--fs-1)}
.badge,.chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border-muted);
  background: var(--highlight);
  font-size:var(--fs-1);
}

.badge-wazne{
  --glow-bg: linear-gradient(to left, #f7ba2b 0%, #ea5358 100%);
  display:inline-flex;
  padding:3px;
  border-radius:999px;
  background:var(--glow-bg);
  position:relative;
  z-index:1;
  overflow:visible;
  flex-shrink:0;
  opacity:0;
  transition:opacity .5s;
}
.badge-wazne::after{
  position:absolute;
  content:"";
  top:4px; left:0; right:0;
  z-index:-1;
  height:100%; width:100%;
  transform:scale(0.85);
  filter:blur(10px);
  background:var(--glow-bg);
  transition:opacity .5s;
}
.badge-wazne__inner{
  background:#181818;
  color:#181818;
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:var(--fs-1);
  font-weight:bold;
  letter-spacing:.05em;
  white-space:nowrap;
  transition:color 1s;
}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:10px 14px;
  border-radius: 14px;
  border:0;
  background: color-mix(in oklab, var(--surface-1) 92%, #ffffff 8%);
  text-decoration:none;
  font-weight:650;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .10);
}
.btn:hover{
  background: var(--highlight);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
}
.btn--primary{
  background: linear-gradient(135deg, var(--az-btn-grad-1), var(--az-btn-grad-2));
  border:0;
  color: var(--on-primary);
  box-shadow: var(--az-btn-shadow);
}
.btn--primary:hover{
  background: linear-gradient(135deg, var(--az-btn-grad-1), var(--az-btn-grad-2));
  color: var(--on-primary);
  box-shadow: var(--az-btn-shadow-hover);
}
.btn--ghost{
  background: color-mix(in oklab, var(--surface-1) 80%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--text) 14%, transparent);
}
.btn--small{padding:8px 10px; font-size:var(--fs-1)}

.tabs{display:flex; gap:10px; margin: 10px 0 18px}
.tab{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border-muted);
  background: color-mix(in oklab, var(--surface-1) 92%, #ffffff 8%);
}
.tab.is-active{background: var(--highlight)}

.site-footer{border-top:1px solid var(--border-muted); padding:22px 0}
.footer__grid{display:grid; grid-template-columns:1fr 1fr; gap:16px}
.footer__right{text-align:right}
.footer__policy{margin-top:10px}
@media (max-width: 980px){ .footer__grid{grid-template-columns:1fr} .footer__right{text-align:left} }

.map{border-radius: var(--radius); overflow:hidden; border:1px solid var(--border-muted)}

.card__media-link{
  display:block;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  overflow:hidden;
}

.card__media{
  display:block;
  width:100%;
  aspect-ratio:16/9;
  object-fit:contain;
  background: color-mix(in oklab, var(--surface-2) 88%, transparent);
}

.card__media-link--placeholder{
  position: relative;
  background: color-mix(in oklab, var(--surface-2) 88%, transparent);
  display:flex;
  align-items:center;
  justify-content:center;
}

.card__media-link--placeholder::before{
  content:"";
  display:block;
  padding-top:56.25%;
}

.card__media-placeholder-svg{
  position:absolute;
  inset:0;
  margin:auto;
  width: 76px;
  height: 76px;
  fill: color-mix(in oklab, var(--text) 68%, transparent);
}

.card--osoba .card__in--row{
  display:grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items:center;
  padding: 14px;
}

.card--osoba .avatar{
  width: 62px;
  height: 62px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-muted);
  background: color-mix(in oklab, var(--surface-2) 88%, transparent);
  box-shadow: var(--shadow-sm);
}

.card--osoba .avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.card--osoba .avatar .avatar__pagon{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  padding: 3px;
}

.card--osoba .avatar__ph{
  width:100%;
  height:100%;
}

.card--osoba .card__body{
  min-width:0;
}

.card--osoba .card__title{
  margin:0;
}

.card--osoba .meta{
  margin: 4px 0 0;
}

.card--osoba .actions{
  margin-top: 6px;
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}

.osoba-badges{
  margin-top: 6px;
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
  gap: 5px;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width: thin;
  min-height: 30px;
  padding-bottom: 1px;
}

.osoba-badge{
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border: 1px solid var(--border-muted);
  background: color-mix(in oklab, var(--surface-1) 94%, #fff 6%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .14);
  overflow:hidden;
  transition: box-shadow .16s ease, border-color .16s ease;
  transform-origin: center;
}

.osoba-badge.is-pagon{
  width: 22px;
  height: 30px;
  flex: 0 0 22px;
  border-radius: 4px;
}

.osoba-badge:hover{
  box-shadow: 0 5px 12px rgba(0, 0, 0, .2);
  border-color: color-mix(in oklab, var(--primary) 45%, var(--border-muted));
}

.osoba-badge img{
  width: 17px;
  height: 17px;
  object-fit: contain;
  display:block;
  transition: transform .16s ease;
}

.osoba-badge.is-pagon img{
  width: 92%;
  height: 92%;
  margin: 0 auto;
}

.osoba-badge svg{
  width: 15px;
  height: 15px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition: transform .16s ease;
}

.osoba-badge:hover img,
.osoba-badge:hover svg{
  transform: scale(1.4);
}
/* =========================================
   SINGLE POST — premium layout + featured image guard
========================================= */

/* kontener treści posta */
.single .site-main .container{
  max-width: min(var(--container), 78ch);
}

/* obrazek wyróżniający i obrazki w treści — kontrola */
.single .entry-content img,
.single .post-thumbnail img,
.single .wp-post-image{
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* jeśli motyw renderuje featured image jako .post-thumbnail / .wp-post-image */
.single .post-thumbnail,
.single .wp-post-image{
  display: block;
  margin: 14px 0 18px;
}

/* HARD GUARD: jeśli obraz jest pionowy, wymuś 16:9 i cover */
.single .post-thumbnail img,
.single img.wp-post-image{
  width: 100%;
  max-height: min(52vh, 520px);
  object-fit: cover;
  object-position: center;
}

/* ===== FB Post Card ===== */
.fb-card{
  cursor: pointer;
  outline: none;
  transition: transform .55s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow .55s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.fb-card:focus-visible{ box-shadow: 0 0 0 2px var(--primary); }

/* --- Card WITH image: image on top, always visible --- */
.fb-card--media{
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fb-card--media:hover{
  transform: scale(1.03);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--primary) 24%, transparent),
    0 10px 22px rgba(0,0,0,.22);
}

/* Image container — adapts to natural image height */
.fb-card__media{
  width: 100%;
  min-height: 200px;
  max-height: 420px;
  overflow: hidden;
  position: relative;
  background: var(--surface-2);
  flex-shrink: 0;
}
.fb-card__img{
  width: 100%;
  height: auto;
  display: block;
  min-height: 200px;
  object-fit: cover;
  object-position: center top;
}

/* --- Card WITHOUT image: plain text card --- */
.fb-card--text{
  display: flex;
  flex-direction: column;
}
.fb-card--text:hover{
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(0,0,0,.14);
}

/* Card body (below image or standalone) */
.fb-card__body{
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Shared text/action styles */
.fb-card__text{
  font-size: var(--fs-1);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  flex: 1;
  color: var(--text-muted);
}
.fb-card__actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ===== Carousel ===== */
/* Card carousel — natural flow inside .fb-card__media */
.fb-carousel{
  position: relative;
  width: 100%;
  display: block;
}

/* Modal carousel — swipe area */
.fb-modal__carousel{
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius) var(--radius) 0 0;
  touch-action: pan-y;
  cursor: grab;
  flex-shrink: 0;
}
.fb-modal__carousel:active{ cursor: grabbing; }

.carousel__btn{
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 2;
  background: rgba(0,0,0,.5);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background .2s;
}
.carousel__btn:hover{ background: rgba(0,0,0,.75); }
.carousel__btn--prev{ left: 8px; }
.carousel__btn--next{ right: 8px; }
.carousel__counter{
  position: absolute;
  bottom: 8px; right: 10px;
  font-size: .72rem;
  color: #fff;
  background: rgba(0,0,0,.45);
  border-radius: 8px;
  padding: 2px 7px;
  pointer-events: none;
}

/* ===== FB Post Modal ===== */
.fb-modal{
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.78);
  display: flex; align-items: center; justify-content: center;
  padding: 56px 16px 16px;
  backdrop-filter: blur(4px);
}
.fb-modal__box{
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Topbar: licznik + close */
.fb-modal__topbar{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-muted);
  flex-shrink: 0;
}
.fb-modal__counter{
  font-size: .8rem;
  color: var(--text-muted);
  margin-right: auto;
  padding-left: 4px;
}
.fb-modal__close{
  background: transparent;
  border-radius: 50%;
  padding: 6px;
}

/* Strzałki nawigacji po bokach overlay */
.fb-modal__nav{
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,.14);
  border: none;
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background .18s;
  flex-shrink: 0;
}
.fb-modal__nav:hover{ background: rgba(255,255,255,.28); }
.fb-modal__nav--prev{ left: 12px; }
.fb-modal__nav--next{ right: 12px; }

/* na touch (mobile) chowamy strzałki — jest swipe */
@media (hover: none){
  .fb-modal__nav{ display: none; }
  .fb-modal{ padding: 48px 8px 8px; }
}

/* Desktop: side-by-side — obraz po lewej, tekst po prawej */
@media (min-width: 640px) and (hover: hover){
  .fb-modal__box.fb-modal__box--has-media{
    max-width: 900px;
    display: grid;
    grid-template-areas:
      "img top"
      "img body";
    grid-template-columns: 55% 1fr;
    grid-template-rows: auto 1fr;
    max-height: 88vh;
    overflow: hidden;
  }
  .fb-modal__box.fb-modal__box--has-media .fb-modal__topbar{
    grid-area: top;
    border-bottom: 1px solid var(--border-muted);
    border-left: 1px solid var(--border-muted);
  }
  .fb-modal__box.fb-modal__box--has-media .fb-modal__carousel{
    grid-area: img;
    max-height: 88vh;
    border-radius: var(--radius) 0 0 var(--radius);
  }
  .fb-modal__box.fb-modal__box--has-media .fb-modal__img{
    max-height: 88vh;
    height: 100%;
  }
  .fb-modal__box.fb-modal__box--has-media .fb-modal__body{
    grid-area: body;
    overflow-y: auto;
    border-left: 1px solid var(--border-muted);
  }
}

.fb-modal__img{
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  background: #000;
  display: block;
}
.fb-modal__body{
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fb-modal__text{
  white-space: pre-wrap;
  line-height: 1.6;
  margin: 0;
}

