
:root {
  --langs-accent: #f08319;
  --langs-text: #3f3f3f;
  --langs-subtext: #747474;
  --langs-card-bg: #f8f8f8;
  --langs-dot: #e5e5e5;
  --langs-shadow:
    0 179px 50px rgba(219, 219, 219, 0.01),
    0 115px 46px rgba(219, 219, 219, 0.05),
    0 65px 39px rgba(219, 219, 219, 0.18),
    0 29px 29px rgba(219, 219, 219, 0.3),
    0 7px 16px rgba(219, 219, 219, 0.34);
}

.langs {
  display: flex; 
  justify-content: center;
  width: 100%;
  max-width: 956px;
  margin: 0 auto;
  padding: 0;
}

.langs__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  min-height: 338px;
  padding: 24px;
  background: #fff;
  border-radius: 32px;
  box-shadow: var(--langs-shadow);
  box-sizing: border-box;
}

.langs__head,
.langs__row,
.langs__controls {
  width: 100%;
  max-width: 908px;
}

.langs__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.langs__title {
  margin: 0;
  font-family: "Mulish", sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--langs-text);
}

.langs__title .accent {
  color: var(--langs-accent);
}

.langs__subtitle {
  margin: 0;
  font-family: "Mulish", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--langs-subtext);
}

.langs__row {
  position: relative;
}

.langs__swiper {
  position: relative;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.langs__swiper .swiper-wrapper {
  align-items: center;
  min-height: 110px;
}

.langs__swiper .swiper-slide {
  width: 96px !important;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
  box-sizing: border-box;
}

.lang-card__link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  width: 100%;
}

.lang-card__link:focus-visible {
  outline: 2px solid rgba(240, 131, 25, 0.28);
  outline-offset: 4px;
  border-radius: 20px;
}

.lang-card {
  --card-width: 82px;
  --card-height: 62px;
  --flag-size: 32px;
  --label-size: 8px;
  --label-line: 8px;
  --card-gap: 5px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: var(--card-width);
  height: var(--card-height);
  padding: 12px;
  gap: var(--card-gap);
  background: var(--langs-card-bg);
  border-radius: 16px;
  box-sizing: border-box;
  transform-origin: center;
  transform: scale(0.9);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    opacity 0.3s ease;
}

.lang-card__flag {
  width: var(--flag-size);
  height: var(--flag-size);
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  transition:
    width 0.3s ease,
    height 0.3s ease,
    border-radius 0.3s ease;
}

.langs__swiper .swiper-slide-prev .lang-card__flag,
.langs__swiper .swiper-slide-active .lang-card__flag,
.langs__swiper .swiper-slide-next .lang-card__flag {
  border-radius: 8px;
}

.lang-card__label {
  max-width: 100%;
  display: block;
  min-height: var(--label-line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Spartan", "Mulish", sans-serif;
  font-size: var(--label-size);
  font-weight: 500;
  line-height: var(--label-line);
  text-align: center;
  color: var(--langs-subtext);
  transition:
    font-size 0.3s ease,
    line-height 0.3s ease,
    color 0.3s ease;
}

.langs__swiper .swiper-slide-prev .lang-card,
.langs__swiper .swiper-slide-next .lang-card {
  --flag-size: 36px;
  --label-size: 9px;
  --label-line: 9px;
  --card-gap: 7px;
  transform: scale(0.98);
}

.langs__swiper .swiper-slide-active .lang-card {
  --flag-size: 42px;
  --label-size: 10px;
  --label-line: 10px;
  --card-gap: 8px;
  transform: scale(1.06);
  box-shadow: 0 10px 28px rgba(63, 63, 63, 0.08);
}

.langs__fade {
  position: absolute;
  top: 0;
  width: 90px;
  height: 110px;
  z-index: 3;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.langs__fade--left {
  left: 0;
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.langs__fade--right {
  right: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #fff 100%);
}

.langs__row.is-at-start .langs__fade--left {
  opacity: 0.15;
}

.langs__row.is-at-end .langs__fade--right {
  opacity: 0.15;
}

.langs__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 53px;
  min-height: 32px;
}

.langs__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 4px;
  background: transparent;
  border: 0;
  color: var(--langs-subtext);
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.langs__arrow:hover {
  color: var(--langs-accent);
}

.langs__arrow:focus-visible {
  outline: 2px solid rgba(240, 131, 25, 0.28);
  outline-offset: 2px;
  border-radius: 999px;
}

.langs__arrow svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.langs__arrow.is-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.langs__dots {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 8px;
  overflow: hidden;
  user-select: none;
}

.langs__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--langs-dot);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.langs__dot.is-active {
  background: var(--langs-accent);
}

.langs__cta {
  display: flex;
  justify-content: center;
  width: 100%;
}

.langs__btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-width: 261px;
  min-height: 48px;
  padding: 16px 32px;
  border-radius: 32px;
  background: var(--langs-accent);
  font-family: "Mulish", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.langs__btn:hover {
  background: #dd7513;
  transform: translateY(-1px);
}

.langs__btn:focus-visible {
  outline: 2px solid rgba(240, 131, 25, 0.28);
  outline-offset: 3px;
}

@media (max-width: 1024px) {
  .langs__box {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .langs__box {
    padding: 20px;
    gap: 20px;
    border-radius: 28px;
  }

  .langs__title {
    font-size: 22px;
  }

  .langs__subtitle {
    font-size: 14.5px;
  }

  .langs__controls {
    gap: 24px;
  }

  .langs__dots {
    gap: 12px;
  }

  .langs__swiper .swiper-slide-active .lang-card {
    --flag-size: 40px;
    transform: scale(1.03);
  }
}

@media (max-width: 480px) {
  .langs__box {
    padding: 18px 16px;
    gap: 18px;
    border-radius: 24px;
  }

  .langs__subtitle {
    font-size: 14px;
    line-height: 1.45;
  }

  .langs__fade {
    width: 48px;
  }

  .langs__controls {
    gap: 12px;
  }

  .langs__dots {
    gap: 10px;
  }

  .langs__btn {
    min-width: 100%;
  }

  .lang-card {
    --card-width: 74px;
    --card-height: 58px;
    --label-size: 8px;
    --label-line: 8px;
    transform: scale(0.94);
  }

  .langs__swiper .swiper-slide-prev .lang-card,
  .langs__swiper .swiper-slide-next .lang-card {
    --flag-size: 34px;
    --label-size: 8px;
    --label-line: 8px;
    transform: scale(0.98);
  }

  .langs__swiper .swiper-slide-active .lang-card {
    --flag-size: 36px;
    --label-size: 9px;
    --label-line: 9px;
    transform: scale(1.02);
  }
}

/* For languages whose flag is intentionally omitted. */
.lang-card__neutral {
  display: grid;
  place-items: center;
  border: 2px solid #f08319;
  background: #fff7ee;
  color: #5f5f5f;
  font-family: "Mulish", sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1;
}