/* Home-page layout refinement for compact and wide mobile screens. */
.home-screen {
  --home-section-gutter: clamp(10px, 3.4vw, 15px);
}

/* Fill the previously empty top-left area with the product brand. */
.home-screen .home-hero::before {
  content: "HX GLOBAL PAY";
  position: absolute;
  z-index: 3;
  top: clamp(18px, 5vw, 23px);
  left: var(--app-inline-gutter);
  color: #1683ff;
  font-size: clamp(13px, 3.6vw, 16px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .08em;
  text-shadow: 0 3px 12px rgba(22, 131, 255, .14);
}

/* Use more of the main action card instead of leaving wide empty sides. */
.home-screen .home-exchange-card {
  min-height: 0;
  margin-right: var(--home-section-gutter);
  margin-left: var(--home-section-gutter);
  padding: 18px clamp(10px, 3.2vw, 16px) 15px;
}

.home-screen .home-exchange-card h2 {
  font-size: clamp(18px, 4.8vw, 21px);
  line-height: 1.35;
}

.home-screen .home-exchange-card > p {
  font-size: clamp(12px, 3.2vw, 14px);
  line-height: 1.5;
}

.home-screen .home-flow,
html[lang="en"] .home-screen .home-flow,
html[lang="vi"] .home-screen .home-flow {
  grid-template-columns: minmax(0, 1fr) clamp(34px, 9.5vw, 46px) minmax(0, 1fr);
  min-height: 88px;
  height: auto;
  margin: 14px 0 0;
}

.home-screen .home-flow .coin-caption {
  min-width: 0;
  min-height: 86px;
  padding: 7px 4px;
  justify-content: center;
  border: 1px solid rgba(0, 190, 111, .12);
  border-radius: 16px;
  background: linear-gradient(180deg, #f7fffc 0%, #effbf6 100%);
}

.home-screen .home-flow .coin-caption:last-child {
  border-color: rgba(16, 168, 132, .13);
  background: linear-gradient(180deg, #f6fffc 0%, #edfaf6 100%);
}

.home-screen .home-flow .coin-caption > svg {
  width: clamp(50px, 14vw, 58px);
  height: clamp(50px, 14vw, 58px);
}

.home-screen .home-flow .coin-caption span,
html[lang="en"] .home-screen .home-flow .coin-caption span,
html[lang="vi"] .home-screen .home-flow .coin-caption span {
  max-width: 100%;
  min-height: 0;
  margin-top: 4px;
  font-size: clamp(10.5px, 2.9vw, 12px);
  line-height: 1.35;
  white-space: normal;
}

.home-screen .home-flow__arrow {
  align-self: center;
  padding-top: 0;
  font-size: clamp(30px, 8.5vw, 38px);
  line-height: 1;
}

.home-screen .home-exchange-card .green-button,
html[lang="en"] .home-screen .home-exchange-card .green-button,
html[lang="vi"] .home-screen .home-exchange-card .green-button {
  width: 100%;
  min-height: 48px;
  margin: 13px 0 0;
  font-size: clamp(14px, 4vw, 16px);
}

/* Make feature descriptions readable without losing the four-column rhythm. */
.home-screen .home-features,
html[lang="en"] .home-screen .home-features,
html[lang="vi"] .home-screen .home-features {
  min-height: 0;
  margin-right: var(--home-section-gutter);
  margin-left: var(--home-section-gutter);
  padding: 15px 5px 14px;
  align-items: start;
  column-gap: 2px;
}

.home-screen .home-feature,
html[lang="en"] .home-screen .home-feature,
html[lang="vi"] .home-screen .home-feature {
  min-width: 0;
  padding: 0 4px;
}

.home-screen .home-feature .icon-bubble.medium,
html[lang="en"] .home-screen .home-feature .icon-bubble.medium,
html[lang="vi"] .home-screen .home-feature .icon-bubble.medium {
  width: clamp(40px, 10.8vw, 46px);
  height: clamp(40px, 10.8vw, 46px);
}

.home-screen .home-feature strong,
html[lang="en"] .home-screen .home-feature strong,
html[lang="vi"] .home-screen .home-feature strong {
  display: flex;
  min-height: 38px;
  margin-top: 6px;
  align-items: center;
  justify-content: center;
  color: #1c2a3d;
  font-size: clamp(11px, 3vw, 13px);
  font-weight: 700;
  line-height: 1.35;
}

.home-screen .home-feature small,
html[lang="en"] .home-screen .home-feature small,
html[lang="vi"] .home-screen .home-feature small {
  min-height: 48px;
  margin-top: 2px;
  padding: 0;
  color: #6f7e91;
  font-size: clamp(9.5px, 2.55vw, 11px);
  line-height: 1.45;
}

@media (max-width: 374px) {
  .home-screen .home-exchange-card,
  .home-screen .home-features {
    margin-right: 10px;
    margin-left: 10px;
  }

  .home-screen .home-feature {
    padding-right: 2px;
    padding-left: 2px;
  }

  .home-screen .home-feature small,
  html[lang="en"] .home-screen .home-feature small,
  html[lang="vi"] .home-screen .home-feature small {
    font-size: clamp(9px, 2.7vw, 10px);
  }
}
