/* ============================================================
   ABSTRACT SHOW - main.css
   Jedyne zależności: Bootstrap 5.2.3 (grid, navbar, utilities)

   SPIS TREŚCI (kolejność zgodna z układem strony):
   ────────────────────────────────────────────────
   01. ZMIENNE CSS (Custom Properties)
   02. RESET & BAZA
   03. TYPOGRAFIA (nagłówki, akapity, linki)
   04. NAVBAR
   05. VIDEO HEADER
   06. BRUSH STROKES (dekoracyjne pędzle między sekcjami)
   07. SEKCJE - layout bazowy
   08. PRZYCISK VIDEO (CTA w headerze)
   09. USŁUGI (siatka 2×2 z boxami)
   10. FILTRY NAWIGACYJNE (zakładki oferty)
   11. KARUZELA POKAZÓW (show cards)
   12. O NAS
   13. PARTNERZY
   14. GALERIA
   15. LIGHTBOX
   16. KONTAKT
   17. FOOTER
   18. POMOCNICZE (utility classes)
   ============================================================ */


/* ============================================================
   01. ZMIENNE CSS
   ============================================================ */

:root {
  /* Kolory główne */
  --color-red:        #dc0f2d;
  --color-red-dark:   #8f1106;
  --color-red-1:      #e11934;
  --color-red-2:      #e62a3b;
  --color-red-3:      #d50b27;
  --color-black:      #000;
  --color-white:      #fff;
  --color-gray:       #6c757d;
  --color-dark:       #212529;

  /* Fonty */
  --font-main:        'Mulish', system-ui, -apple-system, sans-serif;
  --font-alt:         'Kanit', system-ui, -apple-system, sans-serif;

  /* Layout */
  --nav-height:       102px;

  /* Galeria */
  --cols:             8;
  --ratio-w:          18;
  --ratio-h:          9;
  --thumb-transition: 600ms;
}


/* ============================================================
   02. RESET & BAZA
   ============================================================ */

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

html {
  scroll-padding-top: var(--nav-height);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-dark);
  background-color: var(--color-white);
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-x: contain;
}

img,
svg {
  vertical-align: middle;
}

b,
strong {
  font-weight: bolder;
}

small {
  font-size: 0.875em;
}


/* ============================================================
   03. TYPOGRAFIA
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: var(--font-main);
  font-weight: 600;
  line-height: 1.2;
}

/* Responsywne rozmiary nagłówków (clamp: min | fluid | max) */
h1 { font-size: clamp(1.375rem, 4vw,   2.5rem);  }
h2 { font-size: clamp(1.325rem, 3vw,   2rem);    }
h3 { font-size: clamp(1.3rem,   2.5vw, 1.75rem); }
h4 { font-size: clamp(1.275rem, 2vw,   1.5rem);  }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem;    }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Domyślny link - poza sekcjami z własnym kontekstem */
a {
  color: var(--color-red);
  text-decoration: underline;
}

a:hover {
  color: var(--color-gray);
}

/* Efekt podkreślenia markerem - używany na wyróżnionych słowach w nagłówkach */
.underline {
  position: relative;
  display: inline-block;
}

.underline::after {
  content: "";
  position: absolute;
  inset: auto -6px -8px -6px;
  z-index: -1;
  height: 10px;
  background: linear-gradient(
    45deg,
    var(--color-red),
    var(--color-red-1),
    var(--color-red-2),
    var(--color-red-3),
    var(--color-red-1)
  );
  -webkit-mask:
    url("data:image/svg+xml,%3csvg viewBox='0 0 100 10' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3e%3cpath d='M0,5 Q15,2 30,4 T60,5 Q75,7 90,5 T100,6' fill='none' stroke='white' stroke-width='6' stroke-linecap='round'/%3e%3c/svg%3e");
  mask:
    url("data:image/svg+xml,%3csvg viewBox='0 0 100 10' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3e%3cpath d='M0,5 Q15,2 30,4 T60,5 Q75,7 90,5 T100,6' fill='none' stroke='white' stroke-width='6' stroke-linecap='round'/%3e%3c/svg%3e");
}

/* ============================================================
   04. NAVBAR
   ============================================================ */

#mainNav {
  padding-top: 1rem;
  padding-bottom: 1rem;
  background-color: var(--color-white);
  transition: background-color 0.5s ease;
}

#mainNav .navbar-brand {
  font-family: var(--font-alt);
  font-weight: 700;
}

#mainNav .navbar-brand:hover,
#mainNav .navbar-brand:active {
  color: var(--color-red);
}

#mainNav .navbar-toggler {
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  color: var(--color-dark);
  border: 1px solid #ebebeb;
  border-bottom: none;
  border-top: none;
  background: linear-gradient(180deg,rgba(237, 237, 237, 0.5) 0%, rgba(250, 250, 250, 0.5) 8%, rgba(224, 224, 224, 0.5) 20%, rgba(237, 237, 237, 0.5) 50%, rgba(255, 255, 255, 0.5) 100%);
}

#mainNav .nav-link {
  color: var(--color-dark);
  text-decoration: none;
}

#mainNav .nav-link:hover {
  color: var(--color-gray);
  text-decoration: underline 2px var(--color-red);
  text-underline-offset: 6px;
}

#mainNav .nav-link.active {
  color: var(--color-red);
}

@media (max-width: 768px) {
  .navbar-brand img  { max-height: 45px !important; }
  .navbar-brand      { font-size: 1.1rem; }
}

/* ── MOBILE OVERLAY MENU ─────────────────────────────────── */
@media (max-width: 992px) {

  #mainNav {
    position: sticky;
    top: 0;
    z-index: 1050;
  }

  /* wrapper trzyma toggler i menu razem */
  .nav-mobile-wrapper {
    position: relative;
  }

  #mainNav #navbarResponsive {
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    min-width: 140px;
    background-color: var(--color-white);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    clip-path: inset(0px -32px -32px -32px);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    z-index: 1049;
  }

  #mainNav #navbarResponsive:not(.show) {
    opacity: 0;
    transform: translateX(-50%) scaleY(0.92) translateY(-8px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  #mainNav #navbarResponsive.show {
    opacity: 1;
    transform: translateX(-50%) scaleY(1) translateY(0);
    pointer-events: auto;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  #mainNav #navbarResponsive .nav-link {
    padding: 0.6rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 1rem;
    text-align: center;
    white-space: nowrap;
  }

  #mainNav #navbarResponsive .nav-link:last-child {
    border-bottom: none;
  }

  #mainNav #navbarResponsive.collapsing {
    height: auto !important;
    display: block !important;
    opacity: 0.5;
    transition: opacity 0.15s ease;
  }
}


/* ============================================================
   05. VIDEO HEADER
   ============================================================ */

.video-header {
  position: relative;
  width: 100%;
  background-color: var(--color-black);
  text-align: center;
}

#background-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 82dvh;
  object-fit: cover;
  object-position: center;
  /* z-index: -1 zbędne - video nie jest position:absolute, overlay go przykrywa */
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    background-color: rgba(100, 100, 100, 0.2);
}

.video-overlay h1 {
    color: var(--color-white);
    font-family: var(--font-main);
    font-size: 2rem;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    padding-bottom: 20px;
    line-height: 1.2;
}

@media (max-width: 768px) {
  .video-header    { height: 80dvh; overflow: hidden; }
  #background-video { height: 100%; width: 100%; object-fit: cover; }

  .video-overlay h1 {
    color: var(--color-white);
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    padding-bottom: 15px;
    line-height: 1.2;
}
}


/* ============================================================
   06. BRUSH STROKES
   Dekoracyjne "pociągnięcia pędzla" oddzielające sekcje.
   .brush-top - górny (odwrócony, nad headerem)
   .brush-stroke - dolny (pod headerem)
   ============================================================ */

.brush-stroke {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-top: -40px;
  position: relative;
  z-index: 100;
}

.brush-stroke img {
  width: 110%;
  height: 60px;
  display: block;
  margin-left: -5%;
  object-fit: fill;
}

.brush-top {
  position: relative;
  z-index: 10;
  margin-bottom: -30px;
  margin-top: -25px;
  padding-bottom: 0 !important;
  transform: none !important;
}

/* Górny pędzel odwrócony pionowo */
.brush-top img {
  transform: scaleY(-1);
}


/* ============================================================
   07. SEKCJE - layout bazowy
   ============================================================ */

aside,
section {
  padding-top: 0;
  padding-bottom: 50px;
  position: relative;
  z-index: 2;
}


/* ============================================================
   08. PRZYCISK VIDEO (CTA w headerze)
   ============================================================ */

.btn-video-group {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 75px;
}

.btn-video {
  white-space: nowrap;
  font-size: clamp(0.75rem, 2.5vw, 1rem);
  padding: clamp(0.5rem, 1.5vw, 0.75rem)
           clamp(1rem, 3vw, 1.5rem);
  overflow: hidden;
}

.btn-video {
    --border-width: 1px;
    border-radius: 50rem;
    position: relative;
    color: white;
    text-decoration: none;
    background: hsl(0 0% 100% / 0.15);
  background: radial-gradient(circle at 50% 200%, rgba(255, 255, 255, 0.3), rgba(0, 0, 0, 0)) padding-box;
    backdrop-filter: blur(6px);
    transition: all 0.5s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn-video::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  border: var(--border-width) solid transparent;
  background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(160, 160, 160, 0.6)) border-box;
  mask: linear-gradient(black, black) border-box,
    linear-gradient(black, black) padding-box;
  mask-composite: subtract;
  transition: all 0.5s ease;
}

.btn-video:hover {
  color: white;
      background: hsl(0 0% 100% / 0.15);
  background: radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.4), rgba(0, 0, 0, 0)) padding-box;
}

.btn-video::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;

  background: linear-gradient(
     120deg, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, 0.15) 40%, rgba(0, 0, 0, 0) 80%
  );
  animation: light-sweep 5s ease-in-out infinite;
  opacity: 1;
}

@keyframes light-sweep {
  from {
    left: -500%;
  }
  to {
    left: 500%;
  }
}

.btn-video:nth-child(1)::after { animation-delay: 0s; }
.btn-video:nth-child(2)::after { animation-delay: 0.4s; }



/* ============================================================
   09. USŁUGI
   Siatka 2×2 z boxami na główne kategorie oferty.
   ============================================================ */

.usluga-box {
  background: #f8f8f8;
  border-radius: 10px;
  border-left: 4px solid var(--color-red);
  padding: 20px 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.usluga-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.usluga-icon {
  font-size: 1.6rem;
  color: var(--color-red);
  flex-shrink: 0;
}

.usluga-title {
  margin: 0;
}

.usluga-desc {
  font-size: 13px;
  color: var(--color-gray);
  line-height: 1.6;
  margin-bottom: 12px;
}

.usluga-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.usluga-tags span {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--color-gray);
  color: var(--color-white);
}

@media (max-width: 768px) {
  .usluga-tags {
    flex-wrap: nowrap;
  }
  .usluga-tags span {
    font-size: 10px;
    padding: 3px 8px;
    white-space: nowrap;
  }
}


/* ============================================================
   10. FILTRY NAWIGACYJNE
   Zakładki do filtrowania karuzeli oferty.
   Animowany podkreślnik "marker" rysowany przez SVG mask.
   ============================================================ */

/* ============================================================
   10. FILTRY NAWIGACYJNE
   ============================================================ */
.filters-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  overflow: visible;
  width: 100%;
}

.filters-nav a {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  font-size: clamp(0.8rem, 1.5vw, 1.8rem);  /* płynne skalowanie od razu */
  margin: 0 clamp(0.2rem, 1vw, 1rem);
  text-decoration: none;
  color: #777;
  font-weight: 400;
  cursor: pointer;
  flex-shrink: 1;
  transition: color 0.2s ease, font-size 0.2s ease;
}

.filters-nav a.active {
  color: #111;
  font-weight: 700;
  font-size: clamp(0.88rem, 1.65vw, 1.98rem);  /* 1.1x wartości z wyżej */
}

.filters-nav a:not(.active):hover {
  color: #333;
}

/* ── Podkreślnik "marker" ── */
.filters-nav a::after {
  content: "";
  position: absolute;
  inset: auto -0.3em -0.4em -0.3em;
  z-index: -1;
  height: 0.35em;
  background: linear-gradient(45deg, var(--color-red), var(--color-red-1), var(--color-red-2), var(--color-red-3), var(--color-red-1));
  -webkit-mask:
    url("data:image/svg+xml,%3csvg viewBox='0 0 100 10' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3e%3cpath d='M0,5 Q15,2 30,4 T60,5 Q75,7 90,5 T100,6' fill='none' stroke='white' stroke-width='6' stroke-linecap='round'/%3e%3c/svg%3e"),
    linear-gradient(#000 0 0),
    linear-gradient(90deg, #000 50%, #0000 0) content-box 100% 100% / 200% 200% no-repeat;
  mask:
    url("data:image/svg+xml,%3csvg viewBox='0 0 100 10' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3e%3cpath d='M0,5 Q15,2 30,4 T60,5 Q75,7 90,5 T100,6' fill='none' stroke='white' stroke-width='6' stroke-linecap='round'/%3e%3c/svg%3e"),
    linear-gradient(#000 0 0),
    linear-gradient(90deg, #000 50%, #0000 0) content-box 100% 100% / 200% 200% no-repeat;
  mask-composite: subtract;
  -webkit-mask-position: 100% 100%;
  mask-position: 100% 100%;
  transition: .35s cubic-bezier(0.70, 0.01, 0.60, 1.00);
}

.filters-nav a.active::after {
  -webkit-mask-position: 0% 0%;
  mask-position: 0% 0%;
}

.filters-nav a:not(.active):hover::after {
  -webkit-mask-position: 0% 0%;
  mask-position: 0% 0%;
}

@media (hover: none) {
  .filters-nav a:not(.active):hover::after {
    -webkit-mask-position: 100% 100%;
    mask-position: 100% 100%;
  }
}

/* ── Separator "|" – desktop ── */
.filters-sep {
  color: transparent;
  background: linear-gradient(to bottom, transparent 0%, #ccc 30%, #ccc 70%, transparent 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(0.8rem, 1.5vw, 1.8rem);  /* skaluje się razem z przyciskami */
  line-height: 1;
  user-select: none;
  pointer-events: none;
  transform: scaleY(2);
}

/* ── Mobile: lista ── */
@media (max-width: 768px) {
  .filters-nav {
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
  }

  .filters-nav a {
    font-size: clamp(1rem, 5vw, 1.4rem);
    margin: 0;
    padding: 0.4em 0;
    white-space: nowrap;
  }

  .filters-nav a.active {
    font-size: clamp(1.1rem, 5.5vw, 1.54rem);
  }

    .filters-nav a::after {
    inset: auto -0.3em 0.1em -0.3em;
  }

  /* separatory pionowe chowamy */
  .filters-sep {
    display: none;
  }

}

/* ============================================================
   11. KARUZELA POKAZÓW (show cards)
   ============================================================ */

/* ── Wrapper karuzeli ── */
#showsCarousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 24px 60px;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge */
}

#showsCarousel::-webkit-scrollbar {
  display: none;                /* Chrome/Safari */
}

/* ── Karta pokazu ── */
.show-card {
  scroll-snap-align: center;
  flex: 0 0 280px;
  background: var(--color-white);
  border-radius: 12px;
  border: 1px solid transparent;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease;
}

.show-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
}

/* Karta aktualnie wyróżniona (np. po fokusie z JS) */
.show-card.active {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
  z-index: 5;
}

/* ── Obrazek karty ── */
.show-card-img-wrap img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  display: block;
}

/* ── Treść karty ── */
.show-card-body {
  padding: 24px 16px 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.show-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

/* Tytuł zmienia kolor przy hoverze na karcie */
.show-card-title-row h5,
.show-card-title-row h3 {
  margin: 0;
  transition: color 0.25s ease;
}

.show-card:hover h5,
.show-card:hover h3 {
  color: var(--color-red);
}

/* Strzałka - przesuwa się w prawo przy hoverze */
.show-card-arrow {
  color: var(--color-red);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.show-card:hover .show-card-arrow {
  transform: translateX(3px);
}

.show-card-desc {
  font-size: 13px;
  color: var(--color-gray);
  line-height: 1.6;
  margin: 0 0 14px;
}

.show-card-more {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-red);
  text-decoration: none;
  padding: 0 16px 18px;
  margin-top: auto;
}

.show-card-more:hover {
  color: var(--color-red);
  opacity: 0.8;
}

/* ── Karta szeroka (INDYWIDUALNE ZLECENIA) ── */
.show-card.show-card-wide {
  flex: 0 0 100%;
  flex-direction: row;
  align-items: stretch;
}

.show-card.show-card-wide .show-card-img-wrap {
  flex: 0 0 280px;
}

.show-card.show-card-wide .show-card-img-wrap img {
  aspect-ratio: auto;
  height: 100%;
  object-fit: cover;
}

.show-card.show-card-wide .show-card-body {
  flex: 1;
}

@media (max-width: 768px) {
  .show-card.show-card-wide {
    flex-direction: column;
    flex: 0 0 260px;
  }

  .show-card.show-card-wide .show-card-img-wrap {
    flex: none;
  }

  .show-card.show-card-wide .show-card-img-wrap img {
    aspect-ratio: 5 / 4;
    height: auto;
  }
}

/* ── Strzałki nawigacyjne karuzeli ── */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  background: rgba(255, 255, 255, 0.95);
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  color: var(--color-red);
}

.carousel-arrow.left  { left: 12px; }
.carousel-arrow.right { right: 12px; }

.carousel-arrow:hover {
  transform: translateY(-50%) scale(1.06);
}

/* ── Efekty zaniku po bokach karuzeli ── */
.carousel-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8%;
  pointer-events: none;
  z-index: 20;
}

.carousel-fade.left  { left: 0;  background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0)); }
.carousel-fade.right { right: 0; background: linear-gradient(to left,  rgba(255,255,255,1), rgba(255,255,255,0)); }

/* ── Responsywność karuzeli ── */
@media (max-width: 992px) {
  #showsCarousel { padding: 20px calc(50% - 150px); }
  .show-card     { flex: 0 0 300px; }
}

@media (max-width: 768px) {
  #showsCarousel  { padding: 16px calc(50% - 120px); gap: 14px; }
  .show-card      { flex: 0 0 260px; }
  .carousel-fade  { display: none; }
}

/* Link-wrapper kart - resetuje domyślne style linku */
.link-plain {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
  transition: filter 0.25s ease;
}

.link-plain:hover,
.link-plain:focus,
.link-plain:active {
  color: inherit;
  text-decoration: none;
}


/* ============================================================
   12. O NAS
   Sekcja z tłem bg-light (Bootstrap), bez własnych klas.
   ============================================================ */

.onas-part1 {
  white-space: nowrap;
}

.onas-part2 {
  white-space: nowrap;
}

   @media (max-width: 480px) {
  .onas-part1, .onas-part2 {
    font-size: clamp(1rem, 5vw, 1.8rem);
    display: block;
    text-align: center;
  }
  #onas-subheading {
    font-size: clamp(0.9rem, 4vw, 1.5rem);
  }
}

.o-nas-underline {
  font-weight: bold;
  font-style: italic;
  position: relative;
  display: inline-block; 
}

.o-nas-underline:after {
  content: "";
  position: absolute;
  inset: auto -2px -3px -2px;
  z-index: -1;
  height: 3px;
  background: linear-gradient(
    45deg,
    var(--color-red),
    var(--color-red-1),
    var(--color-red-2),
    var(--color-red-3),
    var(--color-red-1)
  );
  -webkit-mask:
    url("data:image/svg+xml,%3csvg viewBox='0 0 100 6' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3e%3cpath d='M0,3 Q8,1 16,3 T26,3 T36,3 T46,3 T56,3 T66,3 T76,3 T86,3 T96,3' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3e%3c/svg%3e");
  mask:
    url("data:image/svg+xml,%3csvg viewBox='0 0 100 6' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3e%3cpath d='M0,3 Q8,1 16,3 T26,3 T36,3 T46,3 T56,3 T66,3 T76,3 T86,3 T96,3' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3e%3c/svg%3e");
}

.porozmawiajmy {
  color: var(--color-red-3);
  text-decoration: none;
}

.porozmawiajmy:hover {
  color: var(--color-red-1);
}

/* ============================================================
   13. PARTNERZY
   ============================================================ */

#partnerzy {
  padding-bottom: 100px;
  background: #f8f8f8;
}

.partnerzy-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* 6 kolumn na desktopie */
.partner-item {
  background: var(--color-white);
  border-radius: 8px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  flex: 0 0 calc((100% - 5 * 16px) / 6);
}

.partner-item img {
  max-width: 100%;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%) opacity(50%);
  transition: filter 0.3s ease;
}

.partner-item img:hover {
  filter: grayscale(0%) opacity(100%);
}

@media (max-width: 1200px) {
  .partner-item { flex: 0 0 calc((100% - 3 * 16px) / 4); }  /* 4 kolumny */
}

@media (max-width: 900px) {
  .partner-item { flex: 0 0 calc((100% - 1 * 16px) / 2); }  /* 2 kolumny */
}


/* ============================================================
   14. GALERIA
   Siatka kafelkowa z efektem powiększenia po hover.
   Zmienne --cols i --ratio-* zdefiniowane w :root (sekcja 01).
   ============================================================ */

.gallery-frame {
  width: 100%;
  aspect-ratio: var(--ratio-w) / var(--ratio-h);
  background: #0b0b0b;
  overflow: hidden;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  height: 100%;
}

.thumb {
  width: calc(100% / var(--cols));
  box-sizing: border-box;
  position: relative;
  overflow: visible;
}

/* Trick z padding-top utrzymuje kwadratowy kształt kafelka */
.thumb::before {
  content: '';
  display: block;
  padding-top: 100%;
}

.thumb-inner {
  position: absolute;
  inset: 0;
  display: block;
  overflow: visible;
}

/* Warstwa kadrowania (domyślna) */
.crop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.crop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--thumb-transition) ease;
}

/* Warstwa powiększonego podglądu (pojawia się przy hoverze) */
.contain {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
  transition: opacity var(--thumb-transition) ease, transform var(--thumb-transition) ease;
}

.contain img {
  width: auto;
  height: 350px;
  max-width: 350px;
  object-fit: contain;
}

/* Hover/fokus - kafelek wychodzi na wierzch i pokazuje podgląd */
.thumb:hover,
.thumb:focus-within {
  z-index: 40;
}

.thumb:hover .contain,
.thumb:focus-within .contain {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ── Responsywność galerii ── */

@media (min-width: 993px) and (max-width: 1200px) {
  :root { --cols: 6; }
  .gallery-frame             { aspect-ratio: auto; height: auto; }
  .thumb:nth-child(n + 31)   { display: none; }  /* max 30 zdjęć */
}

@media (max-width: 992px) {
  :root { --cols: 4; }
  .gallery-frame           { aspect-ratio: auto; height: auto; }
  .thumb                   { display: block; }
  .thumb:nth-child(n + 33) { display: none; }    /* max 32 zdjęcia */
}

/* Na urządzeniach dotykowych wyłączamy efekt hover (brak kursora) */
@media (hover: none) and (pointer: coarse) {
  .thumb:hover .contain,
  .thumb:focus-within .contain {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}


/* ============================================================
   15. LIGHTBOX
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  z-index: 9999;
}

/* Ciemne tło (pseudo-element zamiast osobnego diva) */
.lightbox::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #000;
  opacity: 0.5;
  z-index: -1;
}

/* Kontener na zdjęcie */
.stage {
  width: 100%;
  height: 100%;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6);
}

/* Przycisk zamknięcia */
.close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-white);
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  z-index: 10000;
}

/* Nawigacja lewo/prawo */
.navgallery {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.navgallery a {
  pointer-events: auto;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--color-white);
  text-decoration: none;
  font-size: 28px;
  margin: 0 12px;
}


/* ============================================================
   16. KONTAKT
   ============================================================ */

/* Linki wewnątrz sekcji kontaktu - jaśniejące przy hoverze */
#kontakt a:hover {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Ikona kontaktowa (kółko z ikoną) */
.kontakt-icon-box {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  color: var(--color-white);
}

/* Box "Szybkie info" z lewej strony formularza */
.kontakt-quickinfo {
  background: linear-gradient(
      180deg,
      rgba(128, 128, 128, 0.2) 0%,
      rgba(0, 0, 0, 0.2) 10%,
      rgba(96, 96, 96, 0.2) 100%
    ),
    rgba(0, 0, 0, 0.6);
  border-top: 2px solid rgba(255, 255, 255, 1);
  border-radius: 12px;
  padding: 35px 40px 60px;
  color: var(--color-white);
  font-size: 14px;
}

/* Białe tło formularza */
.kontakt-form-box {
  background: var(--color-white);
  border-radius: 14px;
  padding: 32px;
}

/* Pole formularza */
.kontakt-input {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.kontakt-input:focus {
  border-color: var(--color-red);
  box-shadow: 0 0 0 3px rgba(220, 15, 45, 0.1);
  outline: none;
}

/* Przycisk wyślij */
.kontakt-btn {
  background: var(--color-red);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.kontakt-btn:hover {
  background: var(--color-red-dark);
}

/* Widget ALTCHA */
altcha-widget {
  display: block;
  margin-bottom: 12px;
  --altcha-border-width: 1px;
  --altcha-border-radius: 8px;
  --altcha-color-border: #e0e0e0;
  --altcha-color-border-focus: #dc0f2d;
  --altcha-color-footerlink: #dc0f2d;
  --altcha-color-base: #ffffff;
  --altcha-color-text: #212529;
  --altcha-color-checkbox-bg: #dc0f2d;
  --altcha-color-checkbox: #ffffff;
  --altcha-max-width: 100%;
}

/* ============================================================
   Modal komunikatu formularza
   ============================================================ */
.form-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    display: none; /* domyślnie ukryty */
}

.form-modal--visible {
    display: flex; /* pokazuje się tylko z tą klasą */
}

.form-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 2rem 2rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.form-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0;
}

.form-modal-close:hover { color: #000; }

.form-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.form-modal-icon--ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.form-modal-icon--err {
    background: #fdecea;
    color: #c62828;
}

.form-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #111;
}

.form-modal-text {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.form-modal-btn {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.65rem 2.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.form-modal-btn:hover { background: #333; }


/* ============================================================
   17. FOOTER
   ============================================================ */

footer {
  position: relative;
  z-index: 2;
}

.footer-brand {
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}

.footer-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  margin: 0;
}

.footer-heading {
  color: var(--color-white);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--color-white);
}

/* Ikony social media */
.footer-social-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-red);
  color: var(--color-white) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.2s ease;
}

.footer-social-btn:hover {
  background: var(--color-red-dark);
  color: var(--color-white) !important;
}

/* Dolny pasek z copyrightem */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 576px) {
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}


/* ============================================================
   18. POMOCNICZE (utility classes)
   ============================================================ */

.bg-black                       { background-color: var(--color-black) !important; }
.bg-gradient-primary-to-secondary { background: linear-gradient(45deg, var(--color-red), var(--color-red-dark)) !important; }
.text-muted                     { color: var(--color-gray) !important; }
.lead                           { font-size: 1.25rem; font-weight: 300; }


/* ============================================================
   19. PRELOADER SPLASH ANIMATION SCREEN
   ============================================================ */


.preloader {
  width: 100vw;
  height: 100vh;
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-white);
  z-index: 9999;
    animation: whiteout 2s ease-in forwards;
  animation-delay: 3s;
}

.transition-container {
    width: 100vw;
  height: 100vh;
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOut 1.5s ease-out forwards;
  animation-delay: 3.5s;
}

.stack {
  display: grid;
  place-items: center;
  width: 250px;
  height: 250px;
}

.preloader-black {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;   /* zamiast 100%, żeby na pewno odnosiło się do viewportu */
  height: 50vh;
  background-color: var(--color-black);
  animation: blackBGout 1s ease-out forwards;
  animation-delay: 1.5s;
}

#splash-mazy {
 height: 250px;
  width: 250px;
  opacity: 0;
  animation: frameIntro 1.5s ease-out forwards;
  grid-area: 1 / 1; /* nakłada oba na tę samą komórkę siatki */
}

#splash-logo {
  height: 250px;
  width: 250px;
  opacity: 0;
  animation: logoFadeIn 1s ease-out forwards;
  animation-delay: 0.5s; /* startuje gdy ramka już prawie wylądowała */
  grid-area: 1 / 1; /* nakłada oba na tę samą komórkę siatki */
}

#splash-cale-logo {
  height: 250px;
  width: 250px;
  opacity: 0;
  animation: calelogoFadeIn 0.1s ease-out forwards;
  animation-delay: 2.1s; /* startuje gdy ramka już prawie wylądowała */
  grid-area: 1 / 1; /* nakłada oba na tę samą komórkę siatki */
}

@keyframes frameIntro {
  0% { opacity: 0; transform: scale(4.5) rotate(0deg);}
  100% { opacity: 1; transform: scale(1) rotate(720deg); }
}

@keyframes logoFadeIn {
  from { opacity: 0; transform: scale(0); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes calelogoFadeIn {
  from { opacity: 0;}
  to { opacity: 1;}
}

@keyframes blackBGout {
  0% { width: 100vw; height: 50vh; }
  50% { width: 220px; height: 220px; }
  99.9% { opacity: 1; width: 220px; height: 220px; }
  100% { opacity: 0; width: 0; height: 0; }
}

@keyframes fadeOut {
  0% { width: 100vw; height: 100vh; }
  99.9% { position-anchor: --nav-logo; left: anchor(left); top: anchor(top); width: 220px; height: 220px; scale: 0.25; translate: -36% -36%; }
  100% { position-anchor: --nav-logo; left: anchor(left); top: anchor(top); width: 220px; height: 220px; scale: 0.25; translate: -36% -36%; display: none;}
}


@keyframes whiteout {
  0% { width: 100vw; height: 100vh; background-color: var(--color-white); display: flex;}
  99.9% { width: 100vw; height: 100vh; background-color: rgba(255, 255, 255, 0); display: flex;}
  100% { width: 100vw; height: 100vh; background-color: rgba(255, 255, 255, 0); display: none;}
}