/* =========================================================
   Enter Air Training Center – główny arkusz stylów
   Standard RECT. Studio | rect.pl
   Kolejność sekcji zgodna z CLAUDE.md pkt. 5
   ========================================================= */

:root {
  /* Kolory */
  --white: #FFFFFF;
  --primary: #0BA6DA;
  --primary-dark: #0A8CB8;
  --accent-1: #D6EFF9;
  --accent-2: #F0F9FD;
  --text: #16232B;
  --text-light: #5B6469;
  --muted: #939699;
  --medium: #E6EAEC;
  --medium-strong: #D2D8DB;
  --light: #F5F7F8;
  --lightest: #FAFBFB;
  --dark: #101A21;
  --dark-border: #2A3841;
  --error: #D64545;

  /* Odstępy */
  --gap-s: 20px;
  --gap-m: 30px;
  --gap-l: 40px;
  --gap-xl: 70px;
  --section-space: 100px;

  /* Promienie */
  --radius-s: 10px;
  --radius-m: 20px;
  --radius-l: 24px;
}

* {
  scrollbar-width: auto;
  scrollbar-color: var(--primary) var(--medium);
}

*::-webkit-scrollbar {
  width: 10px;
  border-radius: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--medium);
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 10px;
  border: 0px none var(--medium);
}

html {
  scroll-behavior: smooth;
}

html, body {
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

body {
  background: var(--white);
  color: var(--text-light);
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  line-height: 1.68;
  font-weight: 400;
  font-optical-sizing: auto;
  font-style: normal;
  overflow-x: hidden;
}

.container {
  transition: all .6s ease-in-out;
  position: relative;
  z-index: 2;
}

::-moz-selection {
  background-color: var(--primary);
  color: var(--white);
}

::selection {
  background-color: var(--primary);
  color: var(--white);
}

/* PARAGRAPH */

a {
  color: inherit;
  transition: all .2s ease-in-out;
  display: inline-block;
  text-decoration: underline;
}

a:hover,
a:active,
a:focus {
  color: inherit;
  outline: none;
  text-decoration: none;
}

.no-underline { text-decoration: none; }
.text-underline { text-decoration: underline; }

p { margin: 0 0 1em 0; }
p:last-child { margin-bottom: 0; }

button, button:hover, button:focus {
  background-color: transparent;
  border: none;
  outline: none;
  margin: 0;
  padding: 0;
  box-shadow: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: all .2s ease-in-out;
}

input, input:hover, input:focus, select, textarea {
  background-color: var(--white);
  border: 1px solid var(--medium-strong);
  outline: none;
  box-shadow: none;
  border-radius: var(--radius-s);
  padding: 0.9em 1.1em;
  font-family: inherit;
  font-size: 1em;
  color: var(--text);
  width: 100%;
  transition: all .2s ease-in-out;
}

input:focus, textarea:focus {
  border-color: var(--primary);
}

textarea { resize: vertical; min-height: 160px; }

::placeholder { color: var(--muted); font-weight: 400; }
:-ms-input-placeholder { color: var(--muted); font-weight: 400; }
::-ms-input-placeholder { color: var(--muted); font-weight: 400; }

.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }

.align-right[class*="button"], .align-right[class*="read-more"] {
  text-align: center;
  float: right;
}

.align-center[class*="button"], .align-center[class*="read-more"] {
  text-align: center;
  float: none;
  display: table;
  margin-left: auto;
  margin-right: auto;
}

img.alignright, a img.alignright { float: right; margin: 0 0 1em 1em; }
img.alignleft, a img.alignleft { float: left; margin: 0 1em 1em 0; }
img.aligncenter, a img.aligncenter { display: block; margin-left: auto; margin-right: auto; }

.text-normal { font-size: 1em; }
.text-smaller { font-size: 0.9em; line-height: 1.58em; }
.text-smallest { font-size: 0.8125em; line-height: 1.5em; }
.text-bigger { font-size: 1.125em; line-height: 1.68em; }
.text-biggest { font-size: 1.2em; letter-spacing: 0.1em; line-height: 1.4em; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

header ul, footer ul { list-style: none; }

strong, b { font-weight: 600; }

.invert { color: var(--white); }
.invert .section-title { color: var(--white); }
.invert .section-title span { color: var(--white); opacity: 0.75; }

/* HEADINGS */

h1, .h1 { font-size: 4em;      font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; display: table; margin: 0 0 10px 0; color: var(--text); }
h2, .h2 { font-size: 3em;      font-weight: 600; line-height: 1.14; letter-spacing: -0.02em;  display: table; margin: 0 0 10px 0; color: var(--text); }
h3, .h3 { font-size: 2em;      font-weight: 600; line-height: 1.26; letter-spacing: -0.012em; display: table; margin: 0 0 10px 0; color: var(--text); }
h4, .h4 { font-size: 1.5em;    font-weight: 600; line-height: 1.34; letter-spacing: -0.008em; display: table; margin: 0 0 10px 0; color: var(--text); }
h5, .h5 { font-size: 1.25em;   font-weight: 600; line-height: 1.4;  display: table; margin: 0 0 10px 0; color: var(--text); }
h6, .h6 { font-size: 1.0625em; font-weight: 600; line-height: 1.45; display: table; margin: 0 0 10px 0; color: var(--text); }

.invert h1, .invert h2, .invert h3, .invert h4, .invert h5, .invert h6 { color: var(--white); }

/* SPACES */

/* Odstępy sekcji dodajemy ręcznie / na wierszu BB – patrz CLAUDE.md pkt. 4
section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
} */

.space-top { padding-top: var(--section-space); }
.space-bottom { padding-bottom: var(--section-space); }
.space-top-small { padding-top: var(--gap-xl); }
.space-bottom-small { padding-bottom: var(--gap-xl); }
.space-top-mini { padding-top: var(--gap-l); }
.space-bottom-mini { padding-bottom: var(--gap-l); }

/* OTHER */

.break-after:after { content: '\A'; white-space: pre; }
.break-before:before { content: '\A'; white-space: pre; }

.va-top { vertical-align: top; }
.va-middle { vertical-align: middle; }
.va-bottom { vertical-align: bottom; }

.no-border { border: none; }
.inline-block { display: inline-block !important; }

.block-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.vertical-middle {
  top: 50%;
  transform: translateY(-50%);
  position: relative;
}

.overflow-hidden { overflow: hidden; }

.only-mobile { display: none; }

.screen-reader-text { font-size: 0; }

.navbar-toggler { display: none; }

.bg-light { background-color: var(--light); }
.bg-lightest { background-color: var(--lightest); }
.bg-accent { background-color: var(--accent-2); }
.bg-dark { background-color: var(--dark); }

/* HEADER */

header {
  position: fixed;
  background-color: var(--white);
  border-bottom: 1px solid var(--medium);
  width: 100%;
  top: 0;
  left: 0;
  z-index: 99;
}

header .logo-bar {
  padding: 1.2em 0;
}

header .logo-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-m);
}

header .logo img {
  height: 46px;
  width: auto;
  display: block;
}

header .main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

header .main-nav ul {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  padding: 0;
  margin: 0;
}

header .main-nav ul li a {
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  font-size: 0.9375em;
  font-weight: 500;
  color: var(--text-light);
}

header .main-nav ul li.active a,
header .main-nav ul li a:hover {
  color: var(--primary);
}

/* Podmenu – rozwijana lista pod pozycją nawigacji */
header .main-nav ul li { position: relative; }

header .main-nav .submenu {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 240px;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 10px 0;
  margin: 0;
  background-color: var(--white);
  border: 1px solid var(--medium);
  border-radius: var(--radius-s);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--text) 12%, transparent);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all .2s ease-in-out;
  z-index: 10;
}

header .main-nav li:hover > .submenu,
header .main-nav li:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

header .main-nav .submenu li { margin: 0; width: 100%; }

header .main-nav .submenu li a {
  display: block;
  padding: 8px 18px;
  width: 100%;
}

/* Podkreślenie spod poziomu pierwszego nie pasuje do listy rozwijanej */
header .main-nav .submenu li a:before { display: none; }

/* Podmenu trzeciego poziomu wychodzi bokiem */
header .main-nav .submenu .submenu {
  top: -11px;
  left: 100%;
}

/* Przycisk rozwijania jest potrzebny dopiero w menu mobilnym */
header .main-nav .submenu-toggle { display: none; }

header .main-nav ul li a:before {
  position: absolute;
  content: "";
  bottom: 0;
  left: 0;
  background: var(--primary);
  height: 2px;
  border-radius: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: center;
  transition: all .2s ease-in-out;
}

header .main-nav ul li a:hover:before,
header .main-nav ul li.active a:before {
  transform: scaleX(1);
}

header .header-actions {
  display: flex;
  align-items: center;
  gap: var(--gap-s);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375em;
  font-weight: 500;
}

.lang-switch a {
  text-decoration: none;
  color: var(--muted);
}

.lang-switch a.active,
.lang-switch a:hover { color: var(--primary); }

.lang-switch .separator { color: var(--medium-strong); }

#top-spacer {
  content: "";
  position: relative;
  height: 0;
  display: block;
}

/* SECTION TITLE */

.section-title {
  margin-bottom: var(--gap-l);
  max-width: 760px;
}

.section-title span {
  display: block;
  text-transform: uppercase;
  color: var(--primary);
  font-size: 0.8125em;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.section-title h2,
.section-title h3 {
  margin-bottom: 0;
  display: block;
}

.section-title p {
  margin-top: 16px;
  font-size: 1.125em;
}

.section-title.align-center {
  margin-left: auto;
  margin-right: auto;
}

/* Nagłówek sekcji z małą ilustracją obok */
.section-title-image {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-bottom: var(--gap-l);
}

.section-title-image .section-title {
  margin-bottom: 0;
  flex: 1;
}

.section-title-image .image {
  width: 440px;
  flex-shrink: 0;
}

.section-title-image .image img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius-l);
  display: block;
}

/* BUTTONS */

/* Warianty :hover i :focus są wypisane celowo – bazowy reset
   `button, button:hover, button:focus` ma wyższą specyficzność niż sama klasa
   i bez tego zerowałby padding przycisków na <button>. */
.primary-button,
.secondary-button,
.light-button,
.dark-button,
.primary-button:hover, .primary-button:focus,
.secondary-button:hover, .secondary-button:focus,
.light-button:hover, .light-button:focus,
.dark-button:hover, .dark-button:focus {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 1em 1.9em;
  border-radius: 999px;
  font-size: 0.9375em;
  font-weight: 600;
  line-height: 1.2;
  transition: all .2s ease-in-out;
}

.primary-button {
  background-color: var(--primary);
  color: var(--white);
}

.primary-button:hover {
  background-color: var(--primary-dark);
  color: var(--white);
}

.secondary-button {
  border: 1.5px solid var(--medium-strong);
  color: var(--text);
  background-color: transparent;
}

.secondary-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.light-button {
  background-color: var(--white);
  color: var(--text);
}

.light-button:hover { color: var(--primary); }

.dark-button {
  border: 1.5px solid color-mix(in srgb, var(--white) 40%, transparent);
  color: var(--white);
}

.dark-button:hover {
  background-color: var(--white);
  color: var(--primary);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--primary);
  font-size: 0.9375em;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease-in-out;
}

.read-more:hover { color: var(--primary-dark); gap: 12px; }

.button-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: var(--gap-s);
}

.button-list.center { justify-content: center; margin-top: var(--gap-l); }

/* CHIP */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.875em;
  font-weight: 500;
  line-height: 1.3;
  background-color: var(--accent-1);
  color: var(--primary-dark);
}

.chip.neutral {
  background-color: var(--light);
  color: var(--text-light);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Chipy pod grupą przycisków – w hero idą jako osobny blok, potrzebują odstępu */
.button-list + .chip-list { margin-top: var(--gap-s); }

/* CHECK LIST */

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text);
}

.check-list li img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 5px;
}

/* HERO */

.hero-module {
  display: flex;
  align-items: center;
  gap: var(--gap-l);
}

.hero-module .text {
  width: calc(52% - 20px);
}

.hero-module .text h1 {
  display: block;
  margin-bottom: 24px;
}

.hero-module .text .lead {
  font-size: 1.125em;
  margin-bottom: 28px;
}

.hero-module .text .chip-list { margin-top: 28px; }

.hero-module .visual { width: calc(48% - 20px); }

/* Wizual z kształtem – samodzielny blok, używany też poza hero */
.visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual .shape {
  position: absolute;
  left: -1.7%;
  top: -5.2%;
  width: 200.7%;
  aspect-ratio: 1084 / 536;
  background-color: var(--primary);
  -webkit-mask: url("../img/ksztalt-hero.svg") no-repeat center / 100% 100%;
  mask: url("../img/ksztalt-hero.svg") no-repeat center / 100% 100%;
  z-index: 1;
}

/* Pływanie wizualu za kursorem – przesunięcie ustawia js/main.js */
.visual > img,
.visual .shape {
  transition: transform .45s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .visual > img,
  .visual .shape { transition: none; }
}

.visual > img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  display: block;
}

/* KEY FIGURES */

.figures-module {
  background-color: var(--white);
  border: 1px solid var(--medium);
  border-radius: var(--radius-l);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--text) 5%, transparent);
  padding: var(--gap-l) var(--gap-m);
  position: relative;
}

.figures-module.no-border {
  background-color: transparent;
  border: none;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}

.figures-module .figure-list {
  display: flex;
  position: relative;
}

.figures-module .figure-list:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 90px;
  height: 1px;
  background-color: var(--primary);
  opacity: 0.35;
}

.figures-module .figure-item {
  width: 25%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.figures-module .figure-item .icon {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.figures-module .figure-item .icon img {
  width: 40px;
  height: 40px;
}

.figures-module .figure-item .tick {
  width: 2px;
  height: 18px;
  background-image: linear-gradient(to bottom, var(--primary) 0 2px, transparent 2px 6px);
  background-size: 2px 6px;
  background-repeat: repeat-y;
}

.figures-module .figure-item .tick.bottom { margin-top: 32px; }

/* Jeden rozmiar dla wszystkich liczb – najdłuższa wartość („24h/7dni”) wyznacza skalę */
.figures-module .figure-item .number {
  font-size: 2.5em;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 20px 0 6px 0;
}

.figures-module .figure-item .label {
  font-size: 0.875em;
  line-height: 1.5;
  color: var(--text-light);
  margin: 0;
}

/* TEXT + IMAGE */

.text-image-module {
  display: flex;
  align-items: center;
  gap: var(--gap-xl);
}

.text-image-module .image { width: calc(50% - 35px); }
.text-image-module .text { width: calc(50% - 35px); }

.text-image-module .image > img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius-l);
  display: block;
}

.text-image-module .text .check-list { margin: var(--gap-s) 0; }

.text-image-module.invert-order .image { order: 2; }
.text-image-module.invert-order .text { order: 1; }

.text-image-module.align-top { align-items: flex-start; }

/* Wariant z dwiema kolumnami tekstu (misja) */
.text-columns-module {
  display: flex;
  align-items: flex-start;
  gap: var(--gap-xl);
}

.text-columns-module .side { width: calc(40% - 35px); }
.text-columns-module .body { width: calc(60% - 35px); }

.text-columns-module .side > img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: var(--radius-l);
  display: block;
  margin-top: var(--gap-m);
}

/* SIMULATOR LIST */

.simulator-list {
  display: flex;
  gap: var(--gap-s);
}

.simulator-item {
  width: calc(50% - 10px);
  background-color: var(--white);
  border: 1px solid var(--medium);
  border-radius: var(--radius-l);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.simulator-item .image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.simulator-item .image.placeholder {
  background-color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  padding: var(--gap-s);
}

.simulator-item .image.placeholder img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.simulator-item > .text {
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: var(--gap-s);
  flex: 1;
}

.simulator-item .text .chip { align-self: flex-start; }

.simulator-item .text h3 { margin: 0; display: block; }

.simulator-item .text .subtitle {
  font-size: 1.125em;
  color: var(--text-light);
  margin: 0;
}

.simulator-item .button-list { margin-top: auto; }

/* SPEC LIST */

.spec-list {
  display: flex;
  flex-direction: column;
}

.spec-list .spec-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--gap-s);
  padding: 14px 0;
  border-top: 1px solid var(--medium);
}

.spec-list > .spec-item:first-child { border-top: none; }

/* Rozwijana część danych technicznych – wysokość animuje slideToggle w main.js */
.spec-more { display: none; }

.spec-more .spec-item { border-top: 1px solid var(--medium); }

/* Odstęp nad przyciskiem daje gap kontenera .simulator-item .text – bez własnych marginesów */
.spec-toggle,
.spec-toggle:hover,
.spec-toggle:focus {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  color: var(--primary);
  font-size: 0.9375em;
  font-weight: 600;
  transition: all .2s ease-in-out;
}

.spec-toggle:hover { color: var(--primary-dark); }

.spec-toggle .arrow {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -4px;
  transition: all .2s ease-in-out;
}

.spec-toggle.open .arrow {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.spec-list .spec-item .label {
  font-size: 0.875em;
  color: var(--muted);
  flex-shrink: 0;
  width: 200px;
}

.spec-list .spec-item .value {
  font-size: 0.875em;
  font-weight: 500;
  color: var(--text);
  text-align: right;
  flex: 1;
}

.spec-list.wide .spec-item .value { text-align: left; }

/* FILE LINK – plakietka z plikiem przy wartości (certyfikat, karta techniczna) */

.file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 3px 10px;
  border: 1px solid var(--accent-1);
  border-radius: 999px;
  background-color: var(--accent-2);
  color: var(--primary);
  font-size: 0.8125em;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.04em;
  white-space: nowrap;
  vertical-align: middle;
  transition: all .2s ease-in-out;
}

.file-link:hover,
.file-link:focus {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.file-link i { font-size: 1.1em; }

/* VIDEO */

.video-module {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
}

.video-module img.poster,
.video-module video {
  width: 100%;
  height: 620px;
  object-fit: cover;
  display: block;
}

.video-module .shade {
  position: absolute;
  inset: 0;
  background-color: color-mix(in srgb, var(--dark) 28%, transparent);
}

.video-module .play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background-color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px color-mix(in srgb, var(--dark) 18%, transparent);
  transition: all .2s ease-in-out;
}

.video-module .play img { margin-left: 5px; }
.video-module .play:hover { transform: translate(-50%, -50%) scale(1.06); }

.video-module .caption {
  position: absolute;
  left: 40px;
  bottom: 32px;
  color: var(--white);
  font-size: 0.875em;
  font-weight: 500;
  margin: 0;
}

/* FEATURE LIST */

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-s);
}

.feature-item {
  width: calc(33.333% - 14px);
  background-color: var(--white);
  border: 1px solid var(--medium);
  border-radius: var(--radius-m);
  padding: 32px;
  transition: all .2s ease-in-out;
}

.feature-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.feature-list.columns-2 .feature-item { width: calc(50% - 10px); }

.feature-item .icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background-color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--gap-s);
}

.feature-item .icon img { width: 26px; height: 26px; }

.feature-item h4 {
  font-size: 1.0625em;
  display: block;
  margin-bottom: 10px;
}

.feature-item p {
  font-size: 0.875em;
  margin: 0;
}

/* INFO CARDS */

.info-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-s);
}

.info-item {
  width: calc(50% - 10px);
  background-color: var(--white);
  border: 1px solid var(--medium);
  border-radius: var(--radius-l);
  padding: var(--gap-l);
}

.info-item h3 { display: block; margin-bottom: 12px; }
.info-item p { font-size: 0.9375em; margin: 0; }

/* IMAGE PLACEHOLDER */

.image-placeholder {
  background-color: var(--accent-2);
  border-radius: var(--radius-l);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gap-m);
  position: relative;
  min-height: 520px;
}

.image-placeholder img {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.image-placeholder .note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  text-align: center;
  font-size: 0.8125em;
  color: var(--muted);
  margin: 0;
  padding: 0 24px;
}

/* Nadpisanie przejść AOS – biblioteka ustawia transition-property: opacity, transform
   selektorem o podwojonej specyficzności, przez co hover na kartach nie animował obrysu.
   Poniższe reguły mają tę samą specyficzność i występują później, więc wygrywają. */

.news-list .news-item,
.feature-list .feature-item,
.simulator-list .simulator-item,
.info-list .info-item {
  transition-property: opacity, transform, border-color, box-shadow;
  transition-duration: .7s, .25s, .2s, .2s;
  transition-timing-function: ease, ease-in-out, ease-in-out, ease-in-out;
}

/* NEWS LIST */

.news-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-s);
}

.news-item {
  width: calc(33.333% - 14px);
  background-color: var(--white);
  border: 1px solid var(--medium);
  border-radius: var(--radius-m);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .2s ease-in-out;
}

.news-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.news-item .image img {
  width: 100%;
  height: 216px;
  object-fit: cover;
  display: block;
}

.news-item .image.placeholder {
  background-color: var(--accent-2);
  height: 216px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.news-item .image.placeholder img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.news-item .text {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.news-item .text .date {
  text-transform: uppercase;
  color: var(--primary);
  font-size: 0.8125em;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin: 0;
}

.news-item .text h3 {
  font-size: 1.25em;
  display: block;
  margin: 0;
}

.news-item .text p {
  font-size: 0.875em;
  margin: 0;
}

.news-item .text .read-more { margin-top: auto; }

/* Wpis wyróżniony */
.featured-news-module {
  display: flex;
  align-items: center;
  gap: 60px;
}

.featured-news-module .image { width: calc(58% - 30px); }
.featured-news-module .text { width: calc(42% - 30px); }

.featured-news-module .image img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: var(--radius-l);
  display: block;
}

.featured-news-module .text .date {
  text-transform: uppercase;
  color: var(--primary);
  font-size: 0.8125em;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

/* CTA */

.cta-module {
  background-color: var(--primary);
  color: var(--white);
  padding: var(--gap-xl) var(--gap-m);
  text-align: center;
}

.cta-module h2 {
  display: block;
  margin: 0 auto 14px auto;
  color: var(--white);
}

.cta-module p {
  font-size: 1.125em;
  opacity: 0.9;
  margin: 0 auto;
  max-width: 720px;
}

.cta-module .button-list {
  justify-content: center;
  margin-top: var(--gap-m);
}

/* PAGE HEADER */

.page-header-module {
  background-color: var(--accent-2);
  padding: 56px 0;
}

.page-header-module .breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.875em;
  color: var(--muted);
  margin-bottom: 16px;
}

.page-header-module .breadcrumbs a {
  text-decoration: none;
  color: var(--muted);
}

.page-header-module .breadcrumbs a:hover { color: var(--primary); }
.page-header-module .breadcrumbs .separator { color: var(--medium-strong); }
.page-header-module .breadcrumbs .current { color: var(--primary-dark); }

.page-header-module h1 {
  display: block;
  font-size: 3em;
  margin-bottom: 16px;
}

.page-header-module .lead {
  font-size: 1.125em;
  max-width: 720px;
  margin: 0;
}

/* DATA TABLE */

.data-table {
  background-color: var(--white);
  border: 1px solid var(--medium);
  border-radius: var(--radius-m);
  overflow: hidden;
}

.data-table .row {
  display: flex;
  align-items: flex-start;
  gap: var(--gap-s);
  padding: 18px 32px;
  border-top: 1px solid var(--medium);
  margin: 0;
}

.data-table .row:first-child { border-top: none; }

.data-table .row.head {
  background-color: var(--accent-2);
  border-top: none;
}

.data-table .row .cell {
  flex: 1;
  font-size: 1em;
  color: var(--text-light);
}

.data-table .row.head .cell {
  text-transform: uppercase;
  font-size: 0.8125em;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--primary-dark);
}

.data-table .row .cell:first-child {
  font-size: 0.875em;
  font-weight: 500;
  color: var(--text);
}

.data-table.two-columns .row .cell:first-child {
  flex: 0 0 220px;
}

/* GALLERY */

.gallery-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-s);
}

.gallery-item {
  width: calc(33.333% - 14px);
  border-radius: var(--radius-l);
  overflow: hidden;
  display: block;
}

.gallery-item.wide { width: calc(66.666% - 7px); }
.gallery-item.half { width: calc(50% - 10px); }

.gallery-item img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  transition: all 1s ease-in-out;
}

.gallery-item.tall img { height: 420px; }

.gallery-item:hover img { transform: scale(1.05); }

.gallery-banner img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-l);
  display: block;
}

.image-note {
  font-size: 0.8125em;
  color: var(--muted);
  margin: 14px 0 0 0;
}

/* LIGHTBOX */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background-color: color-mix(in srgb, var(--dark) 92%, transparent);
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease-in-out;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox .frame {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lightbox .frame img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
  display: block;
  border-radius: var(--radius-m);
  box-shadow: 0 30px 80px color-mix(in srgb, var(--dark) 60%, transparent);
}

.lightbox .caption {
  color: var(--white);
  font-size: 0.9em;
  text-align: center;
  margin: 0;
  opacity: 0.8;
  max-width: 760px;
}

.lightbox .counter {
  color: var(--white);
  font-size: 0.8125em;
  opacity: 0.5;
  margin: 0;
}

.lightbox .close,
.lightbox .prev,
.lightbox .next {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--white) 14%, transparent);
  color: var(--white);
  font-size: 1.5em;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.lightbox .close:hover, .lightbox .close:focus,
.lightbox .prev:hover, .lightbox .prev:focus,
.lightbox .next:hover, .lightbox .next:focus {
  background-color: var(--primary);
  padding: 0;
  margin: 0;
}

.lightbox .close { top: -60px; right: 0; }
.lightbox .prev { left: -72px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: -72px; top: 50%; transform: translateY(-50%); }

.gallery-item img,
.article-gallery img { cursor: zoom-in; }

/* MAP */

.map-module {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  aspect-ratio: 12 / 5;
}

.map-module.narrow { aspect-ratio: 6 / 5; }

.map-module .map-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Interaktywna mapa OpenStreetMap (Leaflet) */
.map-module .map-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.map-module .leaflet-container {
  height: 100%;
  font-family: inherit;
  background-color: var(--light);
}

/* Podkład Positron jest już jasny i odbarwiony – żadnego filtra nie nakładamy.
   Zostaje sam wash w kolorze marki: nad kafelkami (200), pod linią trasy (400). */
.map-module .map-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 350;
  pointer-events: none;
  background-color: color-mix(in srgb, var(--primary) 7%, transparent);
}

.map-module .leaflet-control-zoom a {
  color: var(--text);
  border-color: var(--medium);
  text-decoration: none;
}

.map-module .leaflet-control-zoom a:hover { color: var(--primary); }

.map-module .leaflet-popup-content-wrapper {
  border-radius: var(--radius-s);
  color: var(--text-light);
}

.map-module .leaflet-popup-content strong { color: var(--text); }

.map-module .leaflet-container a { color: var(--primary); }

.leaflet-marker-icon.map-pin-wrap {
  background: none;
  border: none;
}

.map-pin-wrap .map-pin {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  background-color: var(--primary);
  color: var(--white);
  border-radius: 100px;
  padding: 8px 15px;
  font-size: 0.8125em;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--text) 25%, transparent);
}

.map-pin-wrap .map-pin.dodatkowy { background-color: var(--muted); }

.map-pin-wrap .map-pin .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--white);
  flex-shrink: 0;
}

.map-module .fade {
  position: absolute;
  inset: 0;
  background-color: color-mix(in srgb, var(--white) 55%, transparent);
}

.map-module .route {
  position: absolute;
  left: 25%;
  top: 37%;
  width: 32%;
  height: 29%;
  border-top: 4px dashed var(--primary);
  border-right: 4px dashed var(--primary);
  border-radius: 0 60% 0 0;
  transform: rotate(-6deg);
  opacity: 0.9;
}

.map-module .pin {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  border-radius: 999px;
  font-size: 0.875em;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--text) 18%, transparent);
}

.map-module .pin img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.map-module .pin.main {
  background-color: var(--primary);
  color: var(--white);
  left: 16%;
  top: 58%;
}

.map-module .pin.secondary {
  background-color: var(--white);
  border: 1px solid var(--medium-strong);
  color: var(--text);
  left: 52%;
  top: 29%;
}

.map-module .distance {
  position: absolute;
  left: 39%;
  top: 47%;
  background-color: var(--dark);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.875em;
  margin: 0;
}

.map-module .map-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--white);
  color: var(--muted);
  font-size: 0.8125em;
  padding: 18px 24px;
  margin: 0;
}

/* CONTACT */

.contact-module {
  display: flex;
  align-items: flex-start;
  gap: 60px;
}

.contact-module .details { width: calc(40% - 30px); }
.contact-module .form-wrapper { width: calc(60% - 30px); }

.contact-card {
  background-color: var(--accent-2);
  border-radius: var(--radius-l);
  padding: var(--gap-l);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-card .contact-block .label {
  text-transform: uppercase;
  font-size: 0.8125em;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.contact-card .contact-block .value {
  font-size: 1.125em;
  color: var(--text);
  margin: 0;
}

.contact-card .contact-block .value a { text-decoration: none; }
.contact-card .contact-block .value a:hover { color: var(--primary); }

.company-card {
  border: 1px solid var(--medium);
  border-radius: var(--radius-l);
  padding: 32px var(--gap-l);
  margin-top: var(--gap-s);
}

.company-card .label {
  text-transform: uppercase;
  font-size: 0.8125em;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
}

.contact-form {
  background-color: var(--white);
  border: 1px solid var(--medium);
  border-radius: var(--radius-l);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--text) 6%, transparent);
  padding: 48px;
}

.contact-form h3 { display: block; margin-bottom: 10px; }

.contact-form .form-row {
  display: flex;
  gap: var(--gap-s);
}

.contact-form .form-field {
  margin-bottom: var(--gap-s);
  flex: 1;
}

.contact-form .form-field label {
  display: block;
  font-size: 0.875em;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 10px;
}

.contact-form .form-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: var(--gap-s);
}

.contact-form .form-consent input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 3px;
  padding: 0;
  border-radius: 5px;
  accent-color: var(--primary);
}

.contact-form .form-consent label {
  font-size: 0.875em;
  color: var(--text-light);
  margin: 0;
}

/* ARTICLE */

.article-module {
  display: flex;
  align-items: flex-start;
  gap: 100px;
}

.article-module .article-body { width: calc(64% - 50px); }
.article-module .article-side { width: calc(36% - 50px); }

.article-body .chip { margin-bottom: var(--gap-s); }

.article-body p {
  font-size: 1.125em;
  margin-bottom: 1.4em;
}

.article-body h3 {
  display: block;
  margin: var(--gap-m) 0 14px 0;
}

.article-body ul {
  padding-left: 1.2em;
  margin: 0 0 1.4em 0;
}

.article-body ul li {
  font-size: 1.125em;
  margin-bottom: 12px;
}

.article-body ul li::marker { color: var(--primary); }

.article-quote {
  display: flex;
  gap: 24px;
  background-color: var(--accent-2);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 0 0 1.4em 0;
}

.article-quote:before {
  content: "";
  width: 4px;
  border-radius: 2px;
  background-color: var(--primary);
  flex-shrink: 0;
}

.article-quote .quote-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-quote p {
  font-size: 1.25em;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}

.article-quote cite {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-style: normal;
  font-size: 0.875em;
  font-weight: 600;
  color: var(--text-light);
}

.article-quote cite span {
  font-weight: 400;
  color: var(--muted);
}

.article-meta {
  border: 1px solid var(--medium);
  border-radius: var(--radius-m);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: var(--gap-s);
}

.article-meta .meta-item .label {
  text-transform: uppercase;
  font-size: 0.8125em;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 4px;
}

.article-meta .meta-item .value {
  font-size: 0.875em;
  font-weight: 500;
  color: var(--text);
  margin: 0;
}

.article-gallery { margin-top: var(--gap-l); }

/* ERROR 404 */

.error-module {
  display: flex;
  align-items: center;
  gap: var(--gap-xl);
}

.error-module .text { width: calc(55% - 35px); }
.error-module .visual { width: calc(45% - 35px); }

.error-module .error-code {
  font-size: 7em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--primary);
  margin: 0 0 var(--gap-s) 0;
}

.error-module .lead {
  font-size: 1.125em;
  margin-bottom: var(--gap-s);
}

/* SEARCH */

.search-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin-top: var(--gap-s);
}

.search-form input[type="search"] { flex: 1; }

.search-form button { flex-shrink: 0; }

.search-summary {
  font-size: 1.125em;
  margin-bottom: var(--gap-l);
}

.search-summary strong { color: var(--text); }

/* PAGINATION */

.pagination-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--gap-l);
}

.pagination-container a { text-decoration: none; }

.pagination-container span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--medium);
  color: var(--text-light);
  background-color: var(--white);
  font-size: 0.875em;
  font-weight: 500;
  transition: all .3s ease;
}

.pagination-container span:hover,
.pagination-container span.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.pagination-container span.active { pointer-events: none; }

/* FOOTER */

footer {
  background-color: var(--dark);
  color: var(--white);
  padding: 80px 0 40px 0;
}

.footer-columns {
  display: flex;
  gap: var(--gap-l);
  flex-wrap: wrap;
}

.footer-column { width: calc(20% - 32px); }
.footer-column.brand { width: calc(40% - 32px); }

.footer-column.brand .logo img {
  height: 52px;
  width: auto;
  display: block;
  margin-bottom: 24px;
}

.footer-column.brand p {
  font-size: 0.875em;
  opacity: 0.7;
  margin-bottom: 24px;
}

.footer-column h5 {
  text-transform: uppercase;
  font-size: 0.8125em;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--white);
  opacity: 0.45;
  margin-bottom: 18px;
}

.footer-column .footer-menu {
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-column .footer-menu li a,
.footer-column .footer-menu li {
  font-size: 0.875em;
  color: var(--white);
  opacity: 0.8;
  text-decoration: none;
}

.footer-column .footer-menu li a:hover { opacity: 1; color: var(--primary); }

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

.social-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--dark-border);
  border-radius: 999px;
  font-size: 0.875em;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  opacity: 0.85;
  transition: all .2s ease-in-out;
}

/* Wszystkie przyciski w rzędzie tej samej wysokości – logo ma inną wysokość niż ikona z tekstem */
.social-list li { display: flex; }

.social-button img {
  display: block;
  object-fit: contain;
}

/* Pozycja typu „Logo”: sama grafika z odnośnikiem */
.social-button.logo-button img {
  height: 22px;
  width: auto;
  max-width: 150px;
}

/* Kolorowa grafika przebarwiona na biało – spójna z ciemną stopką */
.social-button img.mono { filter: brightness(0) invert(1); }

.social-button:hover {
  opacity: 1;
  border-color: var(--primary);
  color: var(--white);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-m);
  margin-top: 56px;
  padding-top: var(--gap-l);
  border-top: 1px solid var(--dark-border);
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.875em;
  opacity: 0.5;
  margin: 0;
}

.footer-bottom .footer-legal {
  display: flex;
  gap: var(--gap-s);
  padding: 0;
  margin: 0;
}

.footer-bottom .footer-legal li a {
  font-size: 0.875em;
  opacity: 0.5;
  color: var(--white);
  text-decoration: none;
}

.footer-menu .submenu {
  list-style: none;
  padding: 6px 0 0 14px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 1px solid var(--dark-border);
}

.footer-bottom .footer-legal li a:hover { opacity: 1; }

/* BEAVER BUILDER */

.fl-row .fl-row-content {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}

.fl-module-content,
.fl-module:where(.fl-module:not(:has(> .fl-module-content))) {
  margin: 0;
}

.fl-row-content-wrap { padding: 0; }

/* Rynny między kolumnami – w etapie 1 dawał je `gap` na kontenerze sekcji.
   W BB kolumny są float:left o szerokości procentowej, więc odstęp robimy
   paddingiem, a skrajne kolumny wyrównujemy do krawędzi wiersza. */
.fl-col { padding-left: var(--gap-s); padding-right: var(--gap-s); }
.fl-col-group > .fl-col:first-child { padding-left: 0; }
.fl-col-group > .fl-col:last-child { padding-right: 0; }

/* Rytm pionowy w kolumnie. W etapie 1 dawały go marginesy poszczególnych
   bloków (.button-list, .check-list); w BB każdy blok jest osobnym modułem,
   więc odstęp ustawia kolumna, a marginesy modułów zerujemy. */
.fl-col-content { gap: var(--gap-s); }
.fl-module-lista_przyciskow .button-list,
.fl-module-lista_przyciskow .button-list.center { margin-top: 0; }

/* Marginesy na korzeniu modułu dodają się do odstępu kolumny i paddingu wiersza –
   odstęp rośnie wtedy dwukrotnie i nie widać tego, mierząc dystans między modułami
   (margines siedzi WEWNĄTRZ pudełka modułu). .section-title niesie w etapie 1
   własne 40px, więc w BB zerujemy je i dokładamy 20px do kolumnowego gapu. */
.fl-module-naglowek_sekcji .section-title { margin-bottom: 0; }
.fl-module-naglowek_sekcji:not(:last-child) { margin-bottom: var(--gap-s); }

/* Poniżej 768px BB układa kolumny jedna pod drugą – rynnę poziomą
   zamieniamy na odstęp pionowy. */
@media (max-width: 767px) {
  .gallery-banner img { height: 300px; }
  .fl-col { padding-left: 0; padding-right: 0; }
  .fl-col-group > .fl-col + .fl-col { margin-top: var(--gap-l); }
}

body.fl-builder-edit [data-aos] {
  opacity: 1 !important;
  transform: none !important;
}

/* Wiersz na akcencie – odpowiednik .cta-module z etapu 1 */
.fl-row.row-accent { background-color: var(--primary); color: var(--white); }
.fl-row.row-accent h1, .fl-row.row-accent h2, .fl-row.row-accent h3,
.fl-row.row-accent h4, .fl-row.row-accent h5, .fl-row.row-accent h6 { color: var(--white); }
.fl-row.row-accent .section-title span { color: var(--white); opacity: 0.75; }

/* Wiersze z tłem – odpowiedniki klas .bg-* z etapu 1 */
.fl-row.row-light { background-color: var(--light); }
.fl-row.row-lightest { background-color: var(--lightest); }
.fl-row.row-accent-bg { background-color: var(--accent-2); }

/* CONTACT FORM 7 */

/* Markup pól piszemy sami, CF7 dokłada tylko własne opakowania i komunikaty */
.contact-form .wpcf7-form-control-wrap { display: block; }

.contact-form .wpcf7-form-control { width: 100%; }

.contact-form .wpcf7-not-valid { border-color: var(--error); }

.contact-form .wpcf7-not-valid-tip {
  display: block;
  font-size: 0.8125em;
  color: var(--error);
  margin-top: 6px;
}

/* Komunikat zbiorczy pod formularzem – wygląd jak .form-message */
.contact-form .wpcf7-response-output {
  border: 1px solid var(--medium-strong);
  border-radius: var(--radius-s);
  padding: 14px 18px;
  margin: var(--gap-s) 0 0 0;
  font-size: 0.875em;
}

.contact-form form.sent .wpcf7-response-output {
  background-color: var(--accent-2);
  border-color: var(--accent-1);
  color: var(--primary-dark);
}

.contact-form form.invalid .wpcf7-response-output,
.contact-form form.failed .wpcf7-response-output,
.contact-form form.spam .wpcf7-response-output {
  border-color: var(--error);
  color: var(--text);
}

/* Zgoda – CF7 owija checkbox w span z własnymi marginesami */
.contact-form .wpcf7-acceptance .wpcf7-list-item {
  display: block;
  margin: 0;
}

.contact-form .wpcf7-acceptance .wpcf7-list-item label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.contact-form .wpcf7-acceptance input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
  padding: 0;
}

.contact-form .wpcf7-list-item-label {
  font-size: 0.875em;
  line-height: 1.5;
  color: var(--text-light);
}

/* Przycisk wysyłki jest <input>, więc łapią go reguły pól – przywracamy wygląd przycisku */
.contact-form input.wpcf7-submit,
.contact-form input.wpcf7-submit:hover,
.contact-form input.wpcf7-submit:focus {
  width: auto;
  border: none;
  color: var(--white);
}

.contact-form .wpcf7-spinner {
  margin: 0 0 0 14px;
  background-color: var(--medium-strong);
}

/* WORDPRESS */

.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption {
  font-size: 0.8125em;
  color: var(--muted);
  margin-top: 10px;
}

.alignwide, .alignfull { max-width: 100%; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Komunikaty formularza kontaktowego */
.form-message {
  border-radius: var(--radius-s);
  padding: 14px 18px;
  margin-bottom: var(--gap-s);
  font-size: 0.875em;
}

.form-message.success {
  background-color: var(--accent-2);
  color: var(--primary-dark);
}

.form-message.error {
  background-color: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--text);
  border: 1px solid var(--medium-strong);
}

/* =========================================================
   BREAKPOINTY – szerokości kontenera
   ========================================================= */

@media (min-width: 576px) {
  .container, .fl-row .fl-row-content, .fl-row-fixed-width { max-width: 540px; }
}

@media (min-width: 768px) {
  .container, .fl-row .fl-row-content, .fl-row-fixed-width { max-width: 720px; }
}

@media (min-width: 992px) {
  .container, .fl-row .fl-row-content, .fl-row-fixed-width { max-width: 960px; }
}

@media (min-width: 1200px) {
  .container, .fl-row .fl-row-content, .fl-row-fixed-width { max-width: 1140px; }
}

@media (min-width: 1600px) {
  .container, .fl-row .fl-row-content, .fl-row-fixed-width { max-width: 1400px; }
}

/* =========================================================
   RWD – od największego do najmniejszego
   ========================================================= */

/* Przełączenie na menu mobilne */
@media (max-width: 1180px) {
  .only-desktop { display: none !important; }
  .only-mobile { display: inline !important; }

  :root { --section-space: 70px; }

  h1, .h1 { font-size: 3em; }
  h2, .h2 { font-size: 2.25em; }
  h3, .h3 { font-size: 1.75em; }

  .navbar-toggler {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1em;
    color: var(--text);
    cursor: pointer;
  }

  .navbar-toggler .text {
    font-size: 0.85em;
    text-transform: uppercase;
    font-weight: 600;
  }

  .navbar-toggler .burger {
    display: inline-block;
    width: 24px;
    height: 12px;
    position: relative;
  }

  .navbar-toggler .burger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--text);
    transition: all .3s ease-in-out;
  }

  .navbar-toggler .burger span:first-child { top: 0; }
  .navbar-toggler .burger span:last-child { bottom: 0; }

  .navbar-toggler.open .burger span:first-child { transform: rotate(45deg); top: 5px; }
  .navbar-toggler.open .burger span:last-child { transform: rotate(-45deg); bottom: 5px; }

  header .main-nav {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--white);
    padding: 2em 1.5em;
    z-index: 999;
    overflow-y: auto;
    transition: left .3s ease-in-out;
    box-shadow: 2px 0 8px color-mix(in srgb, var(--text) 12%, transparent);
  }

  header .main-nav.open { left: 0; }

  header .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  header .main-nav ul li { margin: 0.5em 0; width: 100%; }

  /* Podmenu jako akordeon – rozwijany przyciskiem obok pozycji */
  header .main-nav ul li.has-submenu { display: flex; flex-wrap: wrap; align-items: center; }
  header .main-nav ul li.has-submenu > a { flex: 1; }

  header .main-nav .submenu-toggle,
  header .main-nav .submenu-toggle:hover,
  header .main-nav .submenu-toggle:focus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    color: var(--text-light);
  }

  header .main-nav .submenu-toggle .arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -4px;
    transition: all .2s ease-in-out;
  }

  header .main-nav .submenu-toggle.open { color: var(--primary); }
  header .main-nav .submenu-toggle.open .arrow { transform: rotate(-135deg); margin-top: 2px; }

  header .main-nav .submenu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    box-shadow: none;
    background: none;
    padding: 0 0 0 16px;
    margin: 6px 0 0 0;
    border-left: 2px solid var(--medium);
  }

  /* Na mobile otwiera przycisk, nie hover */
  header .main-nav li:hover > .submenu,
  header .main-nav li:focus-within > .submenu { display: none; }

  header .main-nav .submenu.open,
  header .main-nav li:hover > .submenu.open,
  header .main-nav li:focus-within > .submenu.open { display: block; }

  header .main-nav .submenu li { margin: 0; }
  header .main-nav .submenu li a { padding: 8px 0; font-size: 0.9em; }
  header .main-nav .submenu .submenu { top: auto; left: auto; }

  header .header-actions .primary-button { padding: 0.8em 1.4em; }

  .page-header-module h1 { font-size: 2.25em; }

  .section-title-image .image { width: 340px; }
  .section-title-image .image img { height: 200px; }

  .figures-module .figure-item .number { font-size: 2em; }

  .article-module { gap: 60px; }
  .article-module .article-body { width: calc(64% - 30px); }
  .article-module .article-side { width: calc(36% - 30px); }
}

/* Układy 4-kolumnowe → 2-kolumnowe */
@media (max-width: 991px) {
  .hero-module { flex-direction: column; align-items: flex-start; }
  .hero-module .text, .hero-module .visual { width: 100%; }
  .hero-module .visual { margin-top: var(--gap-m); }

  .text-image-module, .text-columns-module, .featured-news-module, .contact-module, .article-module {
    flex-direction: column;
    gap: var(--gap-l);
  }

  .error-module { flex-direction: column; align-items: flex-start; gap: var(--gap-l); }
  .error-module .text, .error-module .visual { width: 100%; }

  .text-image-module .image, .text-image-module .text,
  .text-columns-module .side, .text-columns-module .body,
  .featured-news-module .image, .featured-news-module .text,
  .contact-module .details, .contact-module .form-wrapper,
  .article-module .article-body, .article-module .article-side { width: 100%; }

  .text-image-module.invert-order .image { order: 1; }
  .text-image-module.invert-order .text { order: 2; }

  .text-columns-module .side img { height: 320px; }
  .featured-news-module .image img { height: 340px; }

  .simulator-list { flex-direction: column; }
  .simulator-item { width: 100%; }

  .feature-item, .news-item { width: calc(50% - 10px); }

  .gallery-item, .gallery-item.wide, .gallery-item.half { width: calc(50% - 10px); }

  .section-title-image { flex-direction: column; align-items: flex-start; gap: var(--gap-m); }
  .section-title-image .image { width: 100%; }

  .footer-column { width: calc(50% - 20px); }
  .footer-column.brand { width: 100%; }

  .video-module img.poster { height: 420px; }

  .map-module, .map-module.narrow { aspect-ratio: 4 / 3; }
  .map-module .pin { font-size: 0.8125em; padding: 8px 14px 8px 10px; }

  .contact-form { padding: 32px; }
}

/* Wszystko na 100%, zmiana kolejności flex */
@media (max-width: 767px) {

  :root { --section-space: 50px; }

  h1, .h1 { font-size: 2.25em; }
  h2, .h2 { font-size: 1.875em; }
  h3, .h3 { font-size: 1.5em; }

  .error-module .error-code { font-size: 4.5em; }
  .search-form { flex-direction: column; }
  .search-form button { width: 100%; justify-content: center; }

  .figures-module { padding: var(--gap-m) var(--gap-s); }
  .figures-module .figure-list { flex-wrap: wrap; row-gap: var(--gap-m); }
  .figures-module .figure-list:before { display: none; }
  .figures-module .figure-item { width: 50%; }
  .figures-module .figure-item .tick { display: none; }
  .figures-module .figure-item .number { margin-top: 0; }

  .feature-item, .news-item, .info-item { width: 100%; }
  /* .feature-list.columns-2 ma wyższą specyficzność niż sama .feature-item – bez tej
     reguły dwukolumnowe kafle (DRY / WET lease) zostawały obok siebie na telefonie. */
  .feature-list.columns-2 .feature-item { width: 100%; }
  .featured-news-module .image img { height: 260px; }
  .gallery-item, .gallery-item.wide, .gallery-item.half { width: 100%; }
  .image-placeholder { min-height: 320px; padding: var(--gap-s); }
  .image-placeholder img { max-height: 220px; }
  .gallery-item img, .gallery-item.tall img { height: 260px; }

  .simulator-item .text { padding: 28px; }

  .spec-list .spec-item { flex-direction: column; gap: 4px; }
  .spec-list .spec-item .label { width: 100%; }
  .spec-list .spec-item .value { text-align: left; }

  .data-table .row { flex-direction: column; gap: 6px; padding: 16px 20px; }
  .data-table.two-columns .row .cell:first-child { flex: 1; }
  .data-table .row.head { display: none; }

  .contact-form .form-row { flex-direction: column; gap: 0; }

  .footer-column { width: 100%; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--gap-s);
  }

  .video-module img.poster { height: 300px; }
  .video-module .play { width: 72px; height: 72px; }
  .video-module .caption { left: 20px; bottom: 20px; }

  .map-module .distance { display: none; }
  .map-module .route { display: none; }
  .map-module .pin.main { left: 6%; top: 46%; }
  .map-module .pin.secondary { left: 30%; top: 22%; }
}

@media (max-width: 575px) {
  .page-header-module { padding: 40px 0; }
  .page-header-module h1 { font-size: 1.875em; }

  .contact-card, .company-card { padding: 28px; }
  .contact-form { padding: 24px; }

  .button-list { width: 100%; }
  .button-list .primary-button,
  .button-list .secondary-button,
  .button-list .light-button,
  .button-list .dark-button { width: 100%; justify-content: center; }
}

@media (max-width: 460px) {
  .figures-module .figure-item { width: 100%; }
  .map-module .pin { font-size: 0.75em; }
}
