.language-selector {
  position: relative;
  z-index: 1004;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand {
  min-width: 290px;
  max-width: 290px;
}

.brand-logo,
.brand img {
  width: 280px;
  max-height: 72px;
}

.language-quickbar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(201, 166, 58, 0.34);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.language-quick-option {
  width: 31px;
  height: 27px;
  display: grid;
  place-items: center;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.language-quick-option:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.07);
}

.language-quick-option.is-active {
  opacity: 1;
  border-color: rgba(224, 196, 106, 0.92);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(224, 196, 106, 0.2);
}

.language-quick-option:focus-visible {
  outline: 2px solid rgba(224, 196, 106, 0.95);
  outline-offset: 2px;
}

.language-quick-flag {
  width: 21px;
  height: 15px;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html[lang="pt-BR"] {
  --fx-mobile-services-label: "SERVIÇOS";
  --fx-mobile-services-title: "Soluções Internacionais";
  --fx-mobile-services-copy: "Relatórios, crédito, compliance e suporte para negócios globais.";
  --fx-mobile-home-services-copy: "Relatórios internacionais como base para decisões comerciais mais seguras.";
  --fx-mobile-learn-more: "Saiba mais";
}

html[lang="en"] {
  --fx-mobile-services-label: "SERVICES";
  --fx-mobile-services-title: "International Solutions";
  --fx-mobile-services-copy: "Reports, credit, compliance and support for global business.";
  --fx-mobile-home-services-copy: "International reports as the basis for safer business decisions.";
  --fx-mobile-learn-more: "Learn more";
}

html[lang="es"] {
  --fx-mobile-services-label: "SERVICIOS";
  --fx-mobile-services-title: "Soluciones Internacionales";
  --fx-mobile-services-copy: "Informes, crédito, compliance y apoyo para negocios globales.";
  --fx-mobile-home-services-copy: "Informes internacionales como base para decisiones comerciales más seguras.";
  --fx-mobile-learn-more: "Más información";
}

html[lang="ru"] {
  --fx-mobile-services-label: "УСЛУГИ";
  --fx-mobile-services-title: "Международные решения";
  --fx-mobile-services-copy: "Отчеты, кредитный анализ, комплаенс и поддержка международного бизнеса.";
  --fx-mobile-home-services-copy: "Международные отчеты как основа для более безопасных деловых решений.";
  --fx-mobile-learn-more: "Подробнее";
}

html[lang="zh-CN"] {
  --fx-mobile-services-label: "服务";
  --fx-mobile-services-title: "国际解决方案";
  --fx-mobile-services-copy: "为全球业务提供报告、信用分析、合规与支持。";
  --fx-mobile-home-services-copy: "以国际报告为依据，做出更安全的商业决策。";
  --fx-mobile-learn-more: "了解更多";
}

@media (max-width: 1180px) {
  .nav { gap: 14px; }
  .menu { gap: 20px; }
  .brand {
    min-width: 240px;
    max-width: 240px;
  }
  .brand-logo,
  .brand img {
    width: 230px;
    max-height: 60px;
  }
}

@media (max-width: 980px) {
  .brand {
    min-width: 0;
    max-width: 230px;
  }
  .brand-logo,
  .brand img {
    width: 220px;
    max-height: 58px;
  }
  .language-selector { margin-left: auto; }
  .mobile-btn { margin-left: 0; }
}

@media (max-width: 768px) {
  .brand { max-width: min(215px, 62vw); }
  .brand-logo,
  .brand img {
    width: min(205px, 60vw);
    max-height: 54px;
  }
  .hero-services .eyebrow::after { content: var(--fx-mobile-services-label) !important; }
  .hero-services h1::after { content: var(--fx-mobile-services-title) !important; }
  .hero-services p::after { content: var(--fx-mobile-services-copy) !important; }
  #servicos .section-head p::after { content: var(--fx-mobile-home-services-copy) !important; }
  .services-grid .service-card-content::after { content: var(--fx-mobile-learn-more) !important; }
}

@media (max-width: 500px) {
  .fx-header .nav {
    height: auto;
    min-height: 112px;
    flex-wrap: wrap;
    align-content: center;
    column-gap: 10px;
    row-gap: 6px;
    padding: 8px 0 7px;
  }
  .brand { order: 1; }
  .mobile-btn { order: 2; }
  .language-selector {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
    margin: 0;
  }
  .menu.open { top: 112px; }
  .hero,
  .blog-hero,
  .article-hero,
  .privacy-hero { padding-top: 146px !important; }
  .hero-home { padding-top: 144px !important; }
  .hero-services { padding-top: 138px !important; }
}

@media (max-width: 420px) {
  .nav { gap: 7px; }
  .brand { max-width: min(180px, 44vw); }
  .brand-logo,
  .brand img {
    width: min(180px, 44vw);
    max-height: 46px;
  }
  .language-quickbar {
    gap: 2px;
    padding: 3px;
  }
  .language-quick-option {
    width: 28px;
    height: 26px;
    padding: 4px;
  }
  .language-quick-flag {
    width: 20px;
    height: 14px;
  }
  .mobile-btn {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .language-quick-option { transition: none; }
}
