:root{
  --bg:#0b0f14;
  --panel: rgba(15, 20, 28, 0.72);
  --panel2: rgba(15, 20, 28, 0.88);
  --text:#eaf0ff;
  --muted:#b8c1d9;
  --accent:#38bdf8;
  --accent2:#22c55e;
  --danger:#ff2b2b;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}

/* ✅ nie uciekamy w prawo */
html{ overflow-x:hidden; }
body{
  margin:0;
  max-width:100vw;
  overflow-x:hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
  color:var(--text);
  background: var(--bg);
}

a{color:inherit}
.container{ width:min(1100px, 92vw); margin:0 auto; }

/* ===== Global photo background (also for cennik + galeria) ===== */
body.bg-photo{
  position:relative;
  background: var(--bg);
}
body.bg-photo::before{
  content:"";
  position:fixed;
  inset:0;
  background-image: url("/images/tlo.jpg");
  background-size: cover;
  background-position: center;
  background-repeat:no-repeat;
  z-index:-2;
  pointer-events:none;
}
body.bg-photo::after{
  content:"";
  position:fixed;
  inset:0;
  background:
    radial-gradient(1200px 600px at 20% 20%, rgba(56,189,248,.12), transparent 60%),
    radial-gradient(900px 500px at 80% 10%, rgba(34,197,94,.10), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.62));
  z-index:-1;
  pointer-events:none;
}

/* ===== NAV ===== */
.nav{
  position:sticky; top:0; z-index:20;
  backdrop-filter: blur(10px);
  background: rgba(8, 12, 18, 0.65);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 0; gap:14px;
  min-width:0;
}

.brand-mini{display:flex; align-items:baseline; gap:10px; min-width:0;}
.brand-mini .logo{font-weight:800; letter-spacing:0.14em; white-space:nowrap;}
.brand-mini .tag{font-size:12px; color:var(--muted); white-space:nowrap;}

.nav-links{ display:flex; gap:14px; flex-wrap:wrap; min-width:0; }
.nav-links a{
  text-decoration:none;
  padding:8px 10px;
  border-radius:12px;
  color:var(--muted);
  border:1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  white-space:nowrap;
}
.nav-links a:hover{ color:var(--text); border-color: rgba(56,189,248,0.5); }

/* ===== HERO layout ===== */
.hero{
  position:relative;
  min-height: calc(100vh - 60px);
  display:flex;
  align-items:stretch;
  padding: 26px 0 26px;
  overflow:hidden;
}

.hero-inner{
  position:relative;
  width:100%;
  display:grid;
  gap:18px;
  min-width:0;
}

.hero-inner--cols{
  grid-template-columns: 2fr 1fr;
  align-items:stretch;
  min-width:0;
}

.card{
  background: var(--panel);
  border:1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== Left copy ===== */
.hero-copy{
  min-height: 70vh;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-items:center;
  text-align:center;
  padding: clamp(12px, 2vw, 22px);
  min-width:0;
}

.hero-copy-top{
  padding-top: clamp(6px, 2vh, 18px);
  min-width:0;
}

.hero-title{
  margin:0;
  font-size: clamp(64px, 6.2vw, 96px);
  letter-spacing: 0.22em;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--danger);
  text-shadow: 0 10px 30px rgba(0,0,0,.55);
}

.hero-subtitle{
  margin-top: 12px;
  font-size: clamp(22px, 2.3vw, 32px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(234,240,255,0.95);
  text-shadow: 0 10px 30px rgba(0,0,0,.55);
}

/* images in left column */
.hero-img{
  width: min(720px, 92%);
  margin: clamp(12px, 2vh, 18px) auto;
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.16);
  box-shadow: 0 14px 34px rgba(0,0,0,.35);
}
.hero-img img{
  display:block;
  width:100%;
  height:auto;
}

/* zmniejszenie tych obrazków */
.hero-img--mini{
  width: min(360px, 92%);
}

.hero-mid{
  margin-top: clamp(10px, 3vh, 28px);
}
.hero-invite{
  display:inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 800;
  color: rgba(234,240,255,0.98);
  text-shadow: 0 8px 22px rgba(0,0,0,.55);
}

.hero-bottom{
  padding-bottom: clamp(10px, 2vh, 18px);
}
.hero-care{
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 34px);
  color: rgba(255,255,255,0.92);
  text-shadow: 0 10px 30px rgba(0,0,0,.60);
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.14);
}

/* ===== Right panel ===== */
.panel{
  padding: 18px;
  display:flex;
  flex-direction:column;
  gap:14px;
  background: var(--panel2);
  min-width:0;
}

/* ===== CALL CARD ===== */
.call-card{
  border-radius: 18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.14);
  background:
    linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.20)),
    url("/images/call.jpg");
  background-size: cover;
  background-position: center right;
  min-height: 170px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 16px 16px;
}

.call-inner{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:12px;
  padding-left: clamp(10px, 2vw, 22px);
  min-width:0;
}

.call-title{
  font-weight: 900;
  letter-spacing: 0.10em;
  font-size: clamp(30px, 3vw, 46px);
  color: var(--accent2);
  text-shadow: 0 10px 28px rgba(0,0,0,.50);
}

/* phone button */
.phone{
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.22);
  width: fit-content;
  cursor:pointer;
  backdrop-filter: blur(4px);
}
.phone--big strong{
  font-size: 22px;
  letter-spacing:0.04em;
}
.phone--dark{
  background: rgba(0,0,0,0.55);
  border-color: rgba(255,255,255,0.26);
  box-shadow: 0 14px 26px rgba(0,0,0,.35);
}
.phone--dark:hover{
  background: rgba(0,0,0,0.62);
  border-color: rgba(56,189,248,0.40);
}
.phone-ico{ filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }

/* ===== Flyer ===== */
.flyer{
  border-radius: 16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.22);
}
.flyer img{ display:block; width:100%; height:auto; }

/* ===== Pinezka row ===== */
.pin-row{
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:center;
  padding: 10px 8px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
}
.pin-ico{
  width: 26px;
  height: 26px;
  object-fit: contain;
  display:block;
}
.pin-text{
  font-weight: 900;
  letter-spacing: 0.06em;
  color: rgba(234,240,255,0.96);
}

/* ===== Map ===== */
.map-slot{ display:block; }
#map{
  width:100%;
  aspect-ratio: 1 / 1;
  height:auto;
}
.leaflet-control-zoom{ display:none !important; }

/* ===== Panel foot ===== */
.panel-foot{
  margin-top:auto;
  padding-top: 6px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
}
.small{ color: var(--muted); font-size: 13px; }

.fb-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}
.fb-ico{
  width: 34px;
  height: 34px;
  object-fit: contain;
  display:block;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}

/* ===== Pages ===== */
.page{
  padding: 26px 0 30px;
  min-height: calc(100vh - 60px);
  background: rgba(0,0,0,0.16);
}
.page h1{
  margin: 0 0 10px;
  font-size: 28px;
  letter-spacing:0.06em;
  text-transform: uppercase;
}

/* ===== Form basics ===== */
label{ display:block; margin: 10px 0 6px; color: var(--muted); font-size: 13px; }
input, select{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  outline: none;
}
input:focus, select:focus{ border-color: rgba(56,189,248,0.55); }
code{ color: var(--text); background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 8px; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
.btn:hover{ border-color: rgba(56,189,248,0.45); }

/* ===== Gallery ===== */
.gallery-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 14px 0 16px;
}
.tabbtn{
  text-decoration:none;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
}
.tabbtn.active{
  color: var(--text);
  border-color: rgba(56,189,248,0.55);
  background: rgba(56,189,248,0.10);
}

/* ✅ viewer: niech nie będzie "rozpasły" */
.viewer{ padding:14px; }
.viewer-main{
  position:relative;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.35);
  height: min(56vh, 460px);
  display:flex;
  align-items:center;
  justify-content:center;
}
.viewer-main img{
  max-width:100%;
  max-height:100%;
  object-fit: contain;
  cursor: zoom-in;
}

/* ✅ NOWE: kafelki miniatur (siatka) */
.thumb-grid{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap:10px;
  padding-top: 12px;
}
.thumb-grid img{
  width:100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,0.12);
  opacity:0.82;
  cursor:pointer;
}
.thumb-grid img.active{
  opacity:1;
  border-color: rgba(56,189,248,0.55);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

/* zostawiam stary pasek (gdyby gdzieś jeszcze był używany) */
.thumb-row{
  display:flex;
  gap:10px;
  overflow:auto;
  padding-top: 12px;
}
.thumb-row img{
  height:78px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,0.12);
  opacity:0.78;
  cursor:pointer;
}
.thumb-row img.active{
  opacity:1;
  border-color: rgba(56,189,248,0.55);
}

.fullscreen{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.92);
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.fullscreen.open{display:flex;}
.fullscreen img{
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
}
.fullscreen .x{
  position:fixed;
  top:14px;
  right:14px;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor:pointer;
}
.navbtn{
  position:fixed;
  top:50%;
  transform: translateY(-50%);
  padding:12px 14px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor:pointer;
  user-select:none;
}
.navbtn.left{left:14px;}
.navbtn.right{right:14px;}

/* ===== MOBILE FIXES (nav + galeria + home) ===== */
@media (max-width: 980px){

  /* menu poziomo, a logo/tag pod spodem */
  .nav-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }

  .nav-links--top{
    order:-1;
    width:100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .nav-links--top::-webkit-scrollbar{ height: 6px; }
  .nav-links--top a{ flex: 0 0 auto; }

  /* layout home */
  .hero-inner--cols{ grid-template-columns: 1fr; }
  .hero-copy{ min-height: auto; padding-bottom: 10px; }
  .panel{ margin-top: 12px; }

  .hero-title{
    font-size: clamp(44px, 10.5vw, 68px);
    letter-spacing: 0.12em;
  }

  .hero-subtitle{
    font-size: clamp(18px, 4.8vw, 24px);
  }

  .call-inner{
    align-items:center;
    padding-left: 0;
    text-align:center;
  }

  .hero-img{ width: min(640px, 96%); }
  .hero-img--mini{ width: min(520px, 96%); }

  .container{ width: min(1100px, 94vw); }

  /* ✅ GALERIA na telefonie: mniejszy podgląd + więcej kafelków w siatce */
  .viewer-main{
    height: min(42vh, 320px);
  }
  .thumb-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap:10px;
  }
  .thumb-grid img{
    border-radius: 12px;
  }
}

/* ===== ADMIN (zostawiam) ===== */
.admin-box{ margin-top: 6px; }
.admin-list{
  margin-top: 10px;
  border:1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  background: rgba(0,0,0,0.22);
  max-height: 360px;
  overflow:auto;
}
.admin-row{
  display:flex;
  gap:12px;
  justify-content:space-between;
  padding: 12px 12px;
  border-bottom:1px solid rgba(255,255,255,0.08);
}
.admin-row:last-child{ border-bottom:0; }
.admin-left{ min-width: 0; }
.admin-title{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.admin-meta{ display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; opacity: .95; }
.admin-meta .dot{ opacity:.55; }
.admin-link{ margin-top:6px; opacity:.9; }
.admin-link a{ word-break: break-all; color: var(--text); }
.admin-badge{
  font-size: 11px;
  letter-spacing: .10em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
}
.admin-badge.is-base{
  border-color: rgba(239,68,68,0.55);
  background: rgba(239,68,68,0.12);
  color: var(--text);
}
.admin-actions{ display:flex; align-items:flex-start; }
.btn.btn-danger{
  border-color: rgba(239,68,68,0.55);
  background: rgba(239,68,68,0.12);
}
.btn.btn-danger:hover{ border-color: rgba(239,68,68,0.85); }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }