/* ==========================================================================
   SEKCJA OPINII GOOGLE I KARUZELI OPINII KLIENTÓW
   ========================================================================== */

.ak-reviews-wrapper-section {
  padding: 50px 0 60px;
  background-color: var(--ak-bg-white);
  overflow: hidden;
}

.ak-reviews-container {
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Nagłówek sekcji opinii - spójna oś z Hero (H2 na X = 165px, Podtytuł na X = 290px) */
.ak-reviews-intro-header {
  width: 100%;
  margin: 0 0 24px;
  text-align: left;
}

.ak-reviews-intro-h2 {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 700;
  color: var(--ak-navy-dark);
  line-height: 1.3;
  margin: 0 0 12px 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
  text-wrap: normal;
  -webkit-text-wrap: normal;
}

.ak-reviews-intro-sub {
  font-family: 'Inter', 'Inter Fallback', sans-serif;
  font-size: clamp(15px, 1.4vw, 17px);
  font-weight: 700;
  color: var(--ak-navy-dark);
  width: 90%;
  max-width: 90%;
  margin: 0 0 25px 20px;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  box-sizing: border-box;
}

.ak-reviews-intro-sub strong {
  font-weight: 700;
  color: var(--ak-navy-dark);
}

/* Przycisk Oceń nas w Google */
.google-review-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 10px 0 35px;
  box-sizing: border-box;
}

.google-review-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: var(--ak-teal-action-gradient);
  text-decoration: none;
  padding: 12px 24px 12px 14px;
  border-radius: 50px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 20px -6px rgba(31, 95, 104, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.google-review-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-200%) skewX(-25deg);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.google-review-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 28px -6px rgba(31, 95, 104, 0.55);
}

.google-review-btn:hover::before {
  transform: translateX(400%) skewX(-25deg);
}

.google-review-btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 4px 10px -4px rgba(31, 95, 104, 0.45);
}

.google-icon-bg {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: var(--ak-bg-white); 
  border-radius: 50%;
  margin-right: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.google-icon-bg svg {
  width: 22px;
  height: 22px;
}

.google-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
  position: relative;
  z-index: 2;
  text-align: left;
}

.google-title {
  color: var(--ak-text-inverse);
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 2px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.google-subtitle {
  color: var(--ak-text-inverse);
  font-family: 'Inter', 'Inter Fallback', sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  margin-bottom: 4px;
}

.google-stars {
  display: flex;
  gap: 3px;
}

.google-stars svg {
  width: 12px;
  height: 12px;
  fill: #fbbc04;
  filter: drop-shadow(0px 1px 1px rgba(0,0,0,0.2));
}

/* Karuzela opinii */
.ak-reviews-section {
  width: 100%;
  margin: 20px auto 0;
  padding: 0;
  overflow: hidden; 
  box-sizing: border-box;
}

.ak-reviews-header {
  text-align: left;
  margin-bottom: 25px;
  padding: 0;
  width: 100%;
}

.ak-reviews-header h3 {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-size: clamp(24px, 2.8vw, 32px);
  color: var(--ak-navy-dark);
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.25;
  width: 100%;
  max-width: 100%;
  text-align: left;
  text-wrap: normal;
  -webkit-text-wrap: normal;
}

.ak-reviews-score {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-family: 'Inter', 'Inter Fallback', sans-serif;
  font-size: 16px;
  color: var(--ak-text-gray);
  width: calc(100% - 20px);
  margin: 0 0 0 20px;
  box-sizing: border-box;
}

.ak-reviews-score strong {
  color: var(--ak-navy-dark);
}

.ak-slider-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 15px 0 25px;
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.ak-reviews-track {
  display: flex;
  width: max-content;
  gap: 22px;
}

/* Animacja tylko, gdy main.js dołożył kopię do zapętlenia (bez JS pasek jest statyczny) */
.ak-reviews-track.is-looping {
  animation: scrollReviews 100s linear infinite;
  will-change: transform;
}

.ak-reviews-track:hover {
  animation-play-state: paused;
}

.ak-review-card {
  background: var(--ak-bg-white);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  width: 320px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  flex-shrink: 0; 
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  white-space: normal;
  box-sizing: border-box;
}

.ak-review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(31, 95, 104, 0.12);
  border-color: var(--ak-teal-ink);
}

.ak-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ak-avatar {
  width: 42px;
  height: 42px;
  background: var(--ak-teal-action); 
  color: var(--ak-text-inverse);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
}

.ak-author-name {
  font-family: 'Outfit', 'Outfit Fallback', sans-serif;
  font-weight: 700;
  color: #1f2937;
  font-size: 1.05rem;
}

.ak-stars {
  color: #f59e0b;
  font-size: 1.15rem;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.ak-review-text {
  font-family: 'Inter', 'Inter Fallback', sans-serif;
  font-size: 14.5px;
  color: var(--ak-text-secondary);
  line-height: 1.6;
}

@keyframes scrollReviews {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Responsywność dla mobile */
@media (max-width: 768px) {
  .ak-reviews-wrapper-section {
    padding: 35px 0 45px;
  }

  .ak-reviews-intro-header {
    text-align: center;
    margin-bottom: 20px;
  }

  .ak-reviews-intro-h2 {
    font-size: 21px;
    margin: 0 auto 8px;
    text-align: center;
  }

  .ak-reviews-intro-sub {
    font-size: 14px;
    margin: 0 auto;
    text-align: center;
  }

  .google-review-wrapper {
    justify-content: center;
    padding: 10px 0 25px;
  }

  /* Telefon (2026-10-01): ten sam rozmiar co pozostałe pigułki (~60px). Wcześniej max-width 290px
     zawijało podpis do drugiej linii, a gwiazdki zajmowały trzeci wiersz (80px wysokości).
     Gwiazdki stoją teraz w jednym wierszu z tytułem. */
  .google-review-btn {
    padding: 10px 16px 10px 10px;
    max-width: 370px;
  }

  .google-icon-bg {
    width: 38px;
    height: 38px;
    margin-right: 12px;
  }

  .google-icon-bg svg {
    width: 18px;
    height: 18px;
  }

  .google-text-col {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    column-gap: 8px;
  }

  .google-title {
    order: 1;
    font-size: 15.5px;
    margin-bottom: 2px;
  }

  .google-stars {
    order: 2;
    margin-bottom: 2px;
  }

  .google-subtitle {
    order: 3;
    flex-basis: 100%;
    font-size: 12.5px;
    margin-bottom: 0;
  }

  .google-stars svg {
    width: 11px;
    height: 11px;
  }

  .ak-reviews-header {
    text-align: center;
  }

  .ak-reviews-header h3 {
    font-size: 20px;
    margin: 0 auto 8px;
    text-align: center;
  }

  .ak-reviews-score {
    font-size: 14.5px;
    justify-content: center;
  }

  /* Telefon (2026-10-01): karta ma wysokość swojej treści, a nie najdłuższej opinii
     (w wąskiej karcie krótkie opinie miały ~300 px pustego miejsca) */
  .ak-reviews-track {
    align-items: flex-start;
  }

  .ak-review-card {
    width: 280px;
    padding: 18px;
  }

  .ak-review-text {
    font-size: 14.5px;
  }
}

/* ==========================================================================
   PASEK OPINII — PAUZA I OGRANICZENIE RUCHU (2026-10-01)
   ========================================================================== */
.ak-slider-container.is-paused .ak-reviews-track,
.ak-slider-container.is-offscreen .ak-reviews-track,
.ak-slider-container:focus-within .ak-reviews-track {
  animation-play-state: paused;
}

/* Ograniczony ruch: zwykły rząd przewijany ręcznie (przeciągnięcie, kółko, strzałki) z przyciąganiem do karty */
@media (prefers-reduced-motion: reduce) {
  .ak-slider-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    -webkit-mask-image: none;
    mask-image: none;
    padding-inline: 16px;
  }
  .ak-slider-container:focus-visible {
    outline: 3px solid var(--ak-navy-dark);
    outline-offset: 2px;
  }
  .ak-reviews-track {
    animation: none;
    transform: none;
    will-change: auto;
  }
  .ak-review-card {
    scroll-snap-align: start;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
  }
  .ak-review-card:hover {
    transform: none;
  }
  .ak-review-card[aria-hidden="true"] {
    display: none;
  }
  .ak-reviews-section > .ak-marquee-toggle {
    display: none;
  }
}
