/* ===========================
   JaKa Testimonials (Kadence-friendly + Seamless carousel)
   =========================== */

.jaka-tsto{ margin: 0; }

/* Wrapper default: grid (grid/list), carousel si to přepíše na flex */
.jaka-tsto__wrap{
  display: grid;
  gap: 14px;
}

/* Card */
.jaka-tsto__item{
  padding: 12px;
  border-radius: var(--global-border-radius, 16px);

  background: var(--global-palette9, #fff);
  border: 1px solid var(--global-gray-200, rgba(0,0,0,.06));
  box-shadow: var(--global-box-shadow, 0 8px 20px rgba(0,0,0,.06));

  display: flex;
  flex-direction: column; /* aby footer seděl dole i mimo carousel */
}

/* Header */
.jaka-tsto__head{
  display:flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--global-palette4, rgba(0,0,0,.70));
}

.jaka-tsto__stars{
  color: #f5b301;
  letter-spacing: 0.5px;
  font-size: 12px;
  white-space: nowrap;
}

.jaka-tsto__source{
  font-size: 11px;
  opacity: .85;
  white-space: nowrap;
}

/* Quote */
.jaka-tsto__quote{
  margin: 0 0 10px;
  font-style: normal;
  font-size: 13px;     /* ✅ */
  line-height: 1.5;
  color: var(--global-palette3, inherit);

  border-left: 0;
  padding-left: 0;
}

/* Footer meta */
.jaka-tsto__meta{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--global-palette4, rgba(0,0,0,.70));

  margin-top: auto;
  padding-top: 8px;
}

.jaka-tsto__person{
  display:flex;
  align-items:center;
  gap: 8px;
  min-width: 0;
}

.jaka-tsto__avatar{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 700;
  flex: 0 0 auto;

  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.06);
  color: var(--global-palette3, inherit);
}

.jaka-tsto__name{
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--global-palette3, inherit);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 18ch;
}

.jaka-tsto__date{
  font-size: 11px;
  opacity: .75;
  line-height: 1.2;
}

/* Originál jako pill */
.jaka-tsto__src{
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  color: var(--global-palette3, inherit);

  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0,0,0,.05);
  font-size: 12px;
}
.jaka-tsto__src:hover{
  background: rgba(0,0,0,.08);
}

/* Compact */
.jaka-tsto--compact .jaka-tsto__item{ padding: 10px; }
.jaka-tsto--compact .jaka-tsto__avatar{ width: 28px; height: 28px; }
.jaka-tsto--compact .jaka-tsto__name{ max-width: 16ch; }

/* GRID */
.jaka-tsto--grid .jaka-tsto__wrap{
  grid-template-columns: repeat(var(--jaka-tsto-cols, 3), minmax(0, 1fr));
}
@media (max-width: 900px){
  .jaka-tsto--grid .jaka-tsto__wrap{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px){
  .jaka-tsto--grid .jaka-tsto__wrap{ grid-template-columns: 1fr; }
}

/* LIST */
.jaka-tsto--list .jaka-tsto__wrap{ grid-template-columns: 1fr; }

/* CAROUSEL */
.jaka-tsto--carousel{ position: relative; }

/* Edge fade overlay */
.jaka-tsto--carousel::before,
.jaka-tsto--carousel::after{
  content:"";
  position:absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  pointer-events: none;
  z-index: 2;
}
.jaka-tsto--carousel::before{
  left: 0;
  background: linear-gradient(to right, var(--global-palette9,#fff), transparent);
}
.jaka-tsto--carousel::after{
  right: 0;
  background: linear-gradient(to left, var(--global-palette9,#fff), transparent);
}

.jaka-tsto--carousel .jaka-tsto__wrap{
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-padding-left: 6px;

  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative; /* pro hint */
}
.jaka-tsto--carousel .jaka-tsto__wrap::-webkit-scrollbar{ display: none; }

.jaka-tsto--carousel .jaka-tsto__item{
  flex: 0 0 250px;          /* ✅ cca 250px */
  scroll-snap-align: start;
  min-height: 200px;
}

/* Clamp quote v carouselu */
.jaka-tsto--carousel .jaka-tsto__quote{
  display: -webkit-box;
  overflow: hidden;

  line-clamp: 7;            /* ✅ */
  -webkit-line-clamp: 7;    /* ✅ */
  -webkit-box-orient: vertical;
}

/* Nav */
.jaka-tsto__nav{
  position:absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: .85;
  z-index: 3;

  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;

  border-radius: 999px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 6px 14px rgba(0,0,0,.10);

  cursor: pointer;
  user-select: none;
}
.jaka-tsto__nav--prev{ left: 6px; }
.jaka-tsto__nav--next{ right: 6px; }
.jaka-tsto__nav:hover{ transform: translateY(-50%) scale(1.03); }

/* Mobile */
@media (max-width: 768px){
  .jaka-tsto__nav{ display: grid; }

  .jaka-tsto--carousel .jaka-tsto__wrap::after{
    content: "Přejeď pro další →";
    position: absolute;
    right: 10px;
    top: 8px;
    font-size: 11px;
    opacity: .65;
    pointer-events: none;
    z-index: 2;
    background: rgba(255,255,255,.75);
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.06);
  }

  .jaka-tsto--carousel .jaka-tsto__item{
    flex-basis: 88vw;       /* nech kousek další karty vykukovat */
    min-height: 190px;
  }
}
