/*
 * Súbor: css/pages/home.css
 * Obsah: Sekcie vlastné úvodu: typy zákazníkov a príbehy zákazníkov.
 * Použitie: index.html.
 * Zapojenie: Po css/main.css; presné poradie uvádza css/README.md.
 * Závislosti: css/main.css, jeho farebné premenné a triedy komponentu.
 */

.client-types__heading {
  max-width: 780px;
  margin-bottom: 40px;
}

.client-types__heading h2 {
  margin-bottom: 16px;
}

.client-types__intro {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.client-types__layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
  gap: clamp(32px, 5vw, 72px);
}

.client-types__list {
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.client-types__item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-strong);
}

.client-types__item:first-child {
  padding-top: 0;
}

.client-types__item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.client-types__icon {
  flex: 0 0 112px;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  background: transparent;
}

.client-types__icon img {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.client-types__item h3 {
  margin: 0 0 5px;
  font-size: 20px;
  line-height: 1.35;
}

.client-types__item p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.client-types__photo {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius, 12px);
  background: var(--surface);
}

.client-types__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.client-types__photo figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 64px 28px 26px;
  background: linear-gradient(transparent, rgb(36 49 66 / 72%));
  color: #E8E0D4;
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 899px) {
  .client-types__heading {
    margin-bottom: 28px;
  }

  .client-types__layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .client-types__photo {
    aspect-ratio: 1 / 1;
  }

  .client-types__item {
    gap: 14px;
    padding: 17px 0;
  }

  .client-types__icon {
    flex-basis: 84px;
    width: 84px;
    height: 84px;
  }

  .client-types__icon img {
    width: 84px;
    height: 84px;
  }

  .client-types__item h3 {
    font-size: 16px;
  }

  .client-types__item p {
    font-size: 14px;
  }
}

.customer-stories {
  padding: 64px 0;
  color: var(--text);
  background: var(--bg-alt);
}

.customer-stories__heading {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}

.customer-stories__heading .eyebrow {
  color: var(--accent);
}

.customer-stories__heading h2 {
  margin-bottom: 12px;
  color: var(--text);
}

.customer-stories__heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.customer-stories__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  border-radius: var(--radius);
}

.customer-stories__track::-webkit-scrollbar {
  display: none;
}

.customer-story {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - 48px) / 3);
  min-width: 0;
  min-height: 468px;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  border-top: 3px solid var(--accent);
}

.customer-story__copy {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 28px 24px 36px;
}

.customer-story__identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.customer-story__avatar {
  display: grid;
  place-items: center;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
}

.customer-story__author {
  min-width: 0;
}

.customer-story__author .customer-story__name {
  display: block;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
  color: var(--text);
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.customer-story__author p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.customer-story__stars {
  margin: 26px 0 20px;
  color: #f4c43b;
  font-size: 26px;
  letter-spacing: 3px;
  line-height: 1;
  text-align: center;
}

.customer-story blockquote {
  flex: 1;
  margin: 0;
  min-height: 156px;
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.6;
  text-align: center;
}

.customer-story blockquote p {
  margin: 0;
  color: var(--text);
}

.customer-stories__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
}

.customer-stories__arrows {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customer-stories__arrow {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 32px;
}

.customer-stories__arrow:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.customer-stories__arrow:disabled {
  opacity: .3;
  cursor: default;
}

.customer-stories__google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 22px;
  border: 1px solid var(--accent);
  border-radius: var(--control-radius);
  background: var(--accent);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.customer-stories__google:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.customer-stories button:focus-visible,
.customer-stories a:focus-visible,
.customer-stories__track:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (min-width: 768px) and (max-width: 1099px) {
  .customer-story {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 767px) {
  .customer-stories {
    padding: 40px 0;
  }

  .customer-stories__heading {
    margin-bottom: 24px;
  }

  .customer-stories__track {
    gap: 12px;
  }

  .customer-story {
    flex-basis: 100%;
    min-height: 432px;
  }

  .customer-story__copy {
    padding: 24px 20px 32px;
  }

  .customer-story__avatar {
    flex-basis: 56px;
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .customer-story__identity {
    gap: 12px;
    min-height: 56px;
  }

  .customer-story__author .customer-story__name {
    font-size: 18px;
  }

  .customer-story blockquote {
    min-height: 144px;
    font-size: 18px;
  }

  .customer-stories__controls {
    gap: 14px;
  }
}
