/* Perfect Interior — galeria realizacji */
.gallery-hero .wrap {
  padding-top: clamp(52px, 7vw, 90px);
  padding-bottom: clamp(42px, 5vw, 64px);
}
.gallery-hero h1 {
  max-width: 14ch;
  margin: 12px 0 18px;
  font-size: clamp(2.35rem, 4.2vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}
.gallery-hero p { max-width: 720px; line-height: 1.75; }
.gallery-section {
  padding-top: clamp(38px, 5vw, 64px);
  padding-bottom: clamp(54px, 7vw, 88px);
}
.gallery-intro { max-width: 700px; margin-bottom: 28px; }
.gallery-intro h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.7rem, 2.7vw, 2.35rem);
  line-height: 1.2;
}
.gallery-intro p { color: var(--muted, #c8c8c8); line-height: 1.7; }
.pi-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: clamp(120px, 13vw, 190px);
  gap: 12px;
}
.pi-gallery figure {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  background: #17191b;
  border: 1px solid rgba(255,255,255,.12);
}
.pi-gallery figure:nth-child(12n + 1),
.pi-gallery figure:nth-child(12n + 7) { grid-column: span 2; grid-row: span 2; }
.pi-gallery figure:nth-child(12n + 4),
.pi-gallery figure:nth-child(12n + 10) { grid-row: span 2; }
.pi-gallery a { position: relative; display: block; width: 100%; height: 100%; }
.pi-gallery a::after {
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(0deg, rgba(0,0,0,.26), transparent);
  content: "";
  opacity: .7;
  pointer-events: none;
}
.pi-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .35s ease;
}
.pi-gallery a:hover img,
.pi-gallery a:focus-visible img { transform: scale(1.045); filter: brightness(1.06); }
.pi-gallery a:focus-visible { outline: 2px solid var(--copper2); outline-offset: -3px; }
.gallery-note { margin-top: 22px; color: var(--muted, #c8c8c8); font-size: .9rem; }
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vw;
  background: rgba(5,6,7,.94);
}
.gallery-lightbox.open { display: flex; }
.gallery-lightbox img {
  width: auto;
  height: auto;
  max-width: min(1200px, 90vw);
  max-height: 86vh;
  object-fit: contain;
  box-shadow: 0 20px 70px rgba(0,0,0,.45);
}
.gallery-lightbox button {
  position: absolute;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(20,20,20,.8);
  color: #fff;
  cursor: pointer;
  font-size: 1.5rem;
}
.gallery-lightbox .lightbox-close { top: 20px; right: 20px; }
.gallery-lightbox .lightbox-prev { top: 50%; left: 20px; transform: translateY(-50%); }
.gallery-lightbox .lightbox-next { top: 50%; right: 20px; transform: translateY(-50%); }
.gallery-lightbox .lightbox-caption {
  position: absolute;
  right: 70px;
  bottom: 18px;
  left: 70px;
  color: #ddd;
  text-align: center;
  font-size: .85rem;
}
@media (max-width: 900px) {
  .pi-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(115px, 19vw, 175px); gap: 10px; }
  .pi-gallery figure:nth-child(12n + 1), .pi-gallery figure:nth-child(12n + 7) { grid-column: span 2; grid-row: span 2; }
  .pi-gallery figure:nth-child(12n + 4), .pi-gallery figure:nth-child(12n + 10) { grid-column: span 1; grid-row: span 2; }
}
@media (max-width: 620px) {
  .pi-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(125px, 37vw, 210px); gap: 8px; }
  .pi-gallery figure:nth-child(12n + 1), .pi-gallery figure:nth-child(12n + 7) { grid-column: span 2; grid-row: span 2; }
  .pi-gallery figure:nth-child(12n + 4), .pi-gallery figure:nth-child(12n + 10) { grid-column: span 1; grid-row: span 1; }
  .gallery-hero h1 { font-size: clamp(2rem, 9vw, 2.7rem); }
  .gallery-section { padding-top: 34px; }
  .gallery-lightbox { padding: 16px; }
  .gallery-lightbox .lightbox-prev { left: 8px; }
  .gallery-lightbox .lightbox-next { right: 8px; }
  .gallery-lightbox .lightbox-caption { right: 48px; bottom: 10px; left: 48px; }
}
@media (prefers-reduced-motion: reduce) { .pi-gallery img { transition: none; } }

/* Sekcja kontaktowa: układ jak w wersji referencyjnej, kolorystyka Perfect Interior */
.detail-cta {
  position: relative;
  padding: clamp(76px, 8vw, 118px) 0;
  background: #111315;
  border-top: 1px solid rgba(216, 189, 122, .22);
  border-bottom: 1px solid rgba(216, 189, 122, .18);
  overflow: hidden;
}
.detail-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 80% 45%, rgba(216,189,122,.055), transparent 48%);
}
.detail-cta-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  align-items: center;
  gap: clamp(34px, 5vw, 80px);
}
.detail-cta-inner > div:first-child { min-width: 0; }
.detail-cta .eyebrow {
  margin: 0 0 22px;
  color: #d8bd7a !important;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .25em;
  line-height: 1.6;
  text-transform: uppercase;
}
.detail-cta h2 {
  max-width: 18ch;
  margin: 0 0 22px;
  color: #f5f3ef;
  font-size: clamp(2.5rem, 4.2vw, 4rem);
  font-weight: 800;
  line-height: .99;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.detail-cta p {
  max-width: 600px;
  margin: 0;
  color: #d1d1cf;
  font-size: 1rem;
  line-height: 1.75;
}
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}
.detail-actions .btn { min-height: 46px; }
.detail-actions .btn-primary {
  background: linear-gradient(135deg, #dfc582, #b8954d);
  border-color: #c9ab68;
  color: #101113;
}
.detail-actions .btn-primary:hover,
.detail-actions .btn-primary:focus-visible {
  background: #ead59d;
  border-color: #ead59d;
  color: #101113;
}
.detail-actions .btn-outline {
  color: #f5f3ef;
  border-color: rgba(216,189,122,.5);
  background: rgba(255,255,255,.015);
}
.detail-actions .btn-outline:hover,
.detail-actions .btn-outline:focus-visible {
  border-color: #d8bd7a;
  background: rgba(216,189,122,.08);
}
@media (max-width: 900px) {
  .detail-cta { padding: 64px 0; }
  .detail-cta-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .detail-cta h2 { max-width: 18ch; font-size: clamp(2.35rem, 6vw, 3.5rem); }
}
@media (max-width: 560px) {
  .detail-cta { padding: 52px 0; }
  .detail-cta-inner { gap: 24px; }
  .detail-cta .eyebrow { margin-bottom: 16px; font-size: .65rem; letter-spacing: .18em; }
  .detail-cta h2 { max-width: 18ch; margin-bottom: 16px; font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.02; }
  .detail-cta p { font-size: .94rem; line-height: 1.7; }
  .detail-actions { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .detail-actions .btn { width: 100%; box-sizing: border-box; justify-content: center; text-align: center; }
}

/* Galeria: 12 zdjęć na start. Wszystkie znaczniki img pozostają w HTML dla wyszukiwarek. */
.pi-gallery figure.gallery-hidden { display: none; }
.gallery-more-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 24px; text-align: center; }
.gallery-more-wrap .gallery-note { margin: 0; }
.gallery-more[hidden] { display: none !important; }
