:root {
  --accent: #e21954;
  --text: #000;
  --muted: #98a2b8;
  --bg-soft: #f1f1f1;
  --nav-height: 82px;
  --nav-height-mobile: 70px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", sans-serif;
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
}

.menu a:hover,
footer a:hover {
  color: var(--accent);
}

/* Navbar */
.main-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.14);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-inner {
  position: relative;
  min-height: var(--nav-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
}

.logo-link img {
  height: 70px;
  width: auto;
  display: block;
}

.theme-toggle {
  border: 0;
  background: transparent;
  color: #222;
  width: 42px;
  height: 42px;
  padding: 0;
  font-family: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.theme-toggle:hover {
  background: transparent;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.theme-toggle .icon-moon {
  opacity: 0;
  transform: scale(0.8);
}

.theme-nav-item {
  display: flex;
  align-items: center;
}

.menu {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  color: #000;
  align-items: center;
}

.menu a {
  display: inline-block;
  transition: color 0.3s ease;
}

.call-nav-item a {
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}

.call-nav-item a:hover {
  color: #ff4f84;
}

.main-nav.scrolled {
  background: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.14);
}

.main-nav.scrolled .menu {
  color: #000;
}

.main-nav.scrolled .theme-toggle {
  color: #222;
  border: 0;
  background: transparent;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #111;
  padding: 0;
  width: 40px;
  height: 40px;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.realizacje-page .main-nav {
  background: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.14);
}

.realizacje-page .menu {
  color: #000;
}

.realizacje-page .theme-toggle {
  color: #222;
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100svh - var(--nav-height));
  background: url("assets/img/hero.jpg") center/cover no-repeat;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  margin-top: 0;
}

.hero-overlay,
.cta-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-overlay {
  background: rgba(0, 0, 0, 0.29);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 8vw, 60px);
  font-weight: 300;
  text-transform: uppercase;
}

.hero p {
  font-size: 20px;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.divider {
  display: block;
  width: 10%;
  border-top: 2px solid var(--accent);
  margin: 14px auto;
}

.divider.short {
  width: 5%;
}

.section {
  padding: 80px 0;
}

.section-head {
  text-align: center;
}

.section-head h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
}

.section-head p {
  color: var(--accent);
}

.about-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.about-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.about-grid img:hover {
  transform: scale(1.04);
}

.about-grid h3 {
  margin-top: 0;
  font-size: 30px;
  color: var(--accent);
}

.muted {
  color: var(--muted);
  text-align: justify;
}

.muted a {
  text-decoration: none;
}

blockquote {
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-soft);
  border-left: 7px solid #ddd;
  color: var(--accent);
}

blockquote cite {
  display: block;
  margin-top: 12px;
}

.checks {
  padding: 0;
  margin: 0;
  list-style: none;
}

.checks li {
  padding: 4px 0;
  color: #54595f;
}

.checks li::before {
  content: "✓ ";
  color: var(--accent);
}

.accordion {
  max-width: 980px;
  margin: 0 auto;
}

.accordion details {
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid #ececec;
}

.accordion summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: #54595f;
  padding: 15px 20px;
  position: relative;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.accordion summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #8f8f8f;
  transition: transform 0.3s ease, color 0.3s ease;
}

.accordion details[open] summary {
  color: var(--accent);
  background: #f7f7f7;
}

.accordion details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
  color: var(--accent);
}

.accordion-content {
  height: 0;
  overflow: hidden;
  padding: 0;
  background: #efefef;
  transition: height 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: height;
}

.accordion-content p {
  margin: 0;
  padding: 10px 20px 8px;
}

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

.realizacje-grid article {
  color: var(--accent);
  text-align: center;
}

.realizacje-grid h2 {
  margin: 0;
  color: #000;
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 400;
}

.realizacje-grid img {
  width: 100%;
  margin-top: 12px;
  transition: transform 0.3s ease;
}

.realizacje-grid img:hover {
  transform: scale(1.05);
}

.realizacje-hero {
  padding: 140px 0 50px;
  background:
    linear-gradient(140deg, rgba(226, 25, 84, 0.08), transparent 40%),
    linear-gradient(230deg, rgba(0, 0, 0, 0.04), transparent 45%),
    #fff;
}

.realizacje-hero h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(40px, 6vw, 58px);
}

.realizacje-hero p {
  margin: 0;
  text-align: center;
  color: #5f6472;
  font-size: 18px;
}

.realizacje-list-section {
  padding-top: 40px;
}

.realizacje-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.realizacja-card {
  border: 1px solid #e9ecf1;
  background: #fff;
  overflow: hidden;
}

.realizacja-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.realizacja-content {
  padding: 16px;
}

.realizacja-content h2 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.3;
}

.realizacja-content p {
  margin: 0;
  color: #5d6574;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.84);
  display: grid;
  place-items: center;
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  padding: 12px 22px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
  background: #c81247;
  transform: translateY(-1px);
}

.cta {
  position: relative;
  padding: 110px 0;
}

.cta .container {
  position: relative;
  z-index: 1;
}

.falubaz-sponsor {
  background:
    radial-gradient(circle at 15% 20%, rgba(237, 191, 38, 0.08), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(9, 161, 49, 0.12), transparent 50%),
    linear-gradient(155deg, #123424 0%, #0d281b 55%, #091d14 100%);
  border-top: 1px solid rgba(237, 191, 38, 0.28);
  border-bottom: 1px solid rgba(237, 191, 38, 0.22);
  overflow: hidden;
}

.falubaz-sponsor::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(237, 191, 38, 0.12), transparent);
  transform: skewY(-4deg) translateY(-68%);
}

.falubaz-content {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
  padding: 26px 30px;
  background: rgba(0, 0, 0, 0.16);
}

.falubaz-content img {
  width: 100%;
  max-width: 220px;
  background: transparent;
  padding: 0;
}

.falubaz-content h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  text-transform: uppercase;
}

.falubaz-content p {
  margin: 0 0 18px;
  color: #e4ece6;
  font-size: 18px;
  max-width: 780px;
}

.falubaz-sponsor .btn {
  background: #edbf26;
  color: #1f2a15;
}

.falubaz-sponsor .btn:hover {
  background: #ffd35a;
}

footer {
  background: #222;
  color: #fff;
}

.footer-grid {
  padding: 60px 0 30px;
  display: grid;
  gap: 26px;
  grid-template-columns: 1.4fr 0.8fr 0.9fr 1.3fr;
}

footer h3 {
  margin-top: 0;
}

footer p,
footer li {
  color: #d7d7d7;
}

footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

footer iframe {
  width: 100%;
  height: 300px;
  border: 0;
}

.copyright {
  text-align: center;
  padding: 16px;
  font-size: 14px;
  background: #111;
}

body.theme-dark {
  background: #0e1115;
  color: #e6ebf1;
}

body.theme-dark .main-nav {
  background: #111820;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.45);
}

body.theme-dark .main-nav.scrolled {
  background: #111820;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.45);
}

body.theme-dark .menu {
  color: #f3f5f8;
}

body.theme-dark .main-nav.scrolled .menu {
  color: #f3f5f8;
}

body.theme-dark .menu a:hover,
body.theme-dark footer a:hover {
  color: #ff5f8d;
}

body.theme-dark .call-nav-item a {
  color: var(--accent);
}

body.theme-dark .call-nav-item a:hover {
  color: #ff5f8d;
}

body.theme-dark .theme-toggle {
  border: 0;
  background: transparent;
  color: #f5f7fa;
}

body.theme-dark .theme-toggle:hover {
  background: transparent;
}

body.theme-dark .theme-toggle .icon-sun {
  opacity: 0;
  transform: scale(0.8);
}

body.theme-dark .theme-toggle .icon-moon {
  opacity: 1;
  transform: scale(1);
}

body.theme-dark .main-nav.scrolled .theme-toggle {
  color: #f8fbff;
}

body.theme-dark .hero-overlay {
  background: rgba(0, 0, 0, 0.5);
}

body.theme-dark .section {
  background: #10151d;
}

body.theme-dark.realizacje-page .main-nav {
  background: #111820;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.45);
}

body.theme-dark.realizacje-page .menu,
body.theme-dark.realizacje-page .theme-toggle {
  color: #f3f5f8;
}

body.theme-dark .section-head h2,
body.theme-dark .realizacje-grid h2 {
  color: #f5f7fa;
}

body.theme-dark .muted {
  color: #aeb8c6;
}

body.theme-dark blockquote {
  background: #1a2430;
  border-left-color: #324154;
}

body.theme-dark .checks li {
  color: #c5cfdd;
}

body.theme-dark .accordion details {
  background: #131b25;
  border-color: #283446;
}

body.theme-dark .accordion summary {
  color: #d3dbe8;
}

body.theme-dark .accordion details[open] summary {
  background: #1a2430;
}

body.theme-dark .accordion-content {
  background: #202c3a;
}

body.theme-dark .realizacje-hero {
  background:
    linear-gradient(140deg, rgba(226, 25, 84, 0.16), transparent 42%),
    linear-gradient(230deg, rgba(255, 255, 255, 0.08), transparent 50%),
    #10151d;
}

body.theme-dark .realizacje-hero p,
body.theme-dark .realizacja-content p {
  color: #c4cedb;
}

body.theme-dark .realizacja-card {
  background: #131b25;
  border-color: #283446;
}

body.theme-dark .falubaz-content {
  background: rgba(0, 0, 0, 0.28);
}

body.theme-dark footer {
  background: #0c1218;
}

body.theme-dark footer p,
body.theme-dark footer li {
  color: #aeb8c6;
}

body.theme-dark .copyright {
  background: #070b0f;
  color: #9eacbe;
}

.reveal,
.reveal-right {
  opacity: 0;
  transition: transform 0.8s ease, opacity 0.8s ease;
}

.reveal {
  transform: translateY(24px);
}

.reveal-right {
  transform: translateX(30px);
}

.reveal.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

@media (max-width: 1024px) {
  .main-nav,
  .main-nav.scrolled {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    padding-top: 0;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.14);
  }

  .main-nav .menu,
  .main-nav.scrolled .menu {
    color: #111;
  }

  .hero {
    min-height: calc(100vh - var(--nav-height-mobile));
    min-height: calc(100svh - var(--nav-height-mobile));
  }

  body.theme-dark .main-nav,
  body.theme-dark .main-nav.scrolled {
    background: #111820;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.45);
  }

  .nav-inner {
    min-height: var(--nav-height-mobile);
    gap: 12px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .logo-link img {
    height: 48px;
  }

  .menu-toggle {
    display: inline-flex;
    color: #111;
  }

  body.theme-dark .menu-toggle {
    color: #fff;
  }

  .menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(73, 73, 73, 0.97);
    color: #fff;
    min-width: 240px;
    max-width: 92vw;
    flex-direction: column;
    padding: 12px;
    z-index: 50;
  }

  .theme-nav-item {
    width: 100%;
  }

  .theme-toggle {
    width: 100%;
    height: 42px;
    justify-self: stretch;
  }

  body.theme-dark .menu {
    background: rgba(15, 21, 29, 0.96);
  }
  .menu.open {
    display: flex;
  }

  .about-grid,
  .realizacje-grid,
  .realizacje-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 60px 0;
  }

  .cta {
    padding: 60px 0;
  }

  .falubaz-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .falubaz-content img {
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
