:root {
  --orange:    #e8600a;
  --orange-h:  #c94e00;
  --dark-bg:   #1e2a3a;
  --card-head: #28374c;
  --light-bg:  #f2f4f7;
  --text:      #222b38;
  --text-mid:  #4a5568;
  --text-muted:#6b7a90;
  --border:    #dde3ec;
  --fh: 'Oswald', sans-serif;
  --fb: 'Source Sans 3', sans-serif;
}

body { font-family: var(--fb); color: var(--text); background: #b8bec8; margin: 0; }
a { text-decoration: none; }

/* Stylizacja tooltipa na wzór Firefox / Modern UI */
.tooltip-inner {
  max-width: 400px !important;
  background-color: #e1f0ff !important; /* Jasny błękitny */
  color: #000 !important;              /* Czarne litery */
  border: 1px solid #b3d7ff;           /* Delikatna obwódka */
  text-align: left;
  padding: 8px 12px;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Miękki cień */
}

/* Ukrywamy standardową strzałkę lub zmieniamy jej kolor na błękitny */
.bs-tooltip-top .tooltip-arrow::before { border-top-color: #b3d7ff !important; }
.bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color: #b3d7ff !important; }
.bs-tooltip-start .tooltip-arrow::before { border-left-color: #b3d7ff !important; }
.bs-tooltip-end .tooltip-arrow::before { border-right-color: #b3d7ff !important; }

/* ── PAGE WIDTH ── */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 60px rgba(0,0,0,.3);
  overflow: hidden;
  position: relative;
}

/* ── NAV ── */
.navbar { border-bottom: 1px solid rgba(255,255,255,.08); padding: 0; min-height: 46px; background: linear-gradient(180deg, #16202e 0%, #0f1620 100%);}
.navbar-nav .nav-link {
  color: #c8d4e4 !important;
  font-size: 0.78rem; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  padding: 5px 13px !important; border-radius: 3px;
  transition: color .18s, background .18s;
}
.navbar-nav .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.07); }
.navbar-toggler { border: none; padding: 4px; }
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon { filter: invert(1) brightness(2); width: 20px; height: 20px; }

/* ── HERO ── */
.hero {
  padding: 20px 20px;
  text-align: center;
  background: url("../pict/tlo.jpg") center/cover no-repeat;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 0;
}

.hero * { position: relative; z-index: 1; }

/* Nadpisujemy Bootstrapowe d-flex na mobile */
.hero-top {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}

.hero-logo {
  width: 128px;
  flex-shrink: 0;
  /* Zamiast gap - margines prawy dla logo na desktopie */
  margin-right: 50px;
}

.hero-text {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-sub {
  color: #b8cce0;
  font-size: 1rem;
  font-style: italic;
  max-width: 460px;
  /* Wyrównanie do lewej krawędzi tekstu powyżej */
  margin: 6px 0 0 0 !important;
  text-align: left;
  animation: fadeUp .65s .2s ease both;
}

.hero h1 {
  font-family: var(--fh);
  font-size: clamp(1.4rem, 4vw, 2.8rem);
  font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: #fff; line-height: 1.05;
  animation: fadeUp .65s ease both;
  padding-bottom: 0;
  margin-bottom: 0;
}
.hero-tagline {
  font-family: var(--fh); font-size: clamp(0.95rem,2.2vw,1.25rem);
  font-style: italic; color: #b8cce0;
  animation: fadeUp .65s .1s ease both;
}

.hero-btns { animation: fadeUp .65s .3s ease both; }



/* ── PRZYCISKI ── */
.btn-orange {
  display: inline-block;
  background: var(--orange, #ff6600);
  color: #fff !important;
  padding: 12px 24px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.2s;
}

.btn-ghost {
  display: inline-block;
  border: 1px solid #fff;
  color: #fff !important;
  padding: 12px 24px;
  border-radius: 5px;
  text-decoration: none;
}

/* ── RWD MOBILE ── */
@media (max-width: 767px) {
  .hero-top {
    flex-direction: column !important;
  }

  .hero-logo {
    /* Na mobile usuwamy boczny margines, dajemy dolny */
    margin-right: 0;
    margin-bottom: 20px;
  }

  .hero-text {
    text-align: center !important;
    align-items: center;
  }

  .hero-sub {
    /* Na mobile centrujemy blok i tekst */
    margin: 14px auto 0 !important;
    text-align: center;
  }
}

*/
/* ── BUTTONS ── */
.btn-orange {
  background: var(--orange); color: #fff; border: none;
  font-family: var(--fh); font-size: 0.9rem; font-weight: 600; letter-spacing: .5px;
  padding: 11px 24px; border-radius: 4px;
  box-shadow: 0 4px 16px rgba(232,96,10,.4);
  transition: background .18s, transform .14s, box-shadow .18s;
  text-decoration: none; display: inline-block;
}
.btn-orange:hover { background: var(--orange-h); color:#fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,96,10,.55); }
.btn-ghost {
  background: transparent; color: #fff;
  font-family: var(--fh); font-size: 0.9rem; font-weight: 600; letter-spacing: .5px;
  padding: 9px 24px; border-radius: 4px; border: 2px solid rgba(255,255,255,.3);
  transition: border-color .18s, background .18s, transform .14s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
}
.btn-ghost:hover { border-color: rgba(255,255,255,.65); background: rgba(255,255,255,.05); color:#fff; transform: translateY(-2px); }
.btn-svc, .btn-why {
  background: var(--orange); color: #fff; border: none;
  font-family: var(--fh); font-size: 0.83rem; font-weight: 600; letter-spacing: .4px;
  padding: 8px 18px; border-radius: 4px;
  transition: background .18s, transform .13s;
  text-decoration: none; display: inline-block;
}
.btn-why {    margin-top: auto;
  align-self: flex-start; }

.btn-svc:hover, .btn-why:hover { background: var(--orange-h); color:#fff; transform: translateY(-1px); }
.btn-svc-outline, .btn-why-outline {
  background: transparent; color: var(--text);
  font-family: var(--fh); font-size: 0.83rem; font-weight: 600; letter-spacing: .4px;
  padding: 6px 18px; border-radius: 4px; border: 2px solid #bcc8d8;
  transition: background .18s, border-color .18s;
  text-decoration: none; display: inline-block;
}
.btn-svc-outline:hover, .btn-why-outline:hover { background: var(--light-bg); border-color: #9aaabb; color: var(--text); }

/* ── DARK THIN DIVIDER (between dark sections) ── */
.div-dark {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12) 30%, rgba(255,255,255,.12) 70%, transparent);
}
/* ── LIGHT THIN DIVIDER (between white sections) ── */
.div-light {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
}

/* ── SECTION TITLE WITH FLANKING GRADIENT LINES ── */
.titled-section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.titled-section-head::before,
.titled-section-head::after {
  content: '';
  flex: 1;
  height: 1px;
}
.titled-section-head::before {
  background: linear-gradient(90deg, transparent 0%, #aab5c2 100%);
}
.titled-section-head::after {
  background: linear-gradient(90deg, #aab5c2 0%, transparent 100%);
}
.titled-section-head h2 {
  font-family: var(--fh); font-size: clamp(1.3rem,3vw,1.75rem);
  font-weight: 700; color: var(--text); letter-spacing: .4px;
  margin: 0; white-space: nowrap;
}

/* ── SERVICE CARDS ── */
.svc-card {
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
  background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.05); height: 100%;
  transition: box-shadow .22s, transform .22s;
    display: flex;
    flex-direction: column;
}
.svc-card:hover { box-shadow: 0 8px 26px rgba(0,0,0,.11); transform: translateY(-3px); }
.svc-head { background: var(--card-head); padding: 15px 18px; display: flex; align-items: center; gap: 10px; }
.svc-head-title { font-family: var(--fh); font-size: 0.98rem; font-weight: 600; color: #fff; letter-spacing: .3px; margin: 0; }
.svc-body { padding: 16px 18px 20px; display: block; height: 100%; font-size: 0.86rem; color: var(--text-mid); }
.svc-body-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.svc-body .btn-svc,
.svc-body .btn-svc-outline,
.svc-body-inner .btn-svc,
.svc-body-inner .btn-svc-outline
{ margin-top: auto; display: inline-block; width: auto; align-self: flex-start;  }
.svc-list { list-style: none; padding: 0; margin-bottom: 14px; }
.svc-list li { font-size: 0.86rem; color: var(--text-mid); padding: 3px 0 3px 14px; position: relative; }
.svc-list li::before { content: '•'; color: var(--orange); font-weight: 900; position: absolute; left: 0; top: 0.2em;}

.svc-img {
  float: right;           /* Przesuwa obrazek do prawej krawędzi */
  width: 300px;           /* Szerokość obrazka (dostosuj wg uznania) */
  height: auto;           /* Zachowuje proporcje */
  margin-left: 20px;      /* Tworzy odstęp tekstu od lewej krawędzi zdjęcia */
  margin-bottom: 15px;    /* Odstęp od tekstu poniżej */
  border-radius: 8px;     /* Opcjonalnie: zaokrąglone rogi */
}

.svc-img-left {
  float: left;           /* Przesuwa obrazek do prawej krawędzi */
  width: 300px;           /* Szerokość obrazka (dostosuj wg uznania) */
  height: auto;           /* Zachowuje proporcje */
  margin-left: 20px;      /* Tworzy odstęp tekstu od lewej krawędzi zdjęcia */
  margin-bottom: 15px;    /* Odstęp od tekstu poniżej */
  border-radius: 8px;     /* Opcjonalnie: zaokrąglone rogi */
}
/* To ważne: zapobiega "wyciekaniu" obrazka poza tło karty */
.svc-body::after {
  content: "";
  display: table;
  clear: both;
}

/* ── WHY SECTION ── */
.why-wrap { background: var(--light-bg); }
.why-card {
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  padding: 18px 10px 14px; text-align: center;
  box-shadow: 0 1px 5px rgba(0,0,0,.04); height: 100%;
  transition: box-shadow .22s, transform .22s;
  display: flex;
  flex-direction: column;
  display: flex;
  height: 100%; /* upewnij się, że karty w rzędzie mają tę samą wysokość */
}
.why-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.09); transform: translateY(-4px); }
.why-icon {
  width: 46px; height: 46px; aborder-radius: 50%; abackground: var(--light-bg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  margin: 0 auto 12px;
  font-size: 2rem;
}
.why-label { font-size: 0.79rem; font-weight: 600; color: var(--text); line-height: 1.35;   min-height: 42px; /* dopasuj do najdłuższego nagłówka */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;}
.why-text  { font-size: 0.79rem; font-weight: normal; color: var(--text); line-height: 1.35; text-align:left; margin-top: 12px;  /* wyrównuje dół */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.why-text .btn-why,
.why-text .btn-why-outline { margin-top: auto;    display: inline-block; width: auto; align-self: flex-start; }

/* ── PORTFOLIO ── */

.port-item {
  border-radius: 5px; overflow: hidden; background: var(--card-head);
  height: 130px; display: flex; flex-direction: column; cursor: pointer;
  transition: transform .22s, box-shadow .22s;
}
.port-item:hover { transform: scale(1.04); box-shadow: 0 8px 22px rgba(0,0,0,.22); }
.port-img {
  flex: 1;
  background: linear-gradient(135deg, #1e2d3e, #2c3f55);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  min-height: 0; /* To rozwiązuje problem wypychania labela */
}
.port-img img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Wypełni obszar, przycinając boki (najlepsze dla galerii) */
  display: block;
}
.port-label-bar {
  height: 30px; background: #e4e8ed;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.port-label-bar span {
  font-family: var(--fh); font-size: 0.73rem; font-weight: 600;
  color: var(--text); letter-spacing: .3px;
}
.btn-port {
  background: var(--card-head); color: #fff; border: none;
  font-family: var(--fh); font-size: 0.86rem; font-weight: 600; letter-spacing: .4px;
  padding: 11px 24px; border-radius: 4px;
  transition: background .18s, transform .14s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
}
.btn-port:hover { background: #364a62; color:#fff; transform: translateY(-2px); }

/* ── DIY + CONTACT ── */
.diy-contact-wrap {
    padding-left: 24px;
    padding-right: 24px;
    background: url("../pict/tlo.jpg") center/cover no-repeat;
    position: relative;
}

.diy-contact-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.25);
    z-index: 0;
}

.diy-contact-wrap * {
    position: relative;
    z-index: 1;
}


.diy-title {
  font-family: var(--fh); font-size: clamp(1.8rem,4vw,2.6rem);
  font-weight: 700; color: #fff; text-transform: uppercase;
  letter-spacing: 2px; line-height: 1;
}
.diy-title,
.diy-sub,
.diy-list,
.btn-orange {
    margin-left: 4px;
}

.diy-divider {
  height: 2px;
  background: linear-gradient(90deg, var(--orange) 0%, #5a6a7e 55%, transparent 100%);
  margin-bottom: 8px;
}
.diy-sub { color: #d0dce8; font-weight: 600; font-size: 0.9rem; }
.diy-list { list-style: none; padding: 0; }
.diy-list li { color: #94adca; font-size: 0.89rem; padding: 5px 0; display: flex; align-items: center; gap: 9px; }
.diy-list li::before { content: '✓'; color: var(--orange); font-weight: 700; }
.contact-box { background: #fff; border-radius: 7px; box-shadow: 0 4px 30px rgba(0,0,0,.3);      padding: 24px; }
.contact-box h3 { font-family: var(--fb); font-size: 0.95rem; font-weight: 400; color: var(--text); }
.contact-box h3 strong { font-weight: 700; }
.contact-box .form-control {
  border: 1px solid var(--border); border-radius: 4px;
  font-family: var(--fb); font-size: 0.85rem; color: var(--text);
  transition: border-color .18s, box-shadow .18s;
}
.contact-box .form-control:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232,96,10,.1); }
.attach-row {
  background: none; border: none; font-family: var(--fb);
  font-size: 0.79rem; color: var(--text-muted); cursor: pointer; padding: 0;
  display: flex; align-items: center; gap: 6px;
}
.btn-send {
  width: 100%; background: var(--orange); color: #fff; border: none;
  font-family: var(--fh); font-size: 0.9rem; font-weight: 600; letter-spacing: .4px;
  padding: 11px; border-radius: 4px; transition: background .18s;
}
.btn-send:hover { background: var(--orange-h); }
.contact-info { border-top: 1px solid var(--border); }
.contact-info p { font-size: 0.83rem; color: var(--text-mid); margin: 0; }
.contact-info p a { color: var(--text-mid); }

/* ── FOOTER ── */
.footer-wrap { border-top: 1px solid rgba(255,255,255,.07);   border-top: 1px solid rgba(255,255,255,.06); background: linear-gradient(180deg, #16202e 0%, #0f1620 100%);
  }
.footer-copy { font-size: 0.75rem; color: #94adca; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #94adca; text-decoration: none; transition: color .18s; }
.footer-links a:hover { color: #fff; }

/* ── ANIMATION ── */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .titled-section-head h2 { font-size: 1.1rem; }
  .port-item { height: 100px; }
}

/* PAGE HEADER */
.page-header { padding:3px 28px 28px; text-align:center; }
.page-header h1 { font-family:var(--fh); font-size:clamp(2rem,5vw,3rem); font-weight:700; text-transform:uppercase; letter-spacing:2px; color:var(--orange); margin-bottom:16px; }
.page-header .lead-line { font-size:1rem; color:var(--text-mid); margin-bottom:4px; }
.page-header .lead-sub  { font-size:.92rem; color:var(--text-muted); margin-bottom:0; }

/* KALKULATORY */
.calc-section { padding:20px 24px 24px; }
.calc-card { border:1px solid var(--border); border-radius:6px; overflow:hidden; background:#fff; box-shadow:0 1px 6px rgba(0,0,0,.05); height:100%; display:flex; flex-direction:column; transition:box-shadow .2s,transform .2s; cursor:pointer; }
.calc-card:hover { box-shadow:0 6px 20px rgba(0,0,0,.1); transform:translateY(-2px); }
.calc-label { font-size:.7rem; font-weight:600; text-transform:uppercase; letter-spacing:.4px; color:var(--text-muted); padding:10px 12px 0; }
.calc-name { font-family:var(--fh); font-size:.86rem; font-weight:600; padding:2px 12px 8px; line-height:1.25; min-height: 3.2em; overflow: hidden;}
.calc-name.orange { color:var(--orange); }
.calc-name.dark   { color:var(--text); }
.calc-thumb { flex:1; min-height:88px; background:linear-gradient(135deg,#e8ecf0,#d0d8e4); display:flex; align-items:center; justify-content:center; font-size:2.6rem; overflow:hidden; }
.calc-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.calc-btn { display:block; text-align:center; background:var(--light-bg); border-top:1px solid var(--border); font-family:var(--fh); font-size:.82rem; font-weight:700; letter-spacing:.4px; color:var(--text); padding:9px; border:none; cursor:pointer; width:100%; transition:background .18s,color .18s; }
.calc-btn:hover, .calc-card:hover .calc-btn { background:var(--orange); color:#fff; }

/* FILTRY */
.filters-section { padding:20px 24px 0; }
.cat-tabs { display:flex; flex-wrap:wrap; gap:6px; list-style:none; padding:0; margin-bottom:16px; }
.cat-tabs li a { display:inline-block; font-family:var(--fb); font-size:.83rem; font-weight:600; padding:6px 15px; border-radius:4px; text-decoration:none; border:1px solid var(--border); color:var(--text-mid); background:#fff; transition:background .18s,color .18s,border-color .18s; }
.cat-tabs li a:hover { border-color:var(--orange); color:var(--orange); }
.cat-tabs li a.active { background:var(--orange); color:#fff; border-color:var(--orange); }
.search-wrap { display:flex; max-width:560px; margin:0 auto 14px; }
.search-wrap input { flex:1; padding:10px 16px; border:1px solid var(--border); border-right:none; border-radius:4px 0 0 4px; font-family:var(--fb); font-size:.88rem; color:var(--text); outline:none; transition:border-color .18s; }
.search-wrap input:focus { border-color:var(--orange); }
.search-wrap button { padding:0 16px; background:var(--orange); color:#fff; border:1px solid var(--orange); border-radius:0 4px 4px 0; cursor:pointer; display:flex; align-items:center; transition:background .18s; }
.search-wrap button:hover { background:var(--orange-h); }
.tag-list { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; list-style:none; padding:0; margin-bottom:20px; }
.tag-list li a { display:inline-block; padding:4px 13px; border:1px solid var(--border); border-radius:20px; font-size:.78rem; color:var(--text-muted); text-decoration:none; background:#fff; transition:all .18s; }
.tag-list li a:hover, .tag-list li a.tag-active { border-color:var(--orange); color:var(--orange); background:#fff8f4; }

/* ARTYKUŁY */
.articles-section { padding:4px 24px 28px; }
.art-card { border:1px solid var(--border); border-radius:6px; overflow:hidden; background:#fff; box-shadow:0 1px 6px rgba(0,0,0,.05); height:100%; display:flex; flex-direction:column; transition:box-shadow .2s,transform .2s; }
.art-card:hover { box-shadow:0 8px 24px rgba(0,0,0,.1); transform:translateY(-2px); }
.art-thumb { height:250px; overflow:hidden; flex-shrink:0; background:linear-gradient(135deg,#1e2d3e,#2c3f55); display:flex; align-items:center; justify-content:center; font-size:3.2rem; }
.art-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.art-body { padding:16px 18px 18px; flex:1; display:flex; flex-direction:column; gap:10px; }
.art-title { font-family:var(--fh); font-size:1rem; font-weight:700; color:var(--text); text-transform:uppercase; letter-spacing:.3px; line-height:1.25; margin:0; }
.art-title a { color:inherit; text-decoration:none; transition:color .18s; }
.art-title a:hover { color:var(--orange); }
.art-excerpt { font-size:.85rem; color:var(--text-mid); line-height:1.55; margin:0; }
.art-tags { display:flex; flex-wrap:wrap; gap:5px; list-style:none; padding:0; margin:0; }
.art-tags li a { display:inline-block; padding:3px 10px; border:1px solid var(--border); border-radius:3px; font-size:.73rem; font-weight:600; color:var(--text-muted); text-decoration:none; background:var(--light-bg); transition:border-color .15s,color .15s; }
.art-tags li a:hover { border-color:var(--orange); color:var(--orange); }
.art-footer { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:4px; }
.art-date { font-size:.76rem; color:var(--text-muted); }
.btn-read { display:inline-flex; align-items:center; gap:4px; font-family:var(--fb); font-size:.82rem; font-weight:700; color:var(--text); background:none; border:none; padding:0; cursor:pointer; transition:color .18s; white-space:nowrap; }
.btn-read:hover { color:var(--orange); }

/* PAGINACJA */
.pagination-wrap { padding:8px 24px 32px; display:flex; justify-content:center; }
.pg { display:flex; align-items:center; gap:4px; list-style:none; padding:0; margin:0; }
.pg li a, .pg li span { display:flex; align-items:center; justify-content:center; min-width:36px; height:36px; padding:0 10px; border-radius:4px; font-family:var(--fb); font-size:.85rem; font-weight:600; text-decoration:none; color:var(--text-mid); border:1px solid var(--border); background:#fff; transition:all .18s; }
.pg li a:hover { border-color:var(--orange); color:var(--orange); }
.pg li.active span { background:var(--orange); border-color:var(--orange); color:#fff; }
.pg li.disabled span { color:#ccc; }

/* DRAWER */
.art-drawer {
  position: fixed;
  top: 0;
  /* 1. Ustawiamy lewą krawędź na środku ekranu */
  left: 50%;
  bottom: 0;
  z-index: 1050;
  width: min(1100px, 100vw);
  background: #fff;
  box-shadow: 0 0 48px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;

  /* 2. Domyślnie ukrywamy go całkowicie pod prawą krawędzią ekranu */
  /* Przesunięcie o 50vw (do krawędzi) + połowa jego szerokości */
  transform: translateX(100vw);

  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}

.art-drawer.open {
  /* 3. Wyśrodkowanie: przesuwamy go o połowę jego własnej szerokości w lewo */
  transform: translateX(-50%);
}

/* Na mobile (poniżej 720px) drawer zajmie 100% szerokości */
@media (max-width: 720px) {
  .art-drawer.open {
    /* Na pełnym ekranie -50% przy left: 50% idealnie pokryje wyświetlacz */
    transform: translateX(-50%);
  }
}


.drawer-backdrop { position:fixed; inset:0; z-index:1040; background:rgba(10,18,28,.58); opacity:0; pointer-events:none; transition:opacity .28s ease; }
.drawer-backdrop.open { opacity:1; pointer-events:auto; }
.drawer-header { display:flex; align-items:center; gap:12px; padding:11px 18px; flex-shrink:0; border-bottom:1px solid var(--border); background:var(--light-bg); }
.drawer-mode-icon { font-size:1.1rem; flex-shrink:0; }
.drawer-title { font-family:var(--fh); font-size:.95rem; font-weight:700; color:var(--text); letter-spacing:.3px; margin:0; flex:1; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.drawer-ext-link { display:inline-flex; align-items:center; gap:5px; font-size:.73rem; color:var(--text-muted); text-decoration:none; white-space:nowrap; flex-shrink:0; transition:color .18s; }
.drawer-ext-link:hover { color:var(--orange); }
.drawer-ext-link svg { width:12px; height:12px; }
.drawer-close { width:32px; height:32px; flex-shrink:0; border-radius:4px; border:1px solid var(--border); background:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; color:var(--text-muted); font-size:1.15rem; transition:background .18s,color .18s,border-color .18s; }
.drawer-close:hover { background:var(--orange); color:#fff; border-color:var(--orange); }
.drawer-spinner { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; flex:1; color:var(--text-muted); font-size:.9rem; }
.drawer-spinner.d-none { display:none !important; }
.spinner { width:36px; height:36px; border-radius:50%; border:3px solid var(--border); border-top-color:var(--orange); animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.drawer-error { display:none; flex-direction:column; align-items:center; justify-content:center; gap:14px; flex:1; padding:40px 32px; text-align:center; }
.drawer-error.show { display:flex; }
.drawer-error .err-icon { font-size:2.2rem; }
.drawer-error p { font-size:.88rem; color:var(--text-muted); margin:0; }
.btn-retry { font-family:var(--fh); font-size:.84rem; font-weight:600; background:var(--orange); color:#fff; border:none; padding:8px 20px; border-radius:4px; cursor:pointer; transition:background .18s; }
.btn-retry:hover { background:var(--orange-h); }
.drawer-body { flex:1; overflow-y:auto; overflow-x:hidden; display:none; scroll-behavior:smooth; }
.drawer-body.show { display:block; }
.drawer-art-content { padding:28px 32px 52px; }
.drawer-art-content h1 { font-family:var(--fh); font-size:1.6rem; font-weight:700; color:var(--text); text-transform:uppercase; letter-spacing:.5px; margin-bottom:18px; }
.drawer-art-content h2 { font-family:var(--fh); font-size:1.2rem; font-weight:700; color:var(--text); text-transform:uppercase; margin:28px 0 10px; }
.drawer-art-content h3 { font-family:var(--fh); font-size:1rem; font-weight:700; color:var(--text); margin:20px 0 8px; }
.drawer-art-content p { font-size:.93rem; color:var(--text-mid); line-height:1.75; margin-bottom:14px; }
.drawer-art-content img { max-width:100%; border-radius:5px; margin:8px 0 16px; display:block; }
.drawer-art-content ul, .drawer-art-content ol { font-size:.93rem; color:var(--text-mid); line-height:1.7; padding-left:22px; margin-bottom:14px; }
.drawer-art-content a { color:var(--orange); }
.drawer-art-content a:hover { color:var(--orange-h); }
.drawer-art-content table { width:100%; border-collapse:collapse; font-size:.88rem; margin-bottom:16px; }
.drawer-art-content th { background:var(--card-head); color:#fff; padding:8px 12px; font-family:var(--fh); text-align:left; }
.drawer-art-content td { padding:7px 12px; border-bottom:1px solid var(--border); color:var(--text-mid); }
.drawer-art-content tr:last-child td { border-bottom:none; }
.drawer-art-content code { background:var(--light-bg); padding:1px 6px; border-radius:3px; font-size:.85em; }
.drawer-art-content pre { background:var(--card-head); color:#c8d4e4; padding:16px; border-radius:5px; overflow-x:auto; font-size:.84rem; margin-bottom:16px; }
.drawer-calc-content { padding:24px 28px 52px; }

@media (max-width:640px) {
  .calc-section,.filters-section,.articles-section { padding-left:14px; padding-right:14px; }
  .art-thumb { height:145px; }
  .page-header h1 { font-size:1.8rem; }
  .art-drawer { width:100vw; }
  .drawer-art-content,.drawer-calc-content { padding:18px 16px 40px; }
}


/* ═══ KATEGORIE ═══ */
.pf-cat-section { padding:20px 24px 18px; }
.pf-cat-tabs { display:flex; flex-wrap:wrap; gap:6px; list-style:none; padding:0; margin:0; justify-content:center; }
.pf-cat-tabs li a {
  display:inline-block; font-family:var(--fb); font-size:.83rem; font-weight:600;
  padding:6px 18px; border-radius:4px; text-decoration:none;
  border:1px solid var(--border); color:var(--text-mid); background:#fff;
  transition:background .18s,color .18s,border-color .18s;
}
.pf-cat-tabs li a:hover { border-color:var(--orange); color:var(--orange); }
.pf-cat-tabs li a.active { background:var(--orange); color:#fff; border-color:var(--orange); }

/* ═══ SIATKA PROJEKTÓW ═══ */
.portfolio-section { padding:4px 20px 28px; }

.pf-port-card {
  border:1px solid var(--border); border-radius:6px; overflow:hidden;
  background:#fff; box-shadow:0 1px 6px rgba(0,0,0,.06);
  display:flex; flex-direction:column;
  transition:box-shadow .22s, transform .22s;
  height:100%;
}
.pf-port-card:hover { box-shadow:0 8px 24px rgba(0,0,0,.13); transform:translateY(-3px); }

/* Zdjęcie – klikalny obszar lightboxa */
.pf-port-img-wrap {
  position:relative; overflow:hidden; cursor:zoom-in;
  aspect-ratio: 4/3; flex-shrink:0;
  background: var(--card-head);
}
.pf-port-img-wrap img {
  width:100%; height:100%; object-fit:cover; display:block;
  transition:transform .35s ease;
}
.pf-port-card:hover .pf-port-img-wrap img { transform:scale(1.04); }

/* Nakładka z ikoną lupy przy hover */
.pf-port-img-wrap::after {
  content:'🔍';
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  font-size:1.8rem;
  background:rgba(10,18,28,.38);
  opacity:0; transition:opacity .25s;
}
.pf-port-card:hover .pf-port-img-wrap::after { opacity:1; }

/* Tekst pod zdjęciem */
.pf-port-body { padding:12px 14px 14px; flex:1; display:flex; flex-direction:column; gap:5px; }
.pf-port-title {
  font-family:var(--fh); font-size:.92rem; font-weight:700;
  color:var(--text); margin:0; line-height:1.3;
}
.pf-port-title strong { color:var(--text); }
.pf-port-title .dash { color:var(--text-muted); font-weight:400; }
.pf-port-desc { font-size:.82rem; color:var(--text-mid); margin:0; line-height:1.45; }

/* ═══ PAGINACJA ═══ */
.pagination-wrap { padding:8px 24px 32px; display:flex; justify-content:center; }
.pg { display:flex; align-items:center; gap:4px; list-style:none; padding:0; margin:0; }
.pg li a, .pg li span {
  display:flex; align-items:center; justify-content:center;
  min-width:36px; height:36px; padding:0 10px;
  border-radius:4px; font-family:var(--fb); font-size:.85rem; font-weight:600;
  text-decoration:none; color:var(--text-mid); border:1px solid var(--border); background:#fff;
  transition:all .18s;
}
.pg li a:hover { border-color:var(--orange); color:var(--orange); }
.pg li.active span { background:var(--orange); border-color:var(--orange); color:#fff; }
.pg li.disabled span { color:#ccc; }


/* ═══════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════ */
.lb-backdrop {
  position:fixed; inset:0; z-index:2000;
  background:rgba(5,10,18,.92);
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none;
  transition:opacity .25s ease;
}
.lb-backdrop.open { opacity:1; pointer-events:auto; }

/* Kontener obrazu */
.lb-stage {
  position:relative;
  max-width:min(92vw, 1100px);
  max-height:90vh;
  display:flex; align-items:center; justify-content:center;
}
.lb-img {
  max-width:100%; max-height:82vh;
  border-radius:4px;
  box-shadow:0 8px 48px rgba(0,0,0,.6);
  display:block;
  transition:opacity .2s ease;
}
.lb-img.fading { opacity:0; }

/* Caption */
.lb-caption {
  position:absolute; bottom:0; left:0; right:0;
  background:linear-gradient(transparent, rgba(5,10,18,.82));
  padding:28px 20px 14px;
  border-radius:0 0 4px 4px;
  transform:translateY(0);
}
.lb-caption-title {
  font-family:var(--fh); font-size:1rem; font-weight:700;
  color:#fff; letter-spacing:.3px; margin-bottom:3px;
}
.lb-caption-desc { font-size:.82rem; color:#a0b8d0; margin:0; }

/* Przyciski nawigacji */
.lb-btn {
  position:absolute; top:50%; transform:translateY(-50%);
  width:44px; height:44px;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.2);
  border-radius:50%; cursor:pointer; color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:1.2rem; transition:background .18s, transform .18s;
  backdrop-filter:blur(4px);
  /* wyjdź poza obraz */
  z-index:10;
}
.lb-btn:hover { background:var(--orange); border-color:var(--orange); transform:translateY(-50%) scale(1.08); }
.lb-prev { left:-58px; }
.lb-next { right:-58px; }

/* Zamknij */
.lb-close {
  position:fixed; top:18px; right:22px;
  width:38px; height:38px;
  background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.2);
  border-radius:50%; cursor:pointer; color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:1.15rem; z-index:10;
  transition:background .18s;
}
.lb-close:hover { background:var(--orange); border-color:var(--orange); }

/* Licznik np. 3 / 9 */
.lb-counter {
  position:fixed; top:22px; left:50%; transform:translateX(-50%);
  font-family:var(--fh); font-size:.82rem; font-weight:600;
  color:rgba(255,255,255,.55); letter-spacing:1px; z-index:10;
}

/* Na mobile – strzałki wewnątrz */
@media (max-width:600px) {
  .lb-prev { left:6px; }
  .lb-next { right:6px; }
  .lb-btn { width:38px; height:38px; font-size:1rem; }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width:640px) {
  .portfolio-section { padding-left:12px; padding-right:12px; }
  .page-header { padding:28px 16px 20px; }
  .cat-section { padding:16px 12px 14px; }
}


/* ═══ KALKULATOR POJEMNOSCI ═══ */

/* Desktop – mniejsze minimalne szerokości */
.table-responsive-mobile th,
.table-responsive-mobile td {
  white-space: nowrap;
}

/* Minimalne szerokości kolumn (opcjonalnie per tabela) */
@media (min-width: 769px) {
  #loadsTable th:nth-child(1),
  #balanceLoadsTable th:nth-child(1),
  #balanceSourcesTable th:nth-child(1) { min-width: 100px; }

  #loadsTable th:nth-child(2),
  #balanceLoadsTable th:nth-child(2),
  #balanceSourcesTable th:nth-child(2) { min-width: 50px; }

  #loadsTable th:nth-child(3),
  #balanceLoadsTable th:nth-child(3),
  #balanceSourcesTable th:nth-child(3) { min-width: 50px; }

  #loadsTable th:nth-child(4),
  #balanceLoadsTable th:nth-child(4),
  #balanceSourcesTable th:nth-child(4) { min-width: 75px; }

  #loadsTable th:nth-child(5),
  #balanceLoadsTable th:nth-child(5),
  #balanceSourcesTable th:nth-child(5) { min-width: 150px; }
}

/* MOBILE LAYOUT */
@media (max-width: 768px) {

  /* Kluczowe: usuwamy wpływ kolumn z thead */
  .table-responsive-mobile thead th {
    min-width: 0 !important;
    width: auto !important;
  }

  /* Ukrywamy nagłówki */
  .table-responsive-mobile thead {
    display: none !important;
  }

  /* Wiersze jako karty */
  .table-responsive-mobile tr {
    display: block;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
  }

  /* Pola jako label + input */
  .table-responsive-mobile td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px;
    width: 100% !important;
    min-width: 0 !important;
  }

  .table-responsive-mobile td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 10px;
    color: #333;
    flex: 1;
  }

  /* Nazwa jako nagłówek karty */
  .table-responsive-mobile td[data-label="Nazwa"] {
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 10px;
  }

  /* Usuń wyrównane do prawej */
  .table-responsive-mobile td[data-label="Usuń"] {
    justify-content: flex-end;
  }

  .table-responsive-mobile td:not([data-label="Nazwa"])::before {
    margin-left: 6px;   /* delikatne odsunięcie */
    padding-left: 4px;  /* jeszcze subtelniejsze wyrównanie */
  }

  /* Wszystkie pola formularza mają identyczny box model */
  .table-responsive-mobile td input,
  .table-responsive-mobile td select {
    flex: 1;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
    height: 24px !important;      /* było 38px 32px */
    padding: 2px 4px !important;  /* było 6px 8px / było 4px 6px*/
    font-size: 0.8rem !important; /* delikatnie mniejsza czcionka */
  }

  /* Select ma domyślnie większą strzałkę → wyrównujemy */
  .table-responsive-mobile td select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-position: right 8px center;
    background-repeat: no-repeat;
  }
}

/* 1. Ustawienia podstawowe (Desktop) */
.art-figure {
  float: right;
  max-width: 100%;       /* Zabezpieczenie przed wyjściem poza ekran */
  margin: 0 0 15px 20px;
  padding: 8px;
  box-sizing: border-box; /* Ważne: padding nie zwiększa szerokości */
}

.art-figure-30 {
  width: 30%;
}

.art-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.art-figure figcaption {
  font-size: 0.65rem;
  margin-top: 8px;
  text-align: center;
  color: #555;
  background: #f9f9f9;

}

.row-equal-height {
  display: flex;
  flex-wrap: wrap;
}

.row-equal-height > [class*="col"] {
  display: flex;     /* Włącza wyrównywanie wysokości kolumn w rzędzie */
}

.row-equal-height .art-figure {
  height: 100%;      /* Wszystkie figure w rzędzie są tej samej wysokości */
  width: 100%;
}

.row-equal-height .art-figure img {
  /* Kluczowe zmiany: */
  width: auto;            /* Zdjęcie nie rozciąga się wszerz na siłę */
  max-width: 100%;        /* Ale nie wyjdzie poza ramkę */
  height: auto;           /* Zachowuje proporcje */
  max-height: 200px;      /* To jest Twój limit wysokości w rzędzie */

  /* Centrowanie wewnątrz figure: */
  display: block;
  margin-left: auto;
  margin-right: auto;

  object-fit: contain;    /* Dodatkowe zabezpieczenie proporcji */
  margin-bottom: 15px;
}

/* 2. Responsywność (Mobile) */
@media (max-width: 767px) {
  .art-figure {
    float: none;         /* Wyłączamy oblanie tekstem */
    width: 100%;         /* Zdjęcie zajmuje całą dostępną szerokość */
    margin: 1rem 0;      /* Margines góra/dół, kasujemy boczny */
    padding: 10px;       /* Nieco więcej oddechu na mobile */
  }

  .art-figure-30 {
    width: 100%;
  }

  .art-figure img {
    max-width: 350px;    /* Opcjonalnie: żeby małe foto nie rozciągnęło się za bardzo */
    margin: 0 auto;      /* Środkowanie zdjęcia wewnątrz figure */
  }

  /* 1. Ustawienia domyślne dla MOBILE */
  .row-equal-height .art-figure {
    display: flex;
    flex-direction: column;
    height: auto;        /* Na mobile wysokość wynika z treści */
    margin-bottom: 20px; /* Odstęp między kafelkami w pionie */
    padding: 15px;
    border-radius: 6px;
  }

  .row-equal-height .art-figure img {
    width: 100%;
    height: auto;        /* Na mobile zdjęcie zachowuje swoje proporcje */
    max-height: 300px;   /* Żeby ogromne pionowe zdjęcie nie zajęło całego ekranu */
    object-fit: contain;
    margin-bottom: 10px;
  }
}
