/* ==========================================================================
   JOC landing page overrides on top of Porto "Business Consulting 3"
   ========================================================================== */

/* Hide content until i18n.js has rendered the resolved language.
   The class is only set by JS, so no-JS visitors still see the page. */
html.i18n-loading .body {
  visibility: hidden;
}

/* Per-language font stacks: Poppins lacks Vietnamese and Japanese glyphs. */
html {
  --joc-font: "Poppins", Arial, sans-serif;
}

html[lang="vi"] {
  --joc-font: "Be Vietnam Pro", Arial, sans-serif;
}

html[lang="ja"] {
  --joc-font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

body,
body *:not(i) {
  font-family: var(--joc-font) !important;
}

/* Japanese reads better without the theme's negative letter-spacing. */
html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] h3,
html[lang="ja"] h4 {
  letter-spacing: 0 !important;
}

html[lang="ja"] .custom-highlight-text-1 {
  word-break: keep-all;
}

/* Show menu labels exactly as translated: the theme otherwise forces
   uppercase/Title Case, which is wrong for Vietnamese. */
#header .header-nav-main nav > ul > li > a {
  text-transform: none !important;
}

/* Text logo (replace with the official JOC logo image when available) */
.joc-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none !important;
}

.joc-logo-mark {
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--primary);
}

.joc-logo-name {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dark);
}

.joc-logo-light .joc-logo-name {
  color: #fff;
}

/* Language switcher */
.joc-lang-switcher {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.joc-lang-switcher button {
  border: 0;
  background: transparent;
  color: var(--dark);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.joc-lang-switcher button + button {
  border-left: 1px solid rgba(0, 0, 0, 0.15);
}

.joc-lang-switcher button:hover {
  color: var(--primary);
}

.joc-lang-switcher button.active {
  background: var(--primary);
  color: #fff;
}

/* Hero headline is the real <h1>; the big background word is decorative. */
.joc-hero-title {
  font-size: 1.6rem;
  line-height: 1.45;
}

/* Business cards: equal heights, readable copy */
.joc-business-card {
  height: 100%;
}

.joc-business-card .card-img-top img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.joc-business-number {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--primary);
}

/* Ecosystem brand list */
.joc-brand-name {
  display: block;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  margin-bottom: 0.15rem;
}

/* Contact form select in the dark section */
.joc-contact-form .form-select {
  background-color: transparent;
  color: #fff;
}

.joc-contact-form .form-select option {
  color: #212529;
}

.joc-contact-form .invalid-feedback {
  color: #ff9b85;
}

/* Bracketed values awaiting confirmation from JOC */
.joc-placeholder {
  opacity: 0.75;
  font-style: italic;
}
