/* =========================================================
   Strona główna
   ========================================================= */

/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */

.hero {
  --hero-height: min(46rem, calc(100svh - var(--header-height)));
  --hero-image-width: 36.5rem;

  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--hero-image-width);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  justify-content: space-between;
  column-gap: clamp(3rem, 5vw, 6rem);
  width: 100%;
  max-width: 100%;
  height: var(--hero-height);
  min-height: 0;
  padding: 0 0 0 clamp(3rem, 5.6vw, 6.25rem);
  background: radial-gradient(100% 100% at 0% 100%, #1d1e20 50%, #2e2e2e 100%);
  color: var(--c-white);
  overflow: hidden;
}

.hero__content {
  display: flex;
  flex-direction: column;
  /* Blok „Trusted by” jest węższy i przylega do prawej krawędzi kolumny. */
  align-items: flex-end;
  justify-content: flex-end;
  gap: 100px;
  width: 100%;
  min-width: 0;
  height: var(--hero-height);
  padding: calc(clamp(3rem, 5vh, 4rem) + 10px) 0;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(2.5rem, 5vh, 4rem);
  width: 100%;
  max-width: 61.5rem;
  padding: 10px;
}

.hero__title {
  color: var(--c-white);
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 3.7vw, 4.05rem);
  font-weight: 700;
  line-height: 1.16;
}

.hero__subtitle {
  max-width: 54.5rem;
  color: var(--c-white);
  font-size: clamp(1.35rem, 1.4vw, 1.5rem);
  font-weight: 700;
  line-height: 1.5;
}

.hero__trusted {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  width: 18rem;
  padding: 10px;
}

.hero__trusted-title {
  color: var(--c-white);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.35;
}

.hero__clients {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
  width: 18rem;
  height: 3rem;
  padding: 10px;
}

.hero__client {
  flex: 0 0 auto;
}

.hero__client img {
  display: block;
  height: 2.5rem;
  object-fit: contain;
}

.hero__client--wide img {
  width: 5.9rem;
}

.hero__client--square img {
  width: 2.5rem;
  border-radius: 0.5rem;
}

.hero__visual {
  align-self: stretch;
  justify-self: end;
  width: var(--hero-image-width);
  max-width: 100%;
  height: var(--hero-height);
  min-width: 0;
  overflow: hidden;
  line-height: 0;
}

.hero__visual img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: contain;
  object-position: right top;
}

@media (max-width: 1350px) {
  .hero {
    --hero-height: 42rem;
    --hero-image-width: 33.25rem;

    padding-left: 4rem;
    column-gap: 3rem;
  }

  .hero__content {
    padding: calc(3.25rem + 10px) 0;
  }

  .hero__copy {
    gap: 3rem;
  }

  .hero__title {
    font-size: 3.2rem;
    line-height: 1.14;
  }

  .hero__subtitle {
    max-width: 45rem;
    font-size: 1.35rem;
    line-height: 1.45;
  }
}

@media (max-width: 1024px) {
  .hero {
    --hero-height: clamp(25rem, 58vw, 36rem);

    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: clamp(1rem, 2.5vw, 2rem);
    padding: 0 0 0 clamp(2rem, 4vw, 3rem);
  }

  .hero__content {
    align-items: flex-start;
    justify-content: center;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    padding: calc(clamp(2rem, 4vw, 3rem) + 10px) 0;
  }

  .hero__copy {
    gap: clamp(1.5rem, 3vw, 2.25rem);
  }

  .hero__title {
    font-size: clamp(2.3rem, 4.9vw, 3.2rem);
    line-height: 1.14;
  }

  .hero__subtitle {
    max-width: 100%;
    font-size: clamp(1rem, 2.3vw, 1.3rem);
    line-height: 1.4;
  }

  /* Na mniejszych ekranach grafika przylega do prawej krawędzi,
     a blok „Trusted by” znika. */
  .hero__trusted {
    display: none;
  }

  .hero__visual {
    width: auto;
    max-width: none;
    aspect-ratio: 698.5 / 882;
  }

  .hero__visual img {
    object-fit: cover;
    object-position: right top;
  }
}

@media (max-width: 767px) {
  .hero {
    --hero-height: clamp(13rem, 52vw, 20rem);

    column-gap: clamp(0.4rem, 1.5vw, 0.8rem);
    padding: 0 0 0 clamp(0.85rem, 3.5vw, 1.5rem);
  }

  .hero__content {
    gap: clamp(0.8rem, 3vw, 1.35rem);
    padding: calc(clamp(0.9rem, 3.5vw, 1.5rem) + 10px) 0;
  }

  .hero__copy {
    gap: clamp(0.65rem, 2.5vw, 1rem);
  }

  .hero__title {
    font-size: clamp(1.35rem, 7.2vw, 2.15rem);
    line-height: 1.1;
  }

  .hero__subtitle {
    font-size: clamp(0.62rem, 3.7vw, 1rem);
    line-height: 1.32;
  }
}

@media (max-width: 480px) {
  .hero {
    --hero-height: clamp(12rem, 51vw, 15rem);

    column-gap: 0.3rem;
    padding-left: 0.75rem;
  }

  .hero__content {
    gap: 0.75rem;
    padding: calc(0.8rem + 10px) 0;
  }

  .hero__copy {
    gap: 0.6rem;
  }

  .hero__title {
    font-size: clamp(1.2rem, 5.8vw, 1.75rem);
  }

  .hero__subtitle {
    font-size: clamp(0.62rem, 3.55vw, 0.86rem);
    line-height: 1.3;
  }
}

/* ---------------------------------------------------------
   OPINIE (karuzela)
   --------------------------------------------------------- */

.testimonials {
  --t-padding-x: clamp(96px, 8vw, 156px);
  --t-title-size: 32px;
  --t-title-line: 40px;
  --t-quote-size: 17px;
  --t-quote-line: 24px;
  --t-author-size: 11px;
  --t-author-line: 14px;
  --t-button-size: 13px;
  --t-button-line: 17px;
  --t-image-width: 240px;

  position: relative;
  width: 100%;
  padding: 68px var(--t-padding-x) 44px;
  background: var(--c-dark);
  color: var(--c-white);
  overflow: hidden;
}

.testimonials__title {
  width: 100%;
  margin: 0 0 42px;
  color: var(--c-white);
  font-size: var(--t-title-size);
  font-weight: 700;
  line-height: var(--t-title-line);
  text-align: center;
}

.testimonials__viewport {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  overflow: hidden;
}

.testimonials__track {
  display: flex;
  width: 100%;
  transition: transform 0.42s ease;
  will-change: transform;
}

.testimonial {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 72px;
  width: 100%;
  min-width: 100%;
  color: var(--c-white);
}

.testimonial--with-image {
  grid-template-columns: minmax(0, 1fr) var(--t-image-width);
}

.testimonial__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 800px;
}

.testimonial--with-image .testimonial__content {
  max-width: 780px;
}

.testimonial__quote {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  margin: 0 0 30px;
  color: var(--c-white);
  font-size: var(--t-quote-size);
  font-weight: 700;
  line-height: var(--t-quote-line);
  text-align: left;
  overflow: hidden;
}

.testimonial.is-expanded .testimonial__quote {
  display: block;
  overflow: visible;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
}

.testimonial__logo {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.testimonial__who {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.testimonial__who strong {
  font-size: var(--t-author-size);
  font-weight: 700;
  line-height: var(--t-author-line);
}

.testimonial__who span {
  font-size: var(--t-author-size);
  font-weight: 500;
  line-height: var(--t-author-line);
  opacity: 0.92;
}

.testimonial__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 154px;
  min-height: 30px;
  padding: 5px 12px;
  background: var(--c-accent);
  border: 3px solid var(--c-black);
  border-radius: 2px;
  color: var(--c-black);
  font-family: var(--font-main);
  font-size: var(--t-button-size);
  font-weight: 700;
  line-height: var(--t-button-line);
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.testimonial__more:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.22);
}

/* Ramka jest już częścią grafiki, więc obrazek nie ma dodatkowego obramowania. */
.testimonial__image {
  align-self: start;
  justify-self: center;
  width: var(--t-image-width);
  line-height: 0;
}

.testimonial__image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.testimonials__controls {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  width: 100%;
  max-width: 1360px;
  margin: 34px auto 0;
}

.testimonials__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--c-white);
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.testimonials__arrow--prev {
  justify-self: start;
}

.testimonials__arrow--next {
  justify-self: end;
}

.testimonials__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.testimonials__dot {
  width: 42px;
  height: 7px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--c-white);
  border-radius: 999px;
  cursor: pointer;
}

.testimonials__dot.is-active {
  background: var(--c-white);
}

@media (max-width: 1024px) {
  .testimonials {
    --t-padding-x: 72px;
    --t-title-size: 28px;
    --t-title-line: 36px;
    --t-quote-size: 15px;
    --t-quote-line: 21px;
    --t-author-size: 10px;
    --t-author-line: 13px;
    --t-image-width: 190px;

    padding-top: 56px;
    padding-bottom: 38px;
  }

  .testimonial {
    gap: 46px;
  }
}

@media (max-width: 767px) {
  .testimonials {
    --t-padding-x: 34px;
    --t-title-size: 23px;
    --t-title-line: 31px;
    --t-quote-size: 14px;
    --t-quote-line: 19px;
    --t-button-size: 12px;
    --t-button-line: 16px;
    --t-image-width: 190px;

    padding-top: 38px;
    padding-bottom: 32px;
  }

  .testimonials__title {
    margin-bottom: 32px;
  }

  .testimonial,
  .testimonial--with-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
  }

  .testimonial--with-image {
    flex-direction: column-reverse;
  }

  .testimonial__content,
  .testimonial--with-image .testimonial__content {
    width: 100%;
    max-width: 100%;
    align-items: center;
    text-align: center;
  }

  .testimonial__quote {
    -webkit-line-clamp: 7;
    max-width: 360px;
    margin: 0 0 22px;
    text-align: center;
  }

  /* Opinie bez zdjęcia mogą być nieco większe */
  .testimonial:not(.testimonial--with-image) .testimonial__content {
    max-width: 390px;
    margin-inline: auto;
  }

  .testimonial:not(.testimonial--with-image) .testimonial__quote {
    max-width: 390px;
    margin-inline: auto;
    font-size: 15px;
    line-height: 20px;
  }

  .testimonial__author {
    justify-content: center;
    margin-bottom: 18px;
  }

  .testimonial__who {
    align-items: flex-start;
    text-align: left;
  }

  .testimonial__image {
    align-self: center;
  }

  .testimonials__controls {
    grid-template-columns: 36px 1fr 36px;
    margin-top: 30px;
  }

  .testimonials__dot {
    width: 34px;
  }
}

@media (max-width: 480px) {
  .testimonials {
    --t-padding-x: 28px;
    --t-title-size: 21px;
    --t-title-line: 29px;
    --t-quote-size: 13px;
    --t-quote-line: 18px;
    --t-image-width: 176px;
  }

  .testimonial__quote {
    max-width: 320px;
  }

  .testimonial:not(.testimonial--with-image) .testimonial__quote {
    max-width: 330px;
    font-size: 14px;
    line-height: 19px;
  }

  .testimonials__dot {
    width: 30px;
  }
}
