
  .asta-rating-badge,
  .asta-rating-badge * {
    box-sizing: border-box;
  }

  .asta-rating-badge {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    padding: 10px 22px;
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: var(--asta-radius);
    box-shadow: 0 10px 30px rgba(8,20,8,0.28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    margin-block-start: clamp(14px, 2vw, 22px);
    font-size: 14px;
    line-height: 1.2;
    color: #202124;
    font-family: inherit;
  }

  .asta-rating-badge * {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
  }

  .asta-rating-badge p {
    line-height: 1;
  }

  .asta-rating-badge__left {
    display: inline-flex;
    align-items: center;
    gap: 9px;
  }

  .asta-rating-badge__score {
    font-weight: 700;
    font-size: 16px;
  }

  .asta-rating-badge__stars {
    display: inline-flex;
    gap: 3px;
    color: #F9AB00;
    font-size: 17px;
  }

  .asta-rating-badge__count {
    margin-left: 2px;
    font-size: 13.5px;
    color: #5F6368;
  }

  .asta-rating-badge__divider {
    display: inline-block;
    width: 1px;
    height: 26px;
    margin: 0;
    background: rgba(0,0,0,0.14);
  }

  .asta-rating-badge__logos {
    display: inline-flex;
    align-items: center;
    gap: 22px;
  }

  .asta-rating-badge__logos img {
    display: block;
    height: 26px;
    width: auto;
  }

  @media (max-width: 767px) {
    .asta-rating-badge {
      padding: 9px 16px;
      gap: 12px;
      row-gap: 10px;
      font-size: 13px;
      flex-wrap: wrap;
    }

    .asta-rating-badge__left {
      gap: 6px;
    }

    .asta-rating-badge__stars {
      font-size: 15px;
    }

    .asta-rating-badge__count {
      font-size: 13px;
    }

    .asta-rating-badge__divider {
      display: none; /* mniej ciasno na mobile */
    }

    .asta-rating-badge__logos {
      gap: 14px;
    }

    .asta-rating-badge__logos img {
      height: 18px;
    }
  }



  .asta-reviews-marquee {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 10px 0;
    background: transparent;
  }

  .asta-reviews-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: astaMarquee 55s linear infinite;
    will-change: transform;
  }

  .asta-reviews-marquee:hover .asta-reviews-track {
    animation-play-state: paused;
  }

  .asta-review-card {
    flex: 0 0 360px;
    min-height: 230px;
    padding: 28px 24px;
    background: var(--e-global-color-838a73b);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
  }

  .asta-review-card:hover {
    transform: translateY(-4px);
  }

  .asta-stars {
    font-size: 22px;
    line-height: 1;
    letter-spacing: 2px;
    color: #ffffff;
    margin-bottom: 16px;
  }

  .asta-review-card p {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.65;
    font-weight: 500;
  }

  .asta-review-card span {
    display: inline-block;
    margin-top: 18px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.92;
  }

  @keyframes astaMarquee {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(calc(-50% - 12px));
    }
  }

/* Homepage reviews: lighter cards and a quieter, slower marquee. */
.home main .wp-block-post-content > .asta-layout:nth-child(8),
.home main .wp-block-post-content > .asta-layout:has(> .asta-reviews-marquee) {
  background: #f7f9f6;
}


.home .asta-reviews-marquee {
  display: block;
  gap: 0;
  overflow: hidden;
  padding: 8px 0 14px;
  background: transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

.home .asta-reviews-marquee > .asta-reviews-track {
  flex: 0 0 auto;
  gap: 18px;
  padding: 0;
  background: transparent;
  color: inherit;
  animation-duration: 72s;
}

.home .asta-review-card {
  flex: 0 0 min(340px, calc(100vw - 48px));
  min-height: 196px;
  padding: 24px;
  background: #fff;
  color: var(--asta-ink);
  border: 1px solid #e2e9df;
  box-shadow: 0 6px 20px rgb(31 36 44 / 4%);
  transition: none;
}

.home .asta-review-card:hover {
  transform: none;
}

.home .asta-stars {
  margin-bottom: 14px;
  color: var(--asta-green, #47a013);
  font-size: 18px;
  letter-spacing: 1px;
}

.home .asta-review-card .asta-stars p {
  color: var(--asta-green, #47a013);
}

.home .asta-review-card p {
  color: #3f4940;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
}

.home .asta-review-card span {
  margin-top: 16px;
  color: #697568;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .home .asta-reviews-marquee {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .home .asta-reviews-track {
    animation: none;
    width: max-content;
    will-change: auto;
  }
}

@media (max-width: 767px) {
  .home .asta-review-card {
    flex-basis: min(300px, calc(100vw - 40px));
    min-height: 184px;
    padding: 20px;
  }
}

/* Quiet links to ASTA Energy review profiles, kept editable as Gutenberg blocks. */
.home .asta-review-platforms {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 24px 28px;
  text-align: center;
}

.home .asta-review-platforms__label {
  margin: 0;
  color: #697568;
  font-size: 14px;
  line-height: 1.45;
}

.home .asta-review-platforms__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 3vw, 38px);
  margin: 0;
}

.home .asta-review-platforms__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
}

.home .asta-review-platforms__logo a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 6px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.home .asta-review-platforms__logo a:hover {
  opacity: 0.78;
  transform: translateY(-2px);
}

.home .asta-review-platforms__logo a:focus-visible {
  outline: 2px solid var(--asta-green, #47a013);
  outline-offset: 4px;
}

.home .asta-review-platforms__logo img {
  display: block;
  width: auto;
  height: 28px;
  max-width: 126px;
  border-radius: 0 !important;
  object-fit: contain;
}

@media (max-width: 767px) {
  .home .asta-review-platforms {
    gap: 7px;
    padding: 0 20px 24px;
  }

  .home .asta-review-platforms__logos {
    gap: 18px;
  }

  .home .asta-review-platforms__logo img {
    height: 25px;
    max-width: 112px;
  }
}

  @media (max-width: 1024px) {
    .asta-review-card {
      flex: 0 0 320px;
      min-height: 220px;
      padding: 24px 20px;
    }

    .asta-review-card p {
      font-size: 15px;
    }
  }

  @media (max-width: 767px) {
    .asta-reviews-track {
      gap: 16px;
      animation-duration: 42s;
    }

    .asta-review-card {
      flex: 0 0 280px;
      min-height: 205px;
      padding: 20px 18px;
    }

    .asta-stars {
      font-size: 20px;
      margin-bottom: 12px;
    }

    .asta-review-card p {
      font-size: 14px;
      line-height: 1.55;
    }

    .asta-review-card span {
      margin-top: 14px;
      font-size: 13px;
    }
  }

/* Home: concise editorial introductions paired with real-world installation photography. */
.home .asta-hero-video__content > .asta-layout > .asta-home-hero-title {
  max-width: 720px;
  margin: 0 0 38px;
  font-size: clamp(2.5rem, 6.8vw, 5.8rem);
  font-weight: 400;
  line-height: 1.02;
}

.home .asta-realizations-section h2 {
  max-width: 1080px;
  margin-bottom: 42px;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.2;
}

.home .asta-home-editorial-columns {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  margin: 0;
}

.home .asta-home-editorial-columns > .wp-block-column {
  min-width: 0;
  margin: 0;
}

.home .asta-home-editorial-columns > .wp-block-column:first-child {
  max-width: 540px;
}

/* „W czym możemy Ci pomóc?” — treść po lewej, film YouTube po prawej. */
.home .asta-home-help-section {
  text-align: left;
}

.home .asta-home-help-section .wp-block-buttons {
  justify-content: flex-start !important;
}

.home .asta-home-help-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4.5vw, 64px);
  margin: 0;
}

.home .asta-home-help-columns > .wp-block-column {
  min-width: 0;
  margin: 0;
}

.home .asta-home-help-columns .wp-block-embed {
  margin: 0;
}

.home .asta-home-help-columns .wp-block-embed iframe {
  display: block;
  border-radius: 14px;
}

.home .asta-home-editorial-columns h2 {
  max-width: 16ch;
  margin: 0 0 18px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.08;
}

.home .asta-home-editorial-copy {
  max-width: 52ch;
  margin: 0;
  color: #566153;
  font-size: clamp(1.05rem, 1.25vw, 1.2rem);
  line-height: 1.7;
}

.home .asta-home-editorial-details {
  margin-top: 22px;
  border-top: 1px solid #dfe7dc;
}

.home .asta-home-editorial-details > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  color: var(--asta-dark-green);
  cursor: pointer;
  font-size: .96rem;
  font-weight: 700;
  list-style: none;
}

.home .asta-home-editorial-details > summary::-webkit-details-marker {
  display: none;
}

.home .asta-home-editorial-details > summary::after {
  content: "+";
  color: var(--asta-green);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1;
}

.home .asta-home-editorial-details[open] > summary::after {
  content: "−";
}

.home .asta-home-editorial-details > p {
  max-width: 58ch;
  margin: 0 0 12px;
  color: #566153;
  font-size: .96rem;
  line-height: 1.65;
}

.home figure.asta-home-editorial-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e3e9df;
  border-radius: 22px;
  background: #f4f6f2;
  box-shadow: 0 16px 44px rgb(31 36 44 / 10%);
}

.home figure.asta-home-editorial-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.home figure.asta-home-editorial-photo figcaption {
  padding: 10px 14px 12px;
  color: #667061;
  font-size: .82rem;
  line-height: 1.45;
}

.home .asta-offer-card__text {
  min-height: 0 !important;
  margin-bottom: 0;
}

.home .asta-offer-card__details {
  margin-top: 0;
  border: 0;
}

@media (min-width: 861px) {
  .home main .wp-block-post-content > .asta-layout:nth-child(4),
  .home main .wp-block-post-content > .asta-layout:nth-child(6) {
    align-items: stretch;
  }

  .home .asta-offer-card {
    align-self: stretch;
    min-height: 695px;
  }
}

.home .asta-offer-card__details > p {
  min-height: 0;
  margin: 0 0 12px;
  color: #566153;
  font-size: .96rem;
  line-height: 1.6;
}

.home .asta-offer-card__details > .asta-offer-card__list {
  margin: 0 0 18px;
}

@media (max-width: 860px) {
  .home .asta-offer-card {
    min-height: 0;
  }

  .home .asta-home-editorial-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .home .asta-home-editorial-columns > .wp-block-column:first-child {
    max-width: 680px;
  }

  .home figure.asta-home-editorial-photo {
    width: min(100%, 680px);
  }
}

@media (max-width: 600px) {
  .home .asta-hero-video__content > .asta-layout > .asta-home-hero-title {
    margin-bottom: 28px;
    font-size: clamp(2.25rem, 9.3vw, 3.2rem);
  }
}

/* Treat the business and home images as quiet section backdrops. */
.home .asta-home-editorial-columns {
  position: relative;
  isolation: isolate;
  min-height: clamp(350px, 31vw, 400px);
  overflow: hidden;
}

.home .asta-home-editorial-columns > .wp-block-column:has(> figure.asta-home-editorial-photo) {
  position: static;
}

.home .asta-home-editorial-columns > .wp-block-column:first-child {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.home figure.asta-home-editorial-photo {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 72%;
  height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.home figure.asta-home-editorial-photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  border-radius: 0 !important;
}

body.home .wp-block-post-content .asta-home-editorial-columns figure.asta-home-editorial-photo > img {
  border-radius: 0 !important;
}

.home figure.asta-home-editorial-photo::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #fff 0%, #fff 18%, rgb(255 255 255 / 94%) 32%, rgb(255 255 255 / 66%) 49%, transparent 82%),
    linear-gradient(0deg, #fff 0%, rgb(255 255 255 / 88%) 14%, transparent 58%);
  content: "";
  pointer-events: none;
}

.home figure.asta-home-editorial-photo figcaption {
  display: none;
}

@media (max-width: 860px) {
  .home .asta-home-editorial-columns {
    min-height: clamp(360px, 74vw, 440px);
  }

  .home figure.asta-home-editorial-photo {
    right: -1%;
    width: 88%;
  }

  .home figure.asta-home-editorial-photo::after {
    background:
      linear-gradient(90deg, #fff 0%, rgb(255 255 255 / 98%) 30%, rgb(255 255 255 / 86%) 54%, transparent 100%),
      linear-gradient(0deg, #fff 0%, rgb(255 255 255 / 90%) 16%, transparent 62%);
  }
}

@media (max-width: 600px) {
  .home .asta-home-editorial-columns {
    min-height: 360px;
  }
}

/* Round only the upper-right corner of both editorial background images. */
.home figure.asta-home-editorial-photo {
  border-top-right-radius: 26px;
}

.home figure.asta-home-editorial-photo img,
body.home .wp-block-post-content .asta-home-editorial-columns figure.asta-home-editorial-photo > img,
.home figure.asta-home-editorial-photo::after {
  border-top-right-radius: 26px !important;
}

@media (max-width: 860px) {
  .home .asta-home-help-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* On phones, keep the homepage reviews available to swipe instead of auto-scrolling away. */
@media (max-width: 767px) {
  .home .asta-reviews-marquee {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0 18px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
    -webkit-mask-image: none;
    mask-image: none;
    scrollbar-width: thin;
  }

  .home .asta-reviews-marquee > .asta-reviews-track {
    width: max-content;
    animation: none !important;
    transform: none !important;
    will-change: auto;
  }

  /* The track contains a second copy for the desktop loop; show each review once on mobile. */
  .home .asta-reviews-track > .asta-review-card:nth-child(n + 9) {
    display: none;
  }

  .home .asta-reviews-track > .asta-review-card {
    scroll-snap-align: start;
  }

  /* The timed CallPage greeting obscures the hero/help transition; keep its button usable. */
  .home #callpage .cp-button-tooltip {
    display: none !important;
  }

  .home #callpage .cp-button-section.cp-callpage__button {
    width: 56px !important;
    height: 56px !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
  }

  .home #callpage .cp-widget-button,
  .home #callpage .cp-widget-button__inner {
    width: 56px !important;
    height: 56px !important;
  }

  .home #callpage .cp-widget-button__icon {
    width: 27px !important;
    height: 27px !important;
  }

  .home .asta-home-help-columns > .wp-block-column:first-child > p:first-of-type {
    max-width: calc(100% - 24px);
  }
}
