:root{
  --bg:#ffffff;
  --panel:#ffffff;
  --panel-2:#f6f6f6;
  --text:#0b0c10;
  --muted:#5f6368;
  --line:rgba(0,0,0,.12);
  --r-xl:13px;
  --r-lg:7px;
  --gap:18px;
  --pad:clamp(16px,3vw,28px);
  --max:1700px;
  --shadow:0 18px 40px rgba(0,0,0,.12);
}

*{ box-sizing:border-box; }

.case{
  background:var(--bg);
  color:var(--text);
  padding:clamp(20px,4vw,60px) 16px;
}

.case__grid{
  max-width:var(--max);
  margin:0 auto;
  display:grid;
  gap:var(--gap);
  width:100%;
  min-width:0;
}

/* panele: zawsze */
.case__title,.case__media,.case__desc {
  border:1px solid var(--line);
  border-radius:var(--r-xl);
  padding:var(--pad);
  box-shadow:var(--shadow);
  min-width:0;            /* krytyczne: pozwala się „ściskać” */
  max-width:100%;
}

/* grid-areas: zawsze (nie tylko desktop) */
.case__title{ grid-area:title; }
.case__media{ grid-area:media; padding:0; position:relative; }
.case__desc { grid-area:desc;  }

/* MOBILE: układ w kolumnie, bez wychodzenia poza grid */
@media (max-width: 991.98px){
  .case__grid{
    max-width:100%;
    grid-template-columns:1fr;
    grid-template-areas:
      "media"
      "title"
      "desc";
  }
}

/* DESKTOP */
@media (min-width: 992px){
  .case__grid{
    grid-template-columns:.95fr 1.35fr;
    grid-template-areas:"title media" "desc desc";
    align-items:stretch;
  }
}

/* TITLE */
.case__title{
  background:#000;
  background-image:
    linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55)),
    var(--case-bg, none);
  background-size:cover;
  background-repeat:no-repeat;
  color:#fff;
  border-color:rgba(255,255,255,.18);
  display:grid;
  justify-content:center;
  align-items:center;
}

.case__kicker{
  margin:0 0 10px;
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:rgba(255,255,255,.7);
}

.case__h1{
  position:relative;
  margin:0 0 14px;
  font-size:clamp(60px,6vw,78px);
  line-height:1.01;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:-0.02em;
  text-align:center;
  font-family:"Arial Black", Impact, "Helvetica Neue Condensed", system-ui, sans-serif;
  color:#fff;
}

.case__h1::after{
  content:attr(data-text);
  position:absolute;
  inset:0;
  background-image:var(--fp);
  background-repeat:no-repeat;
  background-size:30% auto;
  background-position:80% center;
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  pointer-events:none;
}

/* MEDIA (Twoja karuzela) */
.carousel{ position:relative; }

.carousel__track{
  display:flex;
  gap:12px;
  overflow:hidden;             /* nie pokazuj scrolla i nie wymuszaj szerokości */
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  scroll-behavior:smooth;
}

.carousel__slide{
  margin:0;
  flex:0 0 100%;
  aspect-ratio:4/3;
  scroll-snap-align:start;
  border-radius:5px;
  overflow:hidden;
  background:#eee;
  cursor:zoom-in;
}

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

.carousel__btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.85);
  color:#111;
  display:grid;
  place-items:center;
  cursor:pointer;
  z-index:3;
  box-shadow:0 10px 24px rgba(0,0,0,.12);
  user-select:none;
}
.carousel__btn span{ font-size:26px; line-height:1; }
.carousel__btn--prev{ left:10px; }
.carousel__btn--next{ right:10px; }

/* dots na obrazie (nie zabierają miejsca) */
.carousel__dots{
  position:absolute;
  left:50%;
  bottom:12px;
  transform:translateX(-50%);
  display:flex;
  gap:8px;
  z-index:5;
  pointer-events:auto;
}
.carousel__dot{
  width:9px;
  height:9px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.18);
  background:rgba(0,0,0,.14);
  cursor:pointer;
}
.carousel__dot[aria-current="true"]{ background:rgba(0,0,0,.55); }

/* DESC */
.case__desc{
  background:linear-gradient(180deg,var(--panel),var(--panel-2));
}

.case__lead{
  max-width:80ch;
  font-size:18px;
  line-height:1.6;
  margin:0 0 18px;
}

.case__content{
  color:var(--muted);
}


.realizacje-section {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}

/* =====================
   PARALLAX TYPO BACKGROUND (style like reference)
   NOTE: Real parallax requires updating --scroll via JS (see script below).
===================== */
.realizacje-parallax{
  position:fixed;
  top: 17vh;
  pointer-events:none;
  z-index:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8vh;
  opacity:1;
  transition:opacity .25s ease;
}

/* aktywne tylko gdy sekcja w viewport */
.realizacje-section.is-parallax-active .realizacje-parallax{
  opacity:1;
}

.parallax-text{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:0.15em;
  font-weight:900;
  text-transform:uppercase;
  line-height:0.92;
  letter-spacing:-0.035em;
  will-change:transform;
  user-select:none;
}

/* „far” look: big, tight, soft */
.parallax-text span{
  font-size:clamp(64px, 12vw, 168px);
  padding:0;
  margin:0;
  background:linear-gradient(180deg, rgba(60,170,255,.95), rgba(0,60,160,.95));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  -webkit-text-fill-color:transparent;
  opacity:0.22;
  filter:blur(.25px);
  text-shadow:0 18px 60px rgba(0,0,0,.18);
}

/* dodatkowa miękkość jak na referencji */
.parallax-text::before{
  content:"";
  position:absolute;
  inset:-20vh -20vw;
  background:radial-gradient(closest-side, rgba(0,70,170,.22), transparent 60%);
  opacity:.45;
  transform:translateZ(0);
}

.parallax-text--top{
  align-items:center;
  text-align:center;
  transform:translate3d(0, calc(var(--scroll, 0px) * 0.18), 0);
}

.parallax-text--bottom{
  align-items:center;
  text-align:center;
  transform:translate3d(0, calc(var(--scroll, 0px) * -0.18), 0);
}

.post-type-archive-realizacje .entry-content,
.post-type-archive-realizacje .wp-site-blocks {
  max-width: none;
}

*, *::before, *::after { box-sizing: border-box; }

.ui-head__titleText{
  background-image:url('https://evartsolutions.pl/wp-content/uploads/2025/12/realizacje_header.png') !important;
}

/* =====================
   SECTION WRAPPER
===================== */
.realizacje-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.realizacje-inner{
  padding-left: 30px;
  padding-right: 30px;
  width: 100%;
}
/* 
.realizacje-section::before {
  content: "";
  position: fixed;     
  inset: 0;
  background: #000 url('https://evartsolutions.pl/wp-content/uploads/2025/12/realizacje_tlo.png')
    center / cover no-repeat;
  z-index: -1;
}
*/
/* =====================
   HEADER
===================== */
.realizacje-header {
  max-width: 1200px;
  margin: 0 auto 48px;
  padding: 100px 12px 0;
}

.realizacje-heading {
  margin: 0 0 12px;
  font-size: 36px;
  line-height: 1.1;
  font-weight: 800;
  color: #fff;
  position: relative;
  padding-left: 18px;
}

.realizacje-heading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  height: 32px;
  width: 3px;
  background: #C8F753;
}

.realizacje-heading::after {
  content: "";
  position: absolute;
  left: 0;
  top: 42px;
  width: 160px;
  height: 3px;
  background: #C8F753;
}

.realizacje-intro {
  margin: 0;
  max-width: 70ch;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 575.98px) {
  .realizacje-heading {
    font-size: 28px;
  }

  .realizacje-intro {
    font-size: 15px;
  }
}

/* =====================
   GRID
===================== */
.realizacje-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
}

/* =====================
   TILE
===================== */
.realizacja-tile {
  grid-column: span 4;
  position: relative;
  min-height: 260px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  padding-bottom: 24px;
}

/* === BACKGROUND IMAGE === */
.realizacja-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.45s ease;
}

/* === OVERLAY === */
.realizacja-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  transition: opacity 0.3s ease;
}

/* === WATERMARK === */
.realizacja-watermark {
  position: absolute;
  right: 18px;
  bottom: 38px;
  width: 140px;
  opacity: 0.18;
  filter: grayscale(100%);
  transition: opacity 0.3s ease;
}

/* === CONTENT === */
.realizacja-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 22px 22px 0;
  transform: translateY(-20px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  transition: opacity 0.3s ease;
}

.realizacja-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  position: relative;
  padding-left: 14px;
  padding-top: 8px;
}

.realizacja-title::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 9px;
  height: 26px;
  width: 2px;
  background: #C8F753;
}

.realizacja-title::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 34px;
  width: 130px;
  height: 2px;
  background: #C8F753;
}

.realizacja-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  max-width: 42ch;
}

/* === CTA === */
.realizacja-cta {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.realizacja-cta span {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* === HOVER STATES === */
.realizacja-tile:hover .realizacja-bg {
  transform: scale(1.06);
}

.realizacja-tile:hover .realizacja-overlay,
.realizacja-tile:hover .realizacja-watermark,
.realizacja-tile:hover .realizacja-content {
  opacity: 0;
}

.realizacja-tile:hover .realizacja-cta {
  opacity: 1;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 991.98px) {
  .realizacja-tile {
    grid-column: span 6;
  }
}

@media (max-width: 575.98px) {
  .realizacja-tile {
    grid-column: span 12;
  }
}