/* ==========================================================================
   Projekty drogowe - projekty-drogowe.net
   Modern responsive rebuild of the original Adobe Muse site.
   Design by Colorpeak.co.uk
   ========================================================================== */

/* Self-hosted Open Sans (variable, weights 300-800), SIL OFL licence */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/open-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/open-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #282828;
  --body: #000000;
  --gray-text: #626262;
  --footer-text: #6F6F6F;
  --line: #DDDDDD;
  --blue: #0071BC;
  --green-accent: #2BBC48;
  --green-dot: #388B43;
  --green-line: #082E1F;
  --orange: #DD7E10;
  --header-dark: #011D26;
  --card-bg: #E9E9E9;
  --font: "Open Sans", "Segoe UI", Arial, "Helvetica Neue", Helvetica, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  background: #FFFFFF;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--blue); text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* --------------------------------------------------------------------------
   Page header (over the green banner)
   -------------------------------------------------------------------------- */

.site-header { padding-top: 0; }

.site-header .container {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1 1 auto;
  min-width: 0;
}

.brand:hover { text-decoration: none; }

.brand-logo { width: 100px; height: 100px; flex: 0 0 auto; }

.brand-name {
  color: #FFFFFF;
  font-size: 19px;
  font-weight: 400;
  padding-left: 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  line-height: 1.2;
}

.brand:hover .brand-name { color: #FFFFFF; }

.site-nav {
  display: flex;
  margin-top: 30px;
  background: rgba(1, 29, 38, 0.55);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.site-nav a {
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 18px;
  white-space: nowrap;
  transition: background-color 0.25s ease;
}

.site-nav a:hover {
  color: #FFFFFF;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
}

.site-nav a[aria-current="page"] {
  font-weight: 700;
  background: rgba(0, 0, 0, 0.35);
}

/* --------------------------------------------------------------------------
   Sticky bar (slides in after scrolling past the banner)
   -------------------------------------------------------------------------- */

.sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.sticky-bar.is-visible { transform: translateY(0); opacity: 1; }

.sticky-bar .container {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
}

.sticky-nav { display: flex; gap: 22px; margin-left: auto; }

.sticky-nav a {
  color: var(--body);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sticky-nav a[aria-current="page"] {
  color: var(--green-accent);
  font-weight: 700;
}

.sticky-nav a[aria-current="page"]:hover { text-decoration: none; }

.sticky-logo { width: 39px; height: 39px; flex: 0 0 auto; order: -1; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* --------------------------------------------------------------------------
   Green banner / hero
   -------------------------------------------------------------------------- */

.hero {
  background: var(--header-dark) url("../images/background-home-green.webp") no-repeat center top / cover;
  color: #FFFFFF;
  position: relative;
}

/* Divider between the header/menu and the page content */
.header-rule {
  border: 0;
  height: 1px;
  margin: 14px 0 0;
  background: rgba(1, 29, 38, 0.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Home hero: text left, slideshow right (overhanging the bottom edge) */

.hero-home .hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-top: 90px;
  padding-bottom: 96px;
}

.hero-title {
  font-size: 65px;
  line-height: 1.1;
  margin-bottom: 28px;
}

.hero-lead {
  font-size: 21px;
  font-weight: 300;
  line-height: 1.45;
}


/* Slideshow */

.slideshow {
  position: relative;
  width: min(462px, 100%);
  aspect-ratio: 1 / 1;
  justify-self: end;
  margin-top: 30px;   /* push the scroll down so it dips into the section below */
  margin-bottom: -220px;   /* paper scroll hangs over the banner edge */
  z-index: 5;
}

.slideshow .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(10%);
  transition: opacity 1s ease, transform 1s ease;
  pointer-events: none;
}

.slideshow .slide.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.slideshow .slide.is-leaving {
  opacity: 0;
  transform: translateY(-10%);
}

.dots {
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 48px 0 0;
  list-style: none;
}

.dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid #C4C4C4;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  font-size: 0;
}

.dots button:hover { background: var(--orange); border-color: #999999; }

.dots button[aria-current="true"] { background: var(--green-dot); border-color: #999999; }

/* Sub-page banner (Realizacje / Kontakt) */

.hero-sub .hero-inner {
  padding-top: 24px;
  padding-bottom: 48px;
  text-align: center;
}

.section.section-after-hero { padding-top: 130px; }

/* --------------------------------------------------------------------------
   Home content sections
   -------------------------------------------------------------------------- */

.section { padding: 56px 0 0; }

.section h2 {
  font-size: 21px;
  line-height: 2;
}

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.cols-2 .bodytext { text-align: justify; }

.divider {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 40px 0 0;
}

.services p { margin-top: 2px; }
.services .lead { margin-bottom: 6px; }

.services ul {
  list-style: square;
  margin: 0;
  padding-left: 20px;
}

.services ul li { margin-top: 2px; }

.services .muted,
.services .muted li {
  color: var(--gray-text);
  font-size: 17px;
  line-height: 1.4;
}

.services .muted-heading {
  color: var(--gray-text);
  font-size: 17px;
  margin-top: 18px;
}

.services ul.indented { padding-left: 40px; }

/* Selected projects teaser */

.teaser h2 a { color: var(--body); }
.teaser h2 a:hover { color: var(--blue); text-decoration: none; }

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 12px;
}

.teaser-grid figure { margin: 0; }

.teaser-grid img {
  width: 100%;
  max-width: 225px;   /* native size of these images - upscaling makes them blurry */
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.teaser-grid a:hover img { opacity: 0.85; }

.teaser-grid figcaption {
  font-size: 11px;
  text-align: center;
  line-height: 1.35;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Realizacje - intro rotator and gallery
   -------------------------------------------------------------------------- */

.rotator {
  position: relative;
  min-height: 72px;
  max-width: 860px;
  margin: 24px auto 0;
}

.rotator p {
  position: absolute;
  inset: 0;
  margin: 0 auto;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.rotator p.is-active { opacity: 1; }

.hero-sub .dots { justify-content: center; margin-top: 20px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  padding: 48px 0 0;
}

.gallery button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.gallery img {
  width: 100%;
  aspect-ratio: 307 / 213;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.gallery button:hover img,
.gallery button:focus-visible img { opacity: 0.8; }

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  padding: 24px;
  touch-action: pan-y;
}

.lightbox.is-open { display: flex; }

.lightbox figure {
  margin: 0;
  max-width: min(1115px, 88vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(92vh - 80px);
  width: auto;
  height: auto;
  margin: 0 auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.lightbox figcaption {
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 300;
  text-align: center;
  padding: 16px 8px 0;
}

.lightbox-btn {
  border: 0;
  color: #FFFFFF;
  cursor: pointer;
  font-family: var(--font);
  line-height: 1;
  background: rgba(255, 255, 255, 0.14);
  transition: background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible { background: rgba(255, 255, 255, 0.28); }

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 28px;
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 300;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Desktop: big round arrows on the sides, counter bottom-centre */
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 38px;
  font-weight: 300;
  padding-bottom: 6px;   /* optically centre the glyph */
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-controls .lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
}

/* Mobile: full-width bottom control bar with large tap targets */
@media (max-width: 640px) {
  .lightbox.is-open {
    flex-direction: column;
    padding: 0;
  }

  .lightbox figure {
    flex: 1 1 auto;
    min-height: 0;
    max-width: 100%;
    max-height: none;
    justify-content: center;
    padding: 56px 12px 8px;
  }

  .lightbox img { max-height: calc(100dvh - 210px); }

  .lightbox figcaption { font-size: 13px; padding: 12px 12px 0; }

  .lightbox-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .lightbox-prev, .lightbox-next {
    position: static;
    transform: none;
    flex: 1 1 0;
    height: 60px;
    border-radius: 14px;
    font-size: 34px;
  }

  .lightbox-controls .lightbox-counter {
    position: static;
    transform: none;
    flex: 0 0 auto;
    min-width: 64px;
  }
}

/* --------------------------------------------------------------------------
   Kontakt
   -------------------------------------------------------------------------- */

.kontakt-main {
  background: var(--header-dark) url("../images/background-home-green.webp") no-repeat center top / cover;
  padding-bottom: 72px;
}

.kontakt-main .hero { background: none; }

.kontakt-card {
  background: var(--card-bg);
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  padding: 32px 34px 72px;
  margin-top: 48px;
}

.kontakt-card > h1 { font-size: 22px; }

.kontakt-details {
  text-align: center;
  margin-top: 30px;
}

.kontakt-details h2 { font-size: 21px; }

.kontakt-details p { margin-top: 18px; }

.kontakt-details a { color: var(--body); }
.kontakt-details a:hover { color: var(--blue); }

/* --------------------------------------------------------------------------
   Prose pages (privacy policy) and error page
   -------------------------------------------------------------------------- */

.prose { padding-top: 48px; }

.prose h1 { font-size: 28px; }

.prose h2 { font-size: 19px; margin-top: 32px; }

.prose p { margin-top: 12px; }

.prose-meta { color: var(--gray-text); font-size: 14px; }

.prose ul { margin: 12px 0 0; padding-left: 22px; }
.prose ul li { margin-top: 6px; list-style: square; }
.prose ol { margin: 12px 0 0; padding-left: 22px; }
.prose ol li { margin-top: 6px; list-style: decimal; }

.prose figure { margin: 28px 0 0; }
.prose figure img { width: 100%; height: auto; }
.prose figcaption {
  font-size: 12px;
  color: var(--gray-text);
  text-align: center;
  margin-top: 8px;
}

.faq h3 { font-size: 17px; margin-top: 26px; }
.faq p { margin-top: 8px; }

.cta-box {
  background: var(--card-bg);
  border-radius: 4px;
  padding: 26px 28px 30px;
  margin-top: 44px;
  text-align: center;
}

.cta-box .cta-phone { font-size: 21px; font-weight: 700; }
.cta-box a { color: var(--body); }
.cta-box a:hover { color: var(--blue); }

.crosslink { margin-top: 28px; font-size: 15px; }
.crosslink a, .services a { color: var(--blue); }

.error-page {
  text-align: center;
  padding: 96px 20px 72px;
}

.error-page h1 { font-size: 65px; }

.error-page p { margin-top: 16px; font-size: 18px; }

.error-page a { color: var(--blue); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { padding: 34px 0 30px; }

.site-footer .container {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  text-align: center;
  font-size: 12px;
  font-weight: 300;
  color: var(--footer-text);
}

.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: var(--blue); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .hero-home .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 48px;
    padding-bottom: 56px;
  }

  .hero-title { font-size: 48px; }

  .slideshow {
    justify-self: center;
    margin-top: 0;
    margin-bottom: -100px;
  }


  .section-after-hero { padding-top: 140px; }

  .teaser-grid { grid-template-columns: repeat(2, 1fr); }

  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .site-header .container { flex-wrap: wrap; }

  .brand-logo { width: 72px; height: 72px; }

  .brand-name { font-size: 17px; padding-left: 16px; }

  .brand { gap: 16px; }

  .site-nav { margin: 0 auto 20px; }

  .site-nav a { padding: 10px 14px; font-size: 13px; }

  .sticky-nav { gap: 14px; }
  .sticky-nav a { font-size: 12px; }

  .hero-title { font-size: 38px; }
  .hero-lead { font-size: 18px; }

  .cols-2 { grid-template-columns: 1fr; gap: 24px; }

  .teaser-grid { grid-template-columns: 1fr; }

  .gallery { grid-template-columns: 1fr; }

  .rotator { min-height: 120px; }

  .kontakt-card { padding: 24px 20px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slideshow .slide, .rotator p, .sticky-bar { transition: none; }
}
