/* ==========================================================================
   ZAKŁAD STOLARSKI Leszek Joksz — wierna rekonstrukcja wyglądu oryginału
   Oryginalny szablon: Joomla + Helix3 (JoomShaper), preset1:
   bg #ffffff / text #000000 / accent #f26522, font Open Sans
   ========================================================================== */

:root {
  --bg:           #ffffff;
  --bg-alt:       #f5f5f5;   /* Top Bar / Bottom modules row w oryginale */
  --text:         #333333;
  --text-strong:  #111111;
  --gray:         #999999;   /* Top Bar text w oryginale */
  --border:       #e6e6e6;

  --accent:       #f26522;   /* preset1_major z bazy danych */
  --accent-dark:  #d1550f;

  --dark:         #1c1c1c;   /* pasek copyright */
  --dark-2:       #2a2a2a;

  --font-body:    "Open Sans", "Segoe UI", sans-serif;
  --font-heading: "Open Sans", "Segoe UI", sans-serif;

  --gap-xs: .5rem;
  --gap-sm: 1rem;
  --gap-md: 2rem;
  --gap-lg: 4rem;
  --gap-xl: 5.5rem;

  --radius: 4px;
  --shadow-soft: 0 12px 30px -18px rgba(0,0,0,.35);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-dark); }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-strong);
  margin: 0 0 .6em;
}
h1 { font-weight: 800; }
h2 { font-weight: 600; }
h3, h4 { font-weight: 400; }
h5, h6 { font-weight: 800; }

.container {
  width: min(1180px, 92%);
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}
.eyebrow-lg {
  font-size: 1.35rem;
  letter-spacing: .04em;
  font-weight: 800;
  text-transform: none;
  color: var(--accent);
}
.eyebrow-lg::before { background: var(--accent); }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ==========================================================================
   Header — biały pasek, logo + menu poziome (Helix3: Header row col-3/col-9)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--gap-md);
  min-height: 70px;
  padding: 0;
}

.brand {
  position: absolute;
  left: 0;
  top: 6px;
  z-index: 5;
}
.brand-mark {
  height: 112px;
  width: auto;
  flex-shrink: 0;
  display: block;
}
@media (max-width: 600px) {
  .brand { top: 6px; }
  .brand-mark { height: 80px; }
}

.main-nav { display: flex; }
.main-nav > ul { display: flex; align-items: center; gap: 1.9rem; }
.main-nav a.nav-link {
  color: var(--text-strong);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .5rem 0;
  position: relative;
}
.main-nav a.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.main-nav a.nav-link:hover,
.main-nav a.nav-link.is-active { color: var(--accent); }
.main-nav a.nav-link:hover::after,
.main-nav a.nav-link.is-active::after,
.main-nav li.has-children:hover a.nav-link::after { transform: scaleX(1); }

.main-nav li.has-children { position: relative; }
.main-nav .dropdown {
  position: absolute;
  top: calc(100% + .9rem);
  left: -1rem;
  min-width: 220px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: .4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  box-shadow: var(--shadow-soft);
}
.main-nav li.has-children:hover .dropdown,
.main-nav li.has-children:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.main-nav .dropdown a {
  display: block;
  padding: .55rem .8rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  border-radius: 2px;
  text-transform: none;
}
.main-nav .dropdown a:hover { background: var(--bg-alt); color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 42px; height: 38px;
  color: var(--text-strong);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed;
    inset: 71px 0 0 0;
    background: var(--bg);
    display: none;
    overflow-y: auto;
    padding: 1.2rem 0 3rem;
  }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid var(--border); }
  .main-nav a.nav-link { display: block; padding: 1rem var(--gap-sm); }
  .main-nav .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    display: none; background: var(--bg-alt); border: none; box-shadow: none;
    padding: 0 var(--gap-sm) .5rem;
  }
  .main-nav li.has-children.open .dropdown { display: block; }
}

/* ==========================================================================
   Hero (Home)
   ========================================================================== */

.hero {
  position: relative;
  color: var(--text-strong);
  background-color: #f2f2f2;
  background-size: cover;
  background-position: center;
  padding: var(--gap-xl) 0 1.8rem;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  background: rgba(255,255,255,.55);
  padding: 2.2rem 2.4rem;
  border-radius: var(--radius);
}
@media (max-width: 560px) { .hero-inner { padding: 1.4rem 1.3rem; } }
.hero h1 {
  color: var(--text-strong);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.18;
  margin-top: .5rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead {
  color: var(--text);
  font-size: 1.05rem;
  max-width: 56ch;
  margin-top: 1.1rem;
  font-weight: 300;
}
.hero-actions { margin-top: var(--gap-md); display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .8rem 1.7rem;
  border-radius: var(--radius);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.hero .btn-ghost { border-color: rgba(17,17,17,.35); color: var(--text-strong); }
.hero .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ==========================================================================
   Sekcja oferty
   ========================================================================== */

.offer { padding: 1.8rem 0 var(--gap-xl); }
.section-head { max-width: 640px; margin-bottom: 1.8rem; }
.section-head h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin-top: .4rem; }

.offer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
@media (max-width: 980px) { .offer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .offer-grid { grid-template-columns: 1fr; } }

.offer-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem 1.9rem;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.offer-card:hover { box-shadow: var(--shadow-soft); transform: translateY(-4px); border-color: var(--accent); }
.offer-card .num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: .6rem;
  display: block;
}
.offer-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .8rem; }
.offer-card ul { display: flex; flex-direction: column; gap: .45rem; }
.offer-card li {
  font-size: .89rem;
  color: var(--text);
  padding-left: 1rem;
  position: relative;
}
.offer-card li::before {
  content: "";
  position: absolute; left: 0; top: .6em;
  width: 6px; height: 2px;
  background: var(--accent);
}
.offer-card a.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* ==========================================================================
   CTA pasek — pomarańczowy, jak sekcje CTA w Helix3
   ========================================================================== */

.cta-strip { padding: var(--gap-lg) 0; color: #fff; }
.cta-strip .container {
  display: flex; align-items: center; justify-content: center;
  gap: 1.6rem; flex-wrap: wrap; text-align: center;
  background: rgba(242,101,34,.72);
  padding: 1.8rem 2.2rem;
  border-radius: var(--radius);
}
.cta-strip h2 { color: #fff; font-size: clamp(1.2rem, 2.2vw, 1.8rem); max-width: 32ch; margin: 0; }
.cta-strip .btn-primary { background: #fff; color: var(--accent); }
.cta-strip .btn-primary:hover { background: var(--dark); color: #fff; }

/* ==========================================================================
   Galeria / karuzela realizacji
   ========================================================================== */

.gallery { padding: 1.8rem 0 var(--gap-xl); }

.carousel { position: relative; max-width: 920px; margin: 0 auto; }

.carousel-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-alt);
  box-shadow: var(--shadow-soft);
}

.carousel-track { display: flex; height: 100%; transition: transform .55s cubic-bezier(.65,0,.35,1); }
.carousel-slide { flex: 0 0 100%; height: 100%; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }

.carousel-frame .corner {
  position: absolute; width: 30px; height: 30px;
  border: 2px solid var(--accent);
  z-index: 2; pointer-events: none;
}
.corner.tl { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.corner.tr { top: 12px; right: 12px; border-left: none; border-bottom: none; }
.corner.bl { bottom: 12px; left: 12px; border-right: none; border-top: none; }
.corner.br { bottom: 12px; right: 12px; border-left: none; border-top: none; }

.carousel-btn {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 44px; height: 44px; border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.85);
  color: var(--text-strong);
  font-size: 1.2rem;
  display: grid; place-items: center;
  cursor: pointer; z-index: 3;
  transition: background .2s ease, color .2s ease;
}
.carousel-btn:hover { background: var(--accent); color: #fff; }
.carousel-btn.prev { left: 14px; }
.carousel-btn.next { right: 14px; }

.carousel-dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.1rem; }
.carousel-dots button {
  width: 9px; height: 9px; border-radius: 50%;
  border: none; background: var(--border); cursor: pointer; padding: 0;
}
.carousel-dots button[aria-current="true"] { background: var(--accent); }

/* ==========================================================================
   Footer — jasny pasek modułów (Bottom) + ciemny pasek copyright
   ========================================================================== */

.site-footer { background: var(--bg-alt); color: var(--text); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr .8fr 1.1fr;
  gap: var(--gap-lg);
  align-items: start;
  padding: var(--gap-xl) 0 var(--gap-lg);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-banner-col { display: flex; justify-content: center; }
.footer-banner-col img { border-radius: var(--radius); width: auto; max-width: 100%; }
@media (max-width: 900px) { .footer-banner-col { grid-column: 1 / -1; justify-content: flex-start; } }

.plaque {
  border: 1px solid var(--border);
  padding: 1.6rem 1.8rem;
  border-radius: var(--radius);
  background: #fff;
}
.plaque h3 { color: var(--accent); font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; font-weight: 800; }
.plaque p { margin: .25rem 0; font-size: .92rem; }
.plaque a { color: var(--text-strong); border-bottom: 1px solid var(--text-strong); }
.plaque a:hover { color: var(--accent); border-color: var(--accent); }

.footer-links h3 { color: var(--accent); font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; font-weight: 800; }
.footer-links ul { margin-top: .8rem; display: flex; flex-direction: column; gap: .55rem; }
.footer-links a { font-size: .92rem; color: var(--text); }
.footer-links a:hover { color: var(--accent); }


.footer-bottom { background: var(--dark); color: rgba(255,255,255,.65); }
.footer-bottom .container {
  padding: 1.1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  justify-content: space-between;
  font-size: .8rem;
}
.footer-bottom a { color: rgba(255,255,255,.75); }
.footer-bottom a:hover { color: var(--accent); }

/* ==========================================================================
   Banner podstrony ("Jesteś tutaj" + tytuł)
   ========================================================================== */

.page-hero {
  position: relative;
  color: #fff;
  background-color: #2a2a2a;
  background-size: cover;
  background-position: center;
  padding: 1.4rem 0 1.5rem;
}
.page-hero .container { padding-left: 150px; }
@media (max-width: 700px) {
  .page-hero { padding: 1.1rem 0 1.2rem; }
  .page-hero .container { padding-left: 100px; }
}
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: .2rem 0 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .8rem; color: rgba(255,255,255,.85); }
.breadcrumb a { color: var(--accent); }
.breadcrumb .sep { color: rgba(255,255,255,.4); }

/* ==========================================================================
   Sekcje treści podstrony
   ========================================================================== */

.prose-section { padding: 1.8rem 0 var(--gap-lg); }
.prose-section .lede { font-size: 1.02rem; max-width: 68ch; color: var(--text); }
.prose-section .lede + .lede { margin-top: .4rem; }

.offer-teasers {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; margin-top: var(--gap-md);
}
@media (max-width: 980px) { .offer-teasers { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .offer-teasers { grid-template-columns: 1fr; } }

.teaser-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/5; color: #fff; box-shadow: var(--shadow-soft);
}
.teaser-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.teaser-card:hover img { transform: scale(1.06); }
.teaser-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,20,20,0) 40%, rgba(20,20,20,.85) 100%);
}
.teaser-card .teaser-label {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 1rem 1.1rem 1.1rem; font-weight: 700; font-size: 1rem;
  border-top: 3px solid var(--accent);
}

.offer-detail-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-md) var(--gap-lg);
  margin-top: var(--gap-lg);
}
@media (max-width: 760px) { .offer-detail-list { grid-template-columns: 1fr; } }
.offer-detail-list h3 { font-size: 1rem; font-weight: 700; color: var(--accent); margin-bottom: .5rem; }
.offer-detail-list li {
  font-size: .92rem; color: var(--text); padding-left: 1rem; position: relative; margin-bottom: .3rem;
}
.offer-detail-list li::before {
  content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 2px; background: var(--accent);
}

/* ==========================================================================
   Galerie realizacji (siatki miniatur) + lightbox
   ========================================================================== */

.gallery-block { padding: var(--gap-lg) 0; }
.gallery-block + .gallery-block { border-top: 1px solid var(--border); }
.gallery-block h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.2rem; }
.gallery-count { font-size: .8rem; color: var(--gray); font-weight: 400; margin-left: .6em; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.gallery-grid button {
  border: none; padding: 0; cursor: zoom-in; aspect-ratio: 1/1;
  border-radius: 2px; overflow: hidden; background: var(--bg-alt); position: relative;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-grid button:hover img { transform: scale(1.08); }

.lightbox {
  position: fixed; inset: 0; background: rgba(10,10,10,.94); z-index: 1000;
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 84vh; object-fit: contain; border: 2px solid rgba(255,255,255,.15); }
.lightbox-close, .lightbox-nav {
  position: absolute; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35);
  color: #fff; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
}
.lightbox-close { top: 18px; right: 18px; width: 42px; height: 42px; font-size: 1.2rem; }
.lightbox-nav { top: 50%; translate: 0 -50%; width: 52px; height: 52px; font-size: 1.4rem; }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.lightbox-caption { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.85); font-size: .85rem; }

/* ==========================================================================
   Kontakt
   ========================================================================== */

.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: var(--gap-lg); align-items: start; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-soft); aspect-ratio: 4/3; }
.map-frame iframe { width: 100%; height: 100%; border: 0; }

.contact-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem 1.9rem; }
.contact-card h2 { font-size: 1.25rem; font-weight: 700; }
.contact-card p { margin: .3rem 0; color: var(--text); }
.contact-card a { color: var(--accent); border-bottom: 1px solid var(--accent); }
