#custom-header {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 100vh;
    justify-content: space-between;
}

p {
  margin: 0;
}

.top-row {
  display: flex;
  align-items: center;
}
.top-row .logo {
  flex: 1 1 0;
}

.top-row .menu {
    flex: 10 0 auto;
}

.top-row .top-spacer {
  flex: 1 1 0; /* wyrównanie prawej strony */
}

/* Tło */
.background-img-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  height: 55%;
  width: 100%;
  z-index: -1;
  overflow: hidden;
}
.background-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

/* Logo + menu */
.top-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 10;
  margin-top: 2%;
  margin-bottom: 0;
}
.top-row .logo {
  flex: 0 0 auto;
}

.logo {
  display: flex;
  justify-content: flex-start;
}

.menu {
  display: flex;
  justify-content: center;
}
.menu-container {
  display: flex;
  gap: 6rem;
  background: white;
  padding: 2rem 3rem;
  border-radius: 50px;
  font-weight: 500;
  list-style: none;
  margin: 0;
  font-size: 1.4rem;
  line-height: 1;
}

.menu-container li a {
  position: relative;
  text-decoration: none;
  color: #000; /* Twój kolor tekstu */
}

.menu-container li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1rem; /* odstęp od napisu */
  width: 8px;
  height: 8px;
  background: #3cdc92; /* zielona kropka */
  border-radius: 50%;
  transform: translateX(-50%) scale(0);
  transition: transform 0.3s ease;
}

.menu-container li a:hover::after,
.menu-container li a:focus::after {
  transform: translateX(-50%) scale(1);
}

.middle-row {
  display: flex;
  justify-content: space-between;
  overflow: hidden;
}

.video-mask-wrapper {
  position: relative;
  width: 27%;
  overflow: hidden;
}

.video-mask {
  height: 60vh;
  position: relative;

  -webkit-mask-image: url("../assets/Vector.svg");
  mask-image: url("../assets/Vector.svg");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;

  background-color: #2ee7a6;
  isolation: isolate;
}

.video-mask > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  mix-blend-mode: luminosity;
}

/* Teksty (nowe klasy) */
.text_wrapper {
  width: 65%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.head_text {
  font-family: "epilogue", sans-serif;
  font-size: 4.8rem;
  line-height: 130%;
  color: rgb(255, 255, 255);
  padding-right: 11%;
}
.mission {
  display: flex;
  align-items: flex-end;
  gap: 10rem;
}
.text_mission {
  font-family: "epilogue", sans-serif;
  max-width: 33%;
  font-size: 1.8rem;
  color: #000000;
  line-height: 150%;
  font-weight: 500;
}
.text_button {
  flex-shrink: 0;
}

/* PRZYCISK – wypełnienie z lewej i jadące kółko */
.offer-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 2px solid #2ee7a6;
  border-radius: 50px;
  padding: 0.5rem 1rem 0.5rem 60px; /* miejsce na kółko z lewej */
  color: #0e1b2a;
  font-weight: 600;
  font-size: 1rem;
  background: transparent;
  text-decoration: none;
  overflow: hidden;
}

/* Animowane tło wsuwane z lewej */
.offer-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: #2ee7a6;
  transition: left 0.45s ease;
  z-index: 0;
}
.offer-btn:hover::before {
  left: 0;
}

/* Tekst nad tłem */
.offer-btn .label {
  position: relative;
  z-index: 1;
  font-size: 1.8rem;
  font-weight: normal;
  margin: 1rem 2rem 1rem 1rem;
  transition: color 0.2s ease, transform 0.45s ease; /* dodany transform */
}

/* Zielone kółko ze strzałką – absolutnie pozycjonowane i jedzie w prawo */
.offer-btn .circle {
  position: absolute;
  top: 50%;
  left: 5px; /* start przy lewym brzegu */
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #2ee7a6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: left 0.45s ease; /* płynny przejazd */
  z-index: 2; /* nad tłem */
  pointer-events: none; /* klik trafia w przycisk, nie w kółko */
}
.offer-btn:hover .circle {
  left: calc(
    100% - 10px - 40px
  ); /* do prawego brzegu: 100% - padding - szer. kółka */
}

/* Strzałka – bez rotacji, tylko siedzi w kółku */
.offer-btn .arrow {
  width: 20px;
  height: 20px;
  transition: none;
}

/* --- WAŻNE: nadpisujemy stare hovery, żeby nie kłóciły się z nowym efektem --- */
.offer-btn:hover {
  background: transparent;
} /* tło robi ::before */
.offer-btn:hover .circle {
  margin-right: 0;
} /* zero „auto” itp. */
.offer-btn:hover .arrow {
  transform: rotate(45deg);
} /* żadnej rotacji */
.offer-btn:hover .label {
  transform: translateX(-40px); /* przesuwa tekst lekko w lewo */
}

body:not(.home) #custom-header {
    min-height: 1px;
}

nav#breadcrumbs {
    background: #DAD5C8;
    margin-left: 2%;
    z-index: 1000000;
    position: relative;
    word-wrap: f;
    width: fit-content;
    font-size: 1.5rem;
    color: #142338;
    font-family: 'Epilogue';
    padding: .5rem;
    font-weight: 500;
    position: absolute;
    bottom: 4rem;
}

nav#breadcrumbs a {
    text-decoration: none;
    color: #142338;
}

nav#breadcrumbs span.breadcrumb_last {
    font-weight: 700;
}

@media (max-width: 1600px) {
  .text_wrapper {
    height: auto;
  }
  .head_text {
    padding-right: 0;
  }
  .offer-btn .label {
    transition: all 0.4s ease;
    font-weight: 500;
  }
  .text_mission {
    max-width: 45%;
  }

  .offer-btn .circle {
    left: 3px;
  }
}

@media (min-width: 2080px) {
.video-mask-wrapper {
    width: 23%;
}

.specrow {
    margin: auto 6%;
}

.middle-row. .text_wrapper {
    width: 70%;
}

.text_mission {
    max-width: 50%;
}

    .background-img-wrapper {
        height: 65%;
    }

.hp-why-intro__grid {
    grid-template-columns: 4fr 2fr;
}

.why-slide__desc {
    margin-right: 10%;
}

.blog-card__media {
    height: 520px;
}
}

@media (max-width: 1480px) {
.video-mask-wrapper {
    width: 29%;
}

}

@media (max-width: 1030px) {
  .background-img-wrapper {
    height: 66%;
  }
  .background-img {
    object-position: right;
  }
  .top-row {
    margin-top: 5%;
    margin-bottom: 10%;
  }

  .middle-row {
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    height: auto;
    margin-top: 0;
  }

  .video-mask-wrapper {
    width: 30%;
    max-width: 100%;
    height: 20vh;
    display: flex;
    flex-direction: column;
  }

  .text_wrapper {
    width: 100%;
    gap: 15rem;
    margin-top: 2%;
  }
  .head_text {
    font-size: 2.8rem;
  }

  .mission {
    flex-direction: column;
    align-items: flex-start;
    gap: 4rem;
    width: 100%;
  }
  .text_mission {
    max-width: 90%;
  }
  .text_button {
    display: flex;
    justify-content: center;
  }
  .top-row .menu {
    margin-left: 8%;
  }
  .offer-btn .circle {
    left: 2px;
  }

  #custom-header {
    min-height: 80vh;
  }

  .background-img-wrapper {
    height: 56%;
  }

  .mission {
      margin-top: 100px;
  }

  .video-mask-wrapper {
      width: 20%;
  }
}


@media (max-width: 480px) {
    .background-img-wrapper {
        height: 600px;
    }

.logo a svg {
    width: 75%;
    display: flex;
}

  .menu-container {
    gap: 0;
    padding: 0;
  }

.top-row {
    height: 50px;
    overflow: visible;
    margin-top: 0;
    margin-bottom: 0;
  }

  .menu-toggle {
    display: block;
  }

  .middle-row {
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    height: auto;
    margin-top: 100px;
  }

  .video-mask-wrapper {
    width: 30%;
  }

  .text_wrapper {
    width: 100%;
    gap: 10rem;
    height: auto;
    margin-left: 0;
  }
  .head_text {
    line-height: 130%;
    color: white;
    padding-right: 4%;
  }
  .mission {
    gap: 5rem;
  }
  .text_mission {
    max-width: 100%;
    justify-content: flex-start;
  }

  .text_button {
    display: flex;
    width: 100%;
    justify-content: flex-start;
  }

  .offer-btn .circle {
    left: 5px;
  }

  .video-mask {
    mask-position: left;
    -webkit-mask-posiitong: left;
    margin-left: 4%;
  }

  .mission {
    margin-top: 0px;
  }

  .top-row {
    justify-content: space-between;
}
}

@media (max-width: 400px) {
  .background-img-wrapper {
    height: 60%;
  }
}

#hamburger {
  display: none;
}

.hamburger {
  display: none;
  -webkit-tap-highlight-color: transparent;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
}
.hamburger-box {
  width: 28px;
  height: 20px;
  position: relative;
  display: inline-block;
}
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  position: absolute;
  width: 28px;
  height: 2px;
  left: 0;
  background-color: currentColor;
  transition: transform 200ms ease, opacity 200ms ease;
  content: "";
}
.hamburger-inner {
  top: 9px;
}
.hamburger-inner::before {
  top: -8px;
}
.hamburger-inner::after {
  top: 8px;
}
.hamburger.is-active .hamburger-inner {
  transform: rotate(45deg);
}
.hamburger.is-active .hamburger-inner::before {
  transform: rotate(90deg) translateX(-8px);
  opacity: 0;
}
.hamburger.is-active .hamburger-inner::after {
  transform: rotate(-45deg);
}

/* wersja tekstowa przycisku */
.hamburger-text {
  display: none;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
}

/* ---------- DESKTOP: logo lewo, menu środek ---------- */

.top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 10;
}

.top-row .top-spacer {
    flex: 1 1 0;
    display: none;
}

@media (max-width: 700px) {
  #hamburger {
    display: inline-block;
    z-index: 1100;
  }
  .hamburger {
    display: inline-flex;
    color: #111;
  }
  .hamburger-text {
    display: inline-block;
  }

  nav.menu {
        position: absolute;
        top: 0;
        right: -4%;
        width: 100vw;
        background: #3cdc92;
        color: #fff;
        z-index: 1000;
        transform: translate3d(110%, 0, 0);
        transition: transform 0.35s ease;
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.2);
        padding: 0;
  }

  nav.menu.is-open {
    transform: translate3d(0, 0, 0);
  }

  nav.menu.is-open {
    transform: translate3d(0, 0, 0);
  }

  nav.menu::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #3cdc92;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }
  nav.menu.is-open::before {
    opacity: 1;
    pointer-events: auto;
  }

    .menu .menu-container {
        display: flex;
        flex-direction: column;
        gap: 0;
        list-style: none;
        margin: 0;
        padding: 3.2rem;
        height: 100%;
        overflow: auto;
        text-align: center;
    }

  .menu .menu-container > li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }
  .menu .menu-container > li:last-child {
    border-bottom: 0;
  }
  .menu .menu-container > li > a {
    display: block;
    padding: 16px 4px;
    text-decoration: none;
    color: white;
    font-size: 18px;
  }

  body.nav-open {
    overflow: hidden;
    touch-action: none;
  }

  .top-row .menu {
    flex: 0 0 auto;
  } 

  nav#breadcrumbs {
    display: none;
  }

  #custom-header {
    overflow: visible;
}
}

/* drobny “bezpiecznik” na ewentualne 1px przesunięcia */
html,
body {
  overflow-x: hidden;
}

::selection {
  background: #3cdc92;
  color: white;;
}


@media (min-width: 1181px) and (max-width: 1600px) {
  .text_wrapper {
    gap: 45px;
  }
}

@media (min-width: 1100px) and (max-width: 1180px) {
  .text_wrapper {
    gap: 210px;
  }
}

@media (min-width: 937px) and (max-width: 1099px) {
  .text_wrapper {
    gap: 45px;
  }
}

@media (min-width: 901px) and (max-width: 936px) {
  .text_wrapper {
    gap: 75px;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .text_wrapper {
    gap: 45px;
  }
}

@media (min-width: 637px) and (max-width: 700px) {
  .text_wrapper {
    gap: 185px;
  }
}

@media (min-width: 481px) and (max-width: 636px) {
  .text_wrapper {
    gap: 145px;
  }
}
