/* ===========================================
   REALIZACJE — listing + masonry + lightbox
   Dopasowane do systemu: karty 1:1 z .real-thumb (santier.css, slider na froncie),
   chipy jak .chip (kariera.css), CTA = .cta-form (santier.css). Tokeny z :root.
   Zasada „kanciaste": border-radius:0 dla kart/zdjęć; zaokrąglone tylko chipsy/pastylka.
   =========================================== */

/* --- Filtr (chipy — kanon) --- */
.real-filtry { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.real-filtry .chip {
  border: 1px solid var(--gray-200, #e6e9ef); background: #fff; border-radius: 999px;
  padding: 9px 20px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--navy-deep, #0a1f38); transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.real-filtry .chip:hover { border-color: var(--navy-deep, #0a1f38); }
.real-filtry .chip.is-active { background: var(--navy-deep, #0a1f38); color: #fff; border-color: var(--navy-deep, #0a1f38); }

/* --- Masonry (wszystkie karty rozwinięte) --- */
.real-masonry { column-count: 3; column-gap: 20px; }
@media (max-width: 1080px) { .real-masonry { column-count: 2; } }
@media (max-width: 640px)  { .real-masonry { column-count: 1; } }

/* --- Karta realizacji (1:1 z .real-thumb na stronie głównej) --- */
.real-card {
  break-inside: avoid; margin: 0 0 20px; background: #fff;
  border: 1px solid var(--gray-200, #e6e9ef); border-radius: 0; overflow: hidden;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.real-card:hover { border-color: var(--gray-300, #d4d9e2); box-shadow: 0 14px 30px -20px rgba(10,31,56,.45); }
.real-card[hidden] { display: none; }

.real-card-cover { position: relative; aspect-ratio: 16 / 11; background: var(--gray-100, #eef1f6); overflow: hidden; }
.real-cover-btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: none; }
.real-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.88) brightness(.96); transition: filter .45s ease, transform .6s ease; }
.real-card:hover .real-card-cover img { filter: saturate(1) brightness(1); transform: scale(1.03); }
.real-cover-ph { filter: none !important; object-fit: contain !important; transform: none !important; }

/* Linia akcentu u dołu zdjęcia — rośnie od lewej na hover (jak .real-thumb-img::after) */
.real-card-cover::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--accent, #E84E1B); transform: scaleX(0); transform-origin: left center;
  transition: transform .5s cubic-bezier(.65,0,.35,1); z-index: 2;
}
.real-card:hover .real-card-cover::after { transform: scaleX(1); }

/* Licznik zdjęć — subtelna „frosted" pastylka, prawy dolny róg */
.real-cover-count {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(10,31,56,.55); color: #fff; font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: .2px;
  padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.real-cover-count::before {
  content: ''; width: 13px; height: 11px; flex-shrink: 0;
  background: currentColor;
  -webkit-mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h3l2-2h6l2 2h3v12H4z' fill='none' stroke='white' stroke-width='2'/%3E%3Ccircle cx='12' cy='13' r='3' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
          mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h3l2-2h6l2 2h3v12H4z' fill='none' stroke='white' stroke-width='2'/%3E%3Ccircle cx='12' cy='13' r='3' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
}

/* Badge typu obiektu — lewy górny róg zdjęcia, 1:1 z .real-thumb-badge na stronie głównej */
.real-badge {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  background: rgba(10,31,56,.85); color: #fff; font-size: 10.5px; font-weight: 600; line-height: 1.5;
  letter-spacing: .5px; text-transform: uppercase; padding: 5px 10px; border-radius: 0;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}

.real-card-body { padding: 18px 20px 20px; }
.real-card-title { margin: 0 0 5px; font-size: 16px; font-weight: 700; letter-spacing: -.2px; color: var(--navy-deep, #0a1f38); line-height: 1.25; }
.real-card-meta { margin: 0 0 12px; font-size: 13px; color: var(--gray-500, #6b7689); font-weight: 600; }
.real-card-zakres { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.6; color: var(--gray-700, #3A4252); }
.real-card-narr { margin-top: 14px; border-top: 1px solid var(--gray-200, #e6e9ef); padding-top: 12px; }
.real-card-narr + .real-card-narr { margin-top: 12px; }
.real-card-narr .nl { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent, #E84E1B); margin-bottom: 4px; }
.real-card-narr p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--gray-700, #3A4252); }

/* --- Zaufali nam (inwestorzy) --- */
.inwestor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.inwestor-cell {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 76px; padding: 18px 14px;
  background: #fff; border: 1px solid var(--gray-200, #e6e9ef); border-radius: 0;
  font-size: 15px; font-weight: 700; letter-spacing: -.2px; color: var(--navy-deep, #0a1f38);
  transition: border-color .25s ease, color .25s ease;
}
.inwestor-cell:hover { border-color: var(--gray-300, #d4d9e2); color: var(--accent, #E84E1B); }
@media (max-width: 860px) { .inwestor-grid { grid-template-columns: repeat(2, 1fr); } }

/* --- Lightbox (minimalny własny) --- */
.rx-lb { position: fixed; inset: 0; z-index: 9999; background: rgba(8,15,31,.95); display: none; align-items: center; justify-content: center; }
.rx-lb.is-open { display: flex; }
.rx-lb img { max-width: 90vw; max-height: 82vh; display: block; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); }
.rx-lb-close, .rx-lb-prev, .rx-lb-next {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 999px; font-size: 1.5rem; line-height: 1; transition: background .2s ease;
}
.rx-lb-close:hover, .rx-lb-prev:hover, .rx-lb-next:hover { background: var(--accent, #E84E1B); }
.rx-lb-close { top: 18px; right: 18px; }
.rx-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.rx-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.rx-lb-counter { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #fff; font-size: .85rem; letter-spacing: .5px; opacity: .85; }
