/* Homepage carousel copy layered over the banner image.
   Shared by pages/index.html and the CMS preview (cms/admin/index.html).
   Sizes use container units so the layout matches at any banner width. */
.slide,
.pv-home-slide.has-copy {
  container-type: inline-size;
  overflow: hidden;
}

.hero-copy {
  position: absolute;
  top: 50%;
  left: 12%;
  max-width: 42%;
  transform: translateY(-52%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1cqw;
  pointer-events: none;
  font-family: "Inter", "Noto Sans", "Noto Sans Thai", "Noto Sans Arabic", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.hero-copy--right {
  left: auto;
  right: 8%;
}

.hero-copy-model {
  font-size: max(18px, 4.6cqw);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, #355b88 0%, #6f8fb4 55%, #b9cbe0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy-name {
  font-size: max(12px, 2.05cqw);
  font-weight: 400;
  line-height: 1.3;
  color: #5f7ea4;
  letter-spacing: 0.02em;
  max-width: 100%;
  overflow-wrap: anywhere; /* Thai/Lao/CJK translations have no spaces to break on */
}

.hero-copy-cta {
  margin-top: 1cqw;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.55em 1.35em;
  font-size: max(11px, 1.15cqw);
  line-height: 1.2;
  color: #6f86a3;
  border: 1.5px solid rgba(111, 134, 163, 0.75);
  border-radius: 0.6em;
  background: rgba(255, 255, 255, 0.18);
  white-space: nowrap;
  pointer-events: auto;
  transition: background 0.2s, color 0.2s;
}

.hero-copy-cta i {
  font-style: normal;
  font-size: 1.15em;
}

a:hover .hero-copy-cta {
  background: rgba(255, 255, 255, 0.5);
  color: #355b88;
}

.hero-copy--light .hero-copy-model {
  background: none;
  color: #fff;
}

.hero-copy--light .hero-copy-name,
.hero-copy--light .hero-copy-cta {
  color: rgba(255, 255, 255, 0.92);
}

.hero-copy--light .hero-copy-cta {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
}

/* Geometry measured from the original banner copy (cms/ai.py layout_from_lines). */
.hero-copy--fit {
  left: var(--x);
  right: auto;
  top: var(--y);
  max-width: var(--w);
  transform: none;
  gap: 0;
}
.hero-copy--fit .hero-copy-model { font-size: var(--m); }
.hero-copy--fit .hero-copy-name { font-size: var(--n); margin-top: var(--ng, 0); }
.hero-copy--fit .hero-copy-cta { font-size: var(--c); margin-top: var(--cg, 0); }

/* Phones: the banner is too short (and sits under the header), so the copy
   becomes a strip below the image instead of an overlay. */
@media (max-width: 768px) {
  .slide .hero-copy {
    position: static;
    transform: none;
    max-width: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 10px;
    padding: 12px 16px 30px;
    background: #eef3f9;
  }
  .hero-container:has(.hero-copy) .hero-dots {
    bottom: 10px;
  }
  .hero-container:has(.hero-copy) .hero-dots span {
    background: rgba(53, 91, 136, 0.25);
  }
  .hero-container:has(.hero-copy) .hero-dots span.on {
    background: #355b88;
  }
  .slide .hero-copy-model {
    font-size: 20px;
  }
  .slide .hero-copy-name {
    flex: 1 1 100%;
    order: 2;
    font-size: 13px;
    color: #5f7ea4;
  }
  .slide .hero-copy--fit .hero-copy-name,
  .slide .hero-copy--fit .hero-copy-cta {
    margin-top: 0;
  }
  .slide .hero-copy-cta {
    order: 1;
    margin: 0 0 0 auto;
    font-size: 12px;
    padding: 5px 12px;
    color: #355b88;
    border-color: rgba(53, 91, 136, 0.5);
  }
  .slide .hero-copy--light .hero-copy-model {
    background: linear-gradient(90deg, #355b88 0%, #6f8fb4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
