/* === CRITICAL: zapobieganie CLS dla bannerów/hero === */
/* dopasuj selektor .hero jeśli Twój hero ma inną klasę */
.hero, .top-banner, .main-banner {
  width: 100%;
  /* używamy aspect-ratio aby zarezerwować miejsce - zmień 16/6 na właściwy stosunek jeśli wiesz */
  aspect-ratio: 16 / 6;
  min-height: 120px; /* bezpieczny minimum, zmień jeśli potrzebne */
  background-color: #f8f8f8; /* neutralny kolor zapasowy, zapobiega skokowi */
  display: block;
  overflow: hidden;
}

/* obrazki wewnątrz bannerów - niech skalują się bez shift */
.hero img, .top-banner img, .main-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* dla wszystkich pozostałych obrazów: jeśli nie mają wymiarów - ogranicz 'shift' */
img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

/* lazy-loading: klasa przypisywana skryptem poniżej */
img[data-lazy="true"] {
  opacity: 0;
  transition: opacity .25s ease-in;
}
img[data-lazy="true"].loaded {
  opacity: 1;
}

/* === font-display dla @font-face (jeśli masz własne fonty) === */
@font-face {
  font-family: 'SiteSans';
  src: url('/fonts/SiteSans.woff2') format('woff2');
  font-display: swap;
}



/* === REGENERACJA IKON SOCIAL W CHECKOUT (KROK 1 I 2) === */
#client_new_social a[data-name="service_Facebook"]::before,
#client_new_social_sub a[data-name="service_Facebook"]::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  background-image: url('/gfx/standards/facebook.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#client_new_social a[data-name="service_LinkedIn"]::before,
#client_new_social_sub a[data-name="service_LinkedIn"]::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  background-image: url('/gfx/standards/linkedin.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#client_new_social a[data-name="service_PayPal"]::before,
#client_new_social_sub a[data-name="service_PayPal"]::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  background-image: url('/gfx/standards/paypal.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#client_new_social a[data-name="service_Google"]::before,
#client_new_social_sub a[data-name="service_Google"]::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  background-image: url('/gfx/standards/google.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#client_new_social a[data-name="service_Apple"]::before,
#client_new_social_sub a[data-name="service_Apple"]::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  background-image: url('/gfx/standards/apple.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Ustawiamy odstępy i pozycjonowanie linków */
#client_new_social a,
#client_new_social_sub a {
  position: relative !important;
  padding-left: 50px !important;
  display: inline-flex !important;
  align-items: center !important;
}



/* === Ukrycie oryginalnych <img> tylko dla wskazanych serwisów (nie dotyka Apple) === */
#client_new_social a[data-name="service_Facebook"] img,
#client_new_social_sub a[data-name="service_Facebook"] img,
#client_new_social a[data-name="service_LinkedIn"] img,
#client_new_social_sub a[data-name="service_LinkedIn"] img,
#client_new_social a[data-name="service_PayPal"] img,
#client_new_social_sub a[data-name="service_PayPal"] img,
#client_new_social a[data-name="service_Google"] img,
#client_new_social_sub a[data-name="service_Google"] img {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}



/* ==== FIX: Social icons in checkout step 2 ==== */
#client_new_social_more ul li .btn,
#client_new_social ul li .btn {
    position: relative;
    padding-left: 46px !important;
}

#client_new_social_more ul li .btn::before,
#client_new_social ul li .btn::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Facebook */
[data-name="service_Facebook"]::before {
    background-image: url("/gfx/standards/facebook.svg");
}

/* LinkedIn */
[data-name="service_LinkedIn"]::before {
    background-image: url("/gfx/standards/linkedin.svg");
}

/* PayPal */
[data-name="service_PayPal"]::before {
    background-image: url("/gfx/standards/paypal.svg");
}

/* Google */
[data-name="service_Google"]::before {
    background-image: url("/gfx/standards/google.svg");
}

/* Apple */
[data-name="service_Apple"]::before {
    background-image: url("/gfx/standards/apple.svg");
}