#branches-main > #gorzow-hero,
.recruitment-hero > #gorzow-hero {
  padding: 6rem 0 3rem;
  margin-bottom: 0;
  overflow: visible;
  isolation: isolate;
}

/* Desktop navigation overlays the hero; its existing top padding already accommodates it.
   Extend only the blue section, leaving the surface and form at their natural height. */
@media (min-width: 992px) {
  #branches-main > #gorzow-hero,
  .recruitment-hero > #gorzow-hero {
    min-height: 100svh;
  }
}

/* Match .landing-hero .container; px-lg-5 keeps the shared desktop gutters. */
#gorzow-hero > .container {
  max-width: 1200px;
  padding-inline: 1.5rem;
}

/* Keep the existing sky decoration inside the hero without clipping form dropdowns. */
#gorzow-hero::before,
#gorzow-hero::after {
  inset: 0;
}

/* Reuse the home surface, with the existing site's glass values. Keep dropdowns unclipped. */
#gorzow-hero .gorzow-hero-surface {
  overflow: visible;
  background: rgba(255, 255, 255, 0.72);
  padding-block: 0;
}

#gorzow-hero .gorzow-hero-surface::before {
  border-radius: inherit;
  /* Blur a decorative layer, not an ancestor of Bitrix's fixed mobile dropdowns. */
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
}

#gorzow-hero .gorzow-hero-surface::after {
  content: none;
}

#gorzow-hero .gorzow-hero-grid {
  padding-block: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: center;
  z-index: 2;
}

#gorzow-hero .gorzow-hero-copy,
#gorzow-hero .gorzow-hero-form {
  min-width: 0;
  color: var(--primary);
}

#gorzow-hero .gorzow-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  #gorzow-hero .gorzow-hero-copy {
    align-self: stretch;
    padding-top: 1rem;
  }
}

#gorzow-hero h1 {
  color: var(--primary);
  font-size: clamp(2rem, 3vw, 2.625rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

#gorzow-hero .gorzow-hero-description {
  line-height: 1.7;
  margin-bottom: 0;
}

#gorzow-hero .gorzow-hero-phone-label {
  margin-bottom: 6px;
}

#gorzow-hero .gorzow-hero-phone {
  color: var(--primary);
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

#gorzow-hero .gorzow-hero-phone i {
  font-size: 0.9em;
}

/* Decorative only: the stage occupies existing free space, never intrinsic height. */
#gorzow-hero .gorzow-taxi-space {
  display: none;
}

@media (min-width: 992px) {
  #gorzow-hero .gorzow-hero-contact {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  #gorzow-hero .gorzow-taxi-space {
    display: block;
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    pointer-events: none;
    container: gorzow-taxi / size;
  }

  #gorzow-hero .gorzow-taxi-journey {
    position: absolute;
    inset: 0;
    visibility: hidden;
  }

  #gorzow-hero .gorzow-pixel-taxi {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(320px, 100%);
    height: auto;
    display: block;
    transform: translate(-50%, -50%);
    shape-rendering: crispEdges;
    image-rendering: pixelated;
  }

  #gorzow-hero .gorzow-taxi-headlight {
    opacity: 0;
  }

  #gorzow-hero .gorzow-taxi-wheel-hub {
    transform-box: fill-box;
    transform-origin: center;
  }

  /* If loading/errors/font changes leave too little room, keep the decoration hidden. */
  @container gorzow-taxi (min-height: 136px) {
    #gorzow-hero .gorzow-taxi-journey {
      visibility: visible;
      animation: gorzow-taxi-drive 12s infinite;
      will-change: transform;
    }

    #gorzow-hero .gorzow-taxi-headlight {
      animation: gorzow-taxi-blink 12s linear infinite;
    }

    #gorzow-hero .gorzow-taxi-wheel-hub {
      animation: gorzow-taxi-wheels 12s infinite;
    }
  }
}

/* 0–2 s: brake to a stop; 2–5 s: wait; 5–7 s: accelerate; 7–12 s: offstage. */
@keyframes gorzow-taxi-drive {
  0% {
    transform: translateX(calc(50% + 160px));
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  16.666667% {
    transform: translateX(0);
  }
  41.666667% {
    transform: translateX(0);
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  58.333333%, 100% {
    transform: translateX(calc(-50% - 160px));
  }
}

@keyframes gorzow-taxi-blink {
  0%, 26%, 30%, 100% { opacity: 0; }
  27%, 28% { opacity: 0.8; }
}

@keyframes gorzow-taxi-wheels {
  0% { transform: rotate(0deg); animation-timing-function: steps(8, end); }
  16.666667% { transform: rotate(-720deg); }
  41.666667% { transform: rotate(-720deg); animation-timing-function: steps(8, end); }
  58.333333%, 100% { transform: rotate(-1440deg); }
}

@media (prefers-reduced-motion: reduce) {
  #gorzow-hero .gorzow-taxi-journey,
  #gorzow-hero .gorzow-taxi-headlight,
  #gorzow-hero .gorzow-taxi-wheel-hub {
    animation: none;
    will-change: auto;
  }
}

#gorzow-recruitment-form {
  scroll-margin-top: 7.5rem;
}

/* Reserve the existing form footprint until the shared Bitrix loader is ready. */
#gorzow-bitrix-host[aria-busy="true"] {
  min-block-size: 36.6rem;
}

@media (max-width: 991.98px) {
  #gorzow-bitrix-host[aria-busy="true"] {
    min-block-size: 50rem;
  }
}

#gorzow-hero a:focus-visible,
#gorzow-recruitment-form:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}

/* Scoped overrides of the current inline Bitrix DOM; no change to form configuration. */
#gorzow-recruitment-form .b24-form-wrapper {
  width: 100%;
  max-width: none;
  border-radius: 12px;
  box-shadow: none;
}

#gorzow-recruitment-form .b24-form-padding-side {
  padding-left: 18px;
  padding-right: 18px;
}

#gorzow-recruitment-form .b24-form-header-title {
  font-size: 1.45rem;
  line-height: 1.25;
}

#gorzow-recruitment-form .b24-form-header-description {
  font-size: 0.88rem;
  line-height: 1.45;
}

#gorzow-recruitment-form .b24-form-content form > div:first-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
}

#gorzow-recruitment-form .b24-form-field {
  min-width: 0;
  margin-bottom: 12px;
}

#gorzow-recruitment-form .b24-form-field-list {
  grid-column: 1 / -1;
}

#gorzow-recruitment-form .b24-form-control {
  font-size: 16px;
}

#gorzow-recruitment-form .b24-form-control-label {
  color: var(--primary);
  opacity: 1;
}

#gorzow-recruitment-form .b24-form-field-agreement .b24-form-control-desc {
  color: var(--primary);
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 1;
}

#gorzow-recruitment-form .b24-form-field-agreement-link {
  color: inherit;
}

#gorzow-recruitment-form .b24-form-control:focus-visible,
#gorzow-recruitment-form input[type="checkbox"]:focus-visible,
#gorzow-recruitment-form [role="combobox"]:focus-visible,
#gorzow-recruitment-form .b24-form-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width: 991.98px) {
  #gorzow-hero .gorzow-hero-phone {
    font-size: 20px;
  }

  #gorzow-hero .gorzow-hero-grid,
  #gorzow-recruitment-form .b24-form-content form > div:first-child {
    grid-template-columns: minmax(0, 1fr);
  }

  #gorzow-hero .gorzow-hero-grid {
    gap: 2rem;
  }

  #gorzow-hero .gorzow-hero-copy {
    max-width: 42rem;
  }

  #gorzow-hero .gorzow-hero-surface {
    padding-inline: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  #gorzow-hero .gorzow-hero-surface {
    padding-inline: 0.5rem;
  }

  #gorzow-recruitment-form .b24-form-padding-side {
    padding-left: 12px;
    padding-right: 12px;
  }
}
