/* Kapi Studio — style.css
   Odtworzenie wyglądu dawnej strony WordPress (motyw „reklamizer”)
   bez frameworka CSS. Wartości: docs/audit/STYLE_REFERENCE.md.
   Breakpointy: 40em (640px) = medium, 64em (1024px) = large, 767px = własny próg starego motywu. */

:root {
  --primary: #f33;
  --primary-hover: #ff0808;
  --hollow-hover: #900;
  --text: #0a0a0a;
  --black: #0a0a0a;
  --white: #fefefe;
  --gray-600: #8a8a8a;
  --gray-500: #767676;
  --gray-200: #e6e6e6;
  --date: #777;
  --container: 75rem;
  --gutter: .625rem;      /* połowa odstępu kolumn (mobile) */
  --gap: 1.25rem;         /* odstęp kolumn */
}
@media (min-width: 40em) {
  :root { --gutter: .9375rem; --gap: 1.875rem; }
}

/* ---------- podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: inline-block; vertical-align: middle; border: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover, a:focus { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
p { margin: 0 0 1rem; line-height: 1.6; }
ul, ol { margin: 0 0 1rem 1.25rem; padding: 0; line-height: 1.6; }
address { font-style: normal; }
b, strong { font-weight: 700; }
.bold { font-weight: 700; }
.primary-color { color: var(--primary); }
.text-right { text-align: right; }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: inherit; font-style: normal; font-weight: 700; color: inherit;
  line-height: 1.2; margin: 0 0 .5rem; text-rendering: optimizeLegibility;
}
h1, .h1 { font-size: 1.5rem; }
h2, .h2 { font-size: 1.25rem; }
h3, .h3 { font-size: 1.1875rem; }
h4, .h4 { font-size: 1.125rem; }
h5, .h5 { font-size: 1.0625rem; }
h6, .h6 { font-size: 1rem; }
@media (min-width: 40em) {
  h1, .h1 { font-size: 2rem; }
  h2, .h2 { font-size: 1.75rem; }
  h3, .h3 { font-size: 1.5625rem; }
  h4, .h4 { font-size: 1.375rem; }
  h5, .h5 { font-size: 1.125rem; }
  h6, .h6 { font-size: 1rem; }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--white); padding: .5rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- układ ---------- */
.site { min-height: 100vh; display: flex; flex-direction: column; width: 100%; }
#content { flex: 1 0 auto; }
.container { max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.padding-20 { padding-top: 20px; padding-bottom: 20px; }
.padding-bottom { padding-bottom: 50px; }

hr { height: 0; max-width: var(--container); margin: 1.25rem auto; border: 0; clear: both; }
.redline { border: 2px solid var(--primary); width: 50%; margin-top: 12px; margin-bottom: 15px; }
.grayline { border: 2px solid var(--gray-200); width: 100%; margin-top: 12px; margin-bottom: 15px; }

/* ---------- nagłówek ---------- */
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; padding-top: 30px; padding-bottom: 30px; }
.site-header__logo { flex: 0 0 75%; max-width: 75%; }
.site-header__toggle { flex: 0 0 25%; max-width: 25%; }
.site-nav { flex: 0 0 100%; max-width: 100%; }
.logo { width: 250px; }
@media (min-width: 40em) {
  .site-header__logo { flex-basis: 100%; max-width: 100%; }
  .site-header__toggle { display: none; }
}
@media (min-width: 64em) {
  .site-header__logo { flex-basis: 33.3333%; max-width: 33.3333%; }
  .site-nav { flex-basis: 66.6667%; max-width: 66.6667%; }
}

/* menu */
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.menu__item { display: flex; justify-content: center; background: var(--white); border-radius: 2px; margin: 0 5px; }
.menu__item a { display: block; padding: .7rem 1rem; line-height: 1; color: var(--gray-500); font-weight: 700; }
.menu__item:hover, .menu__item.is-active { background: var(--primary); }
.menu__item:hover a, .menu__item a:focus, .menu__item.is-active a { color: var(--white); }
.menu__item a:focus-visible { background: var(--primary); outline-offset: 0; }
@media (min-width: 40em) {
  .menu { flex-direction: row; flex-wrap: wrap; justify-content: center; }
}
@media (min-width: 768px) {
  .menu { float: right; }
  .site-nav::after { content: ""; display: table; clear: both; }
}

/* menu mobilne: ukryte do czasu kliknięcia (bez JS pokazuje je noscript.css) */
@media (max-width: 39.9375em) {
  .site-nav { display: none; }
  .site-nav.is-open { display: block; animation: fade-in .5s linear; }
  .site-nav.is-closing { display: block; animation: fade-out .5s linear forwards; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }

/* hamburger (odtworzenie „hamburger--spin”) */
.hamburger {
  font: inherit; display: inline-block; overflow: visible; margin: 0; padding: 15px; cursor: pointer;
  color: inherit; border: 0; background: transparent; text-transform: none;
  transition: opacity .15s linear, filter .15s linear;
}
.hamburger:hover { opacity: .7; }
.hamburger-box { position: relative; display: inline-block; width: 40px; height: 24px; }
.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
  position: absolute; width: 40px; height: 4px; border-radius: 4px; background-color: #000;
  transition: transform .15s ease;
}
.hamburger-inner { display: block; top: 50%; margin-top: -2px;
  transition-duration: .22s; transition-timing-function: cubic-bezier(.55,.055,.675,.19); }
.hamburger-inner::before, .hamburger-inner::after { content: ""; display: block; }
.hamburger-inner::before { top: -10px; transition: top .1s ease-in .25s, opacity .1s ease-in; }
.hamburger-inner::after { bottom: -10px; transition: bottom .1s ease-in .25s, transform .22s cubic-bezier(.55,.055,.675,.19); }
.hamburger.is-active .hamburger-inner { transform: rotate(225deg); transition-delay: .12s; transition-timing-function: cubic-bezier(.215,.61,.355,1); }
.hamburger.is-active .hamburger-inner::before { top: 0; opacity: 0; transition: top .1s ease-out, opacity .1s ease-out .12s; }
.hamburger.is-active .hamburger-inner::after { bottom: 0; transform: rotate(-90deg); transition: bottom .1s ease-out, transform .22s cubic-bezier(.215,.61,.355,1) .12s; }

/* ---------- Oferta ---------- */
.baner {
  min-height: 400px; padding: 0 var(--gutter) 1.5rem;
  background: #8a8a8a url("../img/baner.jpg") center top / cover no-repeat;
  border-top: 4px solid var(--primary); border-bottom: 4px solid var(--primary);
}
.baner__text { color: var(--white); max-width: 700px; margin: 104px auto 0; text-align: center; }
.baner__text p { color: var(--white); text-align: center; }
@media (max-width: 767px) { .baner__text { margin-top: 60px; } }

.oferta { display: grid; grid-template-columns: 1fr; }
@media (min-width: 64em) { .oferta { grid-template-columns: repeat(3, 1fr); } }
.box-oferta { background: url("../img/triangle.png") top center no-repeat; padding-top: 20px; }
@media (max-width: 767px) { .box-oferta { background: none; } }
.box-wrapper { max-width: 346px; margin: 0 auto; }
.box-wrapper h2 { text-align: center; }
.box-wrapper img { margin-bottom: 15px; }
.box-wrapper p { font-size: .8rem; }

.led-box { text-align: center; margin: 0 auto; }
.led-box img { margin-top: 20px; margin-bottom: 30px; }

.red { background-color: var(--primary); }
.park-box { text-align: center; color: var(--white); }
.park-box h2 { margin-bottom: 20px; }
.park__list { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); }
.park__list h3 { margin-top: 15px; }
@media (min-width: 40em) { .park__list { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64em) { .park__list { grid-template-columns: repeat(6, 1fr); } }

/* ---------- Realizacje: kafle ---------- */
.cards { list-style: none; margin: 0; display: grid; grid-template-columns: 1fr; column-gap: var(--gap); }
@media (min-width: 40em) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card { display: flex; flex-direction: column; margin-bottom: 1rem; background: var(--white); color: var(--text); overflow: hidden; }
.card__image { display: block; height: 200px; border-bottom: 3px solid var(--primary); overflow: hidden; }
.card__image img { width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block; }
.card__body { flex: 1 0 auto; padding: 1rem 1rem 1rem 0; }
.card__client { color: var(--gray-600); margin-bottom: .5rem; line-height: 1.2; }
.card__title a { color: inherit; }
.card__title a:hover, .card__title a:focus { color: var(--primary); }
.card__excerpt { font-size: .8rem; }

/* ---------- Realizacja ---------- */
.realizacja__client { color: var(--gray-600); margin-bottom: .5rem; line-height: 1.2; }
.realizacja__zdjecia { list-style: none; margin: 0; padding-top: var(--gap); display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 40em) { .realizacja__zdjecia { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64em) { .realizacja__zdjecia { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Galeria ---------- */
.gallery-filter { list-style: none; margin: 0; padding: 0; font-size: 0; text-align: left; }
.gallery-filter li { display: inline-block; margin: 0 5px 5px 0; }
.gallery-filter__btn {
  display: block; box-sizing: content-box; height: 34px; line-height: 33px; padding: 0 15px; margin: 0;
  border: 1px solid #ebebeb; border-radius: 0; background: #fff; color: #444;
  font-family: inherit; font-size: 14px; cursor: pointer; transition: background-color .1s;
}
.gallery-filter__btn:hover { background: #333; color: #fff; }
.gallery-filter__btn.is-selected { background: #e3000f; color: #fff; }
.gallery { list-style: none; margin: 10px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }
@media (max-width: 960px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 650px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 450px) { .gallery { grid-template-columns: 1fr; } }
.gallery__item { border-radius: 3px; overflow: hidden; background: #000; }
.gallery__item[hidden] { display: none; }
.gallery__item.is-shown { animation: fade-in .3s ease-out; }
.gallery__item a { display: block; }
.gallery__item img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

/* ---------- Aktualności ---------- */
.aktualnosci__header { text-align: center; padding: 20px var(--gutter); }
.tease-post { display: grid; grid-template-columns: 1fr; column-gap: var(--gap); margin-bottom: 2rem; }
@media (min-width: 40em) { .tease-post { grid-template-columns: 1fr 2fr; } }
@media (min-width: 64em) { .tease-post { grid-template-columns: 1fr 3fr; } }
.tease-thumb img { width: 100%; height: auto; display: block; }
.post-date { font-size: .9rem; color: var(--date); margin-bottom: 1rem; }

.single-hero { width: 100%; max-height: 420px; overflow: hidden; margin-bottom: 2rem; }
.single-hero img { display: block; width: 100%; height: auto; max-height: 500px; object-fit: contain; }
.single-post__column { padding: 0 var(--gutter); }
@media (min-width: 40em) { .single-post__column { width: 83.3333%; margin-left: 8.3333%; } }
@media (min-width: 64em) { .single-post__column { width: 66.6667%; margin-left: 16.6667%; } }
.article-body ul { margin-left: 1.25rem; }

.button {
  display: inline-block; vertical-align: middle; margin: 0 0 1rem; padding: .85em 1em;
  border: 1px solid transparent; border-radius: 0; font-family: inherit; font-size: .9rem; line-height: 1;
  text-align: center; cursor: pointer; background: var(--primary); color: var(--white);
  transition: background-color .25s ease-out, color .25s ease-out;
}
.button.small { font-size: .75rem; }
.button.hollow { background: transparent; border-color: var(--primary); color: var(--primary); }
.button.hollow:hover, .button.hollow:focus { background: transparent; border-color: var(--hollow-hover); color: var(--hollow-hover); }
.button.expanded { display: block; width: 100%; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap); }

/* ---------- Kontakt ---------- */
.kontakt { min-height: 600px; text-align: center; }
.kontakt__block { padding: 20px 0; }

/* ---------- 404 ---------- */
.error-404 { text-align: center; padding-top: 40px; padding-bottom: 60px; min-height: 400px; }
.error-404__links { list-style: none; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

/* ---------- Stopka ---------- */
.site-footer { flex-shrink: 0; background: var(--black); color: var(--gray-200); text-align: center; font-size: .8rem; padding: 20px 0; }
.site-footer p { margin: 0; }
@media (max-width: 767px) { .site-footer { font-size: .6rem; } }

/* ---------- Lightbox (własny) ---------- */
.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(0, 0, 0, .85); color: #fff; }
.lb::backdrop { background: rgba(0, 0, 0, .85); }
.lb__stage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 12px 16px; }
.lb__figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.lb__img { display: block; max-width: min(1023px, calc(100vw - 24px)); max-height: calc(100vh - 130px); width: auto; height: auto;
  border: 4px solid #fff; border-radius: 3px; background: #fff; }
.lb__counter { margin-top: 10px; font-size: .9rem; line-height: 1.2; }
.lb__btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0;
  border: 2px solid rgba(255,255,255,.85); border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; }
.lb__btn:hover, .lb__btn:focus-visible { background: var(--primary); border-color: var(--primary); }
.lb__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lb__btn[disabled] { opacity: .3; cursor: default; }
.lb__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.lb__close { top: 8px; right: 8px; }
.lb__prev { left: 8px; top: 50%; margin-top: -24px; }
.lb__next { right: 8px; top: 50%; margin-top: -24px; }
@media (max-width: 640px) {
  .lb__prev, .lb__next { top: auto; bottom: 10px; margin-top: 0; }
  .lb__stage { padding-bottom: 70px; }
  .lb__img { max-height: calc(100vh - 170px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
