/* Landing-page template carousel */
.home-template-showcase {
  --ht-bg: #fbf9f5;
  --ht-card: #fff;
  --ht-ink: #17182b;
  --ht-muted: #747790;
  --ht-line: rgba(39, 37, 78, .10);
  --ht-brand: #6657f5;
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  margin-top: .35rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(39, 37, 78, .09);
}
.home-template-showcase__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.home-template-showcase__title {
  margin: 0;
  color: var(--ht-ink);
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  letter-spacing: -.025em;
}
.home-template-showcase__sub {
  margin: .3rem 0 0;
  color: var(--ht-muted);
  font-size: .76rem;
  line-height: 1.45;
}
.home-template-showcase__all {
  color: var(--ht-brand);
  font-size: .76rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.home-template-showcase__all:hover { text-decoration: underline; }
.home-template-showcase__eyebrow {
  display: inline-block;
  margin-bottom: .45rem;
  color: var(--ht-brand);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.home-template-showcase__tools {
  display: flex;
  align-items: center;
  gap: .9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.home-template-showcase__switch {
  display: inline-flex;
  padding: .2rem;
  border: 1px solid var(--ht-line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(35, 31, 83, .06);
}
.home-template-showcase__tab {
  min-height: 2.1rem;
  padding: .35rem .8rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ht-muted);
  font: inherit;
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
}
.home-template-showcase__tab.is-active {
  color: #fff;
  background: var(--ht-brand);
  box-shadow: 0 5px 15px rgba(102, 87, 245, .22);
}

.home-template-carousel {
  position: relative;
  width: 100%;
  padding: 0 2.7rem;
}
.home-template-carousel__viewport {
  overflow: hidden;
  border-radius: 22px;
  outline: none;
}
.home-template-carousel__viewport:focus-visible {
  box-shadow: 0 0 0 4px rgba(102, 87, 245, .14);
}
.home-template-carousel__track {
  display: flex;
  gap: 1rem;
  will-change: transform;
  transition: transform .42s cubic-bezier(.2,.8,.2,1);
}
.home-template-card {
  flex: 0 0 calc((100% - 3rem) / 4);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ht-line);
  border-radius: 18px;
  background: var(--ht-card);
  box-shadow: 0 9px 28px rgba(37, 34, 86, .07);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.home-template-card:hover {
  transform: translateY(-4px);
  border-color: rgba(102, 87, 245, .25);
  box-shadow: 0 17px 34px rgba(37, 34, 86, .12);
}
.home-template-card__preview {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  background: #f1f1f6;
  border-bottom: 1px solid var(--ht-line);
}
.home-template-card__preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.025);
}
.home-template-card__preview iframe {
  display: block;
  width: 210mm;
  height: 297mm;
  max-width: none;
  border: 0;
  transform: scale(var(--home-preview-scale, .45));
  transform-origin: top left;
  pointer-events: none;
  background: #fff;
}
.home-template-card__body {
  padding: .8rem .8rem .9rem;
}
.home-template-card__title-row {
  display: flex;
  align-items: center;
  gap: .45rem;
}
.home-template-card__title-row h3 {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ht-ink);
  font-size: .83rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-template-card__dot {
  flex: 0 0 auto;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--template-accent, #6657f5);
}
.home-template-card__body p {
  display: -webkit-box;
  min-height: 2.55rem;
  margin: .38rem 0 .7rem;
  overflow: hidden;
  color: var(--ht-muted);
  font-size: .67rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.home-template-card__choose {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: .5rem;
  min-height: 2rem;
  padding: .35rem .55rem;
  border: 1px solid rgba(102,87,245,.16);
  border-radius: 9px;
  background: #f7f6ff;
  color: var(--ht-brand);
  font-size: .67rem;
  font-weight: 800;
  text-decoration: none;
}
.home-template-card__choose:hover {
  background: #eeecff;
}
.home-template-carousel__arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  margin-top: -1.3rem;
  border: 1px solid var(--ht-line);
  border-radius: 50%;
  background: rgba(255,255,255,.97);
  color: var(--ht-ink);
  box-shadow: 0 8px 22px rgba(35,31,83,.12);
  font: inherit;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}
.home-template-carousel__arrow:hover:not(:disabled) {
  border-color: rgba(102,87,245,.3);
  color: var(--ht-brand);
  transform: scale(1.04);
}
.home-template-carousel__arrow:disabled {
  opacity: .32;
  cursor: default;
}
.home-template-carousel__arrow--prev { left: 0; }
.home-template-carousel__arrow--next { right: 0; }
.home-template-carousel__dots {
  display: flex;
  justify-content: center;
  gap: .45rem;
  margin-top: .9rem;
}
.home-template-carousel__dot {
  width: .48rem;
  height: .48rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d9d8e9;
  cursor: pointer;
}
.home-template-carousel__dot.is-active {
  width: .75rem;
  border-radius: 999px;
  background: #ec4f87;
}
.home-template-carousel.is-switching .home-template-card__preview iframe {
  opacity: .55;
}

@media (max-width: 900px) {
  .home-template-showcase__head { align-items: flex-start; }
  .home-template-showcase__tools { justify-content: flex-start; }
  .home-template-carousel { padding-inline: 2.15rem; }
  .home-template-card { flex-basis: calc((100% - 1rem) / 2); }
}
@media (max-width: 520px) {
  .home-template-showcase__head { display: block; }
  .home-template-showcase__tools { margin-top: .75rem; }
  .home-template-carousel { padding-inline: 2rem; }
  .home-template-card { flex-basis: 100%; }
  .home-template-carousel__arrow { width: 2.2rem; height: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .home-template-carousel__track { transition: none; }
  .home-template-card { transition: none; }
}

/* FINAL: keep the template carousel inside the CV promo, on its own full-width bottom row. */
.promo--cv {
  flex-wrap: wrap !important;
  align-content: flex-start;
}
.promo--cv .home-template-showcase {
  order: 3;
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin-top: 2rem;
  align-self: stretch;
}
.promo--cv .home-template-carousel,
.promo--cv .home-template-carousel__viewport {
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .promo--cv .home-template-showcase { margin-top: 1.5rem; }
}
