/* Homepage stats carousel — "Pakistanis in Finland in numbers" */
.hs-carousel-wrap {
  margin: 0 0 2rem;
  padding: 1.25rem 1.25rem 1.5rem;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
.hs-carousel-head {
  margin-bottom: 1rem;
}
.hs-carousel-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
}
.hs-carousel-subtitle {
  color: #334155;
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.hs-carousel {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
.hs-carousel::before {
  content: '';
  display: block;
  height: 5px;
  width: 100%;
  background: linear-gradient(90deg, #1e3a8a 0%, #059669 100%);
}

.hs-carousel-track {
  display: flex;
  width: 100%;
  align-items: flex-start;
  transition: transform 0.45s ease, height 0.35s ease;
  will-change: transform;
}
.hs-carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
}

.hs-slide-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 1.5rem 3.25rem;
}
.hs-slide-text {
  min-width: 0;
}
@media (min-width: 768px) {
  .hs-slide-card {
    grid-template-columns: minmax(200px, 260px) 1fr;
    align-items: center;
    padding: 2rem 3.5rem;
  }
}

.hs-slide-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 0.25rem;
}
.hs-slide-subtitle {
  color: #334155;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0 0 1rem;
}
.hs-slide-note {
  margin: 0 0 0.9rem;
  padding: 0.5rem 0.7rem;
  background: rgba(148, 163, 184, 0.12);
  border-left: 3px solid #1e3a8a;
  border-radius: 8px;
  color: #334155;
  font-size: 0.72rem;
  line-height: 1.5;
  font-weight: 600;
}
.hs-slide-total {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.hs-slide-total-num {
  font-size: 2.25rem;
  font-weight: 900;
  background: linear-gradient(135deg, #1e3a8a 0%, #059669 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hs-slide-total-label {
  font-size: 0.8rem;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.hs-slide-source {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
}

.hs-slide-chart {
  position: relative;
  height: 240px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.hs-carousel-slide--occupations-grouped .hs-slide-card {
  align-items: stretch;
}
.hs-carousel-slide--occupations-grouped .hs-slide-chart {
  height: 430px;
}
.hs-carousel-slide--students .hs-slide-chart {
  height: 420px;
}
@media (max-width: 767px) {
  .hs-carousel-wrap {
    padding: 1rem 0.75rem 1.1rem;
    border-radius: 14px;
  }
  .hs-carousel-head {
    margin-bottom: 0.75rem;
  }
  .hs-carousel-title {
    font-size: clamp(1.15rem, 5vw, 1.5rem);
  }
  .hs-carousel-subtitle {
    font-size: 0.82rem;
    line-height: 1.4;
  }
  .hs-slide-card {
    gap: 0.9rem;
    padding: 1.25rem 2.7rem;
  }
  .hs-slide-title {
    font-size: clamp(1rem, 4.5vw, 1.15rem);
  }
  .hs-slide-subtitle {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.7rem;
  }
  .hs-slide-note {
    font-size: 0.68rem;
    line-height: 1.4;
    margin-bottom: 0.7rem;
  }
  .hs-slide-total-num {
    font-size: clamp(1.8rem, 9vw, 2.25rem);
  }
  .hs-slide-total-label {
    font-size: 0.7rem;
  }
  .hs-slide-source {
    font-size: 0.68rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .hs-slide-chart {
    height: clamp(210px, 70vw, 300px);
  }
  .hs-carousel-slide--occupations-grouped .hs-slide-chart {
    height: clamp(430px, 125vw, 560px);
  }
  .hs-carousel-slide--students .hs-slide-chart {
    height: clamp(360px, 105vw, 520px);
  }
}
.hs-slide-chart-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
}
.hs-slide-chart-canvas canvas {
  width: 100% !important;
  height: 100% !important;
}
.hs-age-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.hs-age-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: #475569;
  font-weight: 600;
}
.hs-age-legend-swatch {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  display: inline-block;
}
.hs-nested-hint {
  text-align: center;
  font-size: 0.68rem;
  color: #94a3b8;
  margin: 0.15rem 0 0;
}

.hs-carousel-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.65rem;
  line-height: 1;
  font-weight: 700;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.hs-carousel-nav span { display: block; margin-top: -0.12rem; }
.hs-carousel-nav:hover { background: #fff; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22); }
.hs-carousel-nav:active { transform: translateY(-50%) scale(0.96); }
.hs-carousel-nav:focus-visible { outline: 2px solid #0e7a3e; outline-offset: 2px; }
.hs-carousel-nav--prev { left: 0.65rem; }
.hs-carousel-nav--next { right: 0.65rem; }
@media (max-width: 640px) {
  .hs-carousel-nav { width: 2.15rem; height: 2.15rem; font-size: 1.45rem; }
  .hs-carousel-nav--prev { left: 0.4rem; }
  .hs-carousel-nav--next { right: 0.4rem; }
}

.hs-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 0 1rem;
}
.hs-carousel-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.2);
  cursor: pointer;
  padding: 0;
}
.hs-carousel-dot[aria-current="true"] {
  background: #0e7a3e;
  width: 1.4rem;
  border-radius: 999px;
}
