/**
 * Shared i18n styles.
 * Keeps navigation stable across languages and prevents flash-of-default-language.
 */

html[lang="zh-CN"] body,
html[lang="zh-TW"] body {
    font-family: "Inter", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

html[lang="en"] body {
    font-family: "Inter", "Segoe UI", "Helvetica Neue", sans-serif;
}

html.i18n-pending body {
    visibility: hidden;
    opacity: 0;
}

html[data-i18n-ready="true"] body {
    visibility: visible;
    opacity: 1;
}

body {
    transition: opacity 0.18s ease;
}

i[data-lucide="check"],
svg.lucide-check {
    width: 1rem !important;
    height: 1rem !important;
    min-width: 1rem;
    min-height: 1rem;
    flex-shrink: 0;
    stroke-width: 2.25;
}

.site-brand {
    white-space: nowrap;
}

.site-nav-link,
.page-subnav-link,
.sticky-nav-link {
    white-space: nowrap;
    flex: 0 0 auto;
}

html[lang="zh-CN"] .site-nav-link,
html[lang="zh-TW"] .site-nav-link,
html[lang="zh-CN"] .page-subnav-link,
html[lang="zh-TW"] .page-subnav-link {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
}

html[lang="en"] .site-nav-link {
    font-size: 0.82rem;
    line-height: 1.2rem;
    letter-spacing: 0.01em;
}

html[lang="en"] .page-subnav-link,
html[lang="en"] .sticky-nav-link {
    font-size: 0.78rem;
    line-height: 1.2rem;
}

.site-nav-link span,
.page-subnav-link span,
.sticky-nav-link span {
    white-space: nowrap;
}

html[lang="en"] .detail-header-nav {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    gap: 0.75rem;
}

html[lang="en"] .detail-header-nav .site-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: 9.75rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    text-align: center;
    white-space: normal !important;
    line-height: 1.05rem;
    font-size: 0.75rem !important;
}

html[lang="en"] .detail-header-nav .site-nav-link span {
    display: block;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}

html[lang="en"] .detail-header-actions {
    flex: 0 0 auto;
}

html[lang="en"] .detail-header-phone,
html[lang="en"] .detail-header-phone span {
    white-space: nowrap !important;
}

@media (min-width: 1280px) {
    html[lang="en"] .detail-header-nav .site-nav-link {
        max-width: 10rem;
    }
}

@media (min-width: 1280px) {
    .channel-main-nav {
        gap: 1.05rem;
    }

    .channel-main-nav .site-nav-link {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

html[lang="zh-CN"] .channel-main-nav .site-nav-link.active,
html[lang="zh-TW"] .channel-main-nav .site-nav-link.active {
    font-size: 0.98rem;
    line-height: 1.3rem;
}

.page-subnav-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.25rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.page-subnav-row::-webkit-scrollbar {
    display: none;
}

@media (max-width: 1280px) {
    html[lang="en"] .site-nav-link {
        font-size: 0.76rem;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }
}

html[lang="en"] .mega-menu {
    max-width: 100vw;
}

html[lang="en"] .mega-menu-container {
    max-width: 1400px;
}

html[lang="en"] .mega-menu-outer-grid {
    gap: 16px;
}

html[lang="en"] .mega-menu-column-title-link,
html[lang="en"] .mega-menu-subcategory-tag {
    font-size: 0.8rem;
}

html[lang="en"] .mega-menu-item {
    font-size: 0.75rem;
    line-height: 1.4;
}

html[lang="en"] .mega-menu-column,
html[lang="en"] .mega-menu-left-col,
html[lang="en"] .mega-menu-right-col,
html[lang="en"] .mega-menu-subcategory-box,
html[lang="en"] .mega-menu-items-list {
    min-width: 0;
}

html[lang="en"] .mega-menu-fixed-columns {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

html[lang="en"] .mega-menu-column-title-link,
html[lang="en"] .mega-menu-subcategory-tag,
html[lang="en"] .mega-menu-item,
html[lang="en"] .mega-menu-column-title-link span,
html[lang="en"] .mega-menu-subcategory-tag span,
html[lang="en"] .mega-menu-item span {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}

html[lang="en"] .mega-menu-column-title-link {
    align-items: flex-start;
    line-height: 1.35 !important;
}

html[lang="en"] .mega-menu-subcategory-tag {
    display: block !important;
    width: 100% !important;
    padding: 6px 12px !important;
    line-height: 1.35 !important;
    box-sizing: border-box !important;
    font-size: 0.78rem !important;
}

html[lang="en"] .mega-menu-item {
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.45 !important;
    font-size: 0.78rem !important;
}

html[lang="en"] .mega-menu-item:hover {
    transform: none !important;
}

@media (min-width: 1024px) {
    html[lang="en"] .mega-menu-outer-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

html[lang="en"] .btn-primary,
html[lang="en"] button[type="submit"],
html[lang="en"] .business-card-btn,
html[lang="en"] .service-card-btn,
html[lang="en"] .country-card-btn {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

html[lang="en"] .hero-content .btn-primary,
html[lang="en"] .hero-content button:not(.btn-primary) {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

html[lang="en"] .business-card-title,
html[lang="en"] .country-card-title,
html[lang="en"] .service-card-title {
    font-size: 1rem;
    line-height: 1.3;
}

html[lang="en"] .business-card-subtitle,
html[lang="en"] .country-card-subtitle,
html[lang="en"] .service-card-subtitle {
    font-size: 0.75rem;
}

html[lang="en"] .business-card-list li,
html[lang="en"] .country-card-list li,
html[lang="en"] .service-card-list li {
    font-size: 0.8rem;
    line-height: 1.4;
}

html[lang="en"] .trust-card-title {
    font-size: 0.95rem;
}

html[lang="en"] .trust-card-desc,
html[lang="en"] footer,
html[lang="en"] .footer-text,
html[lang="en"] .stat-label,
html[lang="en"] #consultModal label {
    font-size: 0.85rem;
}

html[lang="en"] .section-title {
    font-size: 2rem;
    line-height: 1.3;
}

html[lang="en"] .section-desc {
    font-size: 0.95rem;
    line-height: 1.5;
}

html[lang="en"] .section-tag span {
    font-size: 1.1rem;
}

html[lang="en"] .hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
}

@media (max-width: 768px) {
    html[lang="en"] .hero-content h1 {
        font-size: 2.25rem;
    }
}

html[lang="en"] .hero-content p {
    font-size: 1.1rem;
    line-height: 1.6;
}

html[lang="en"] .floating-btn-tooltip {
    font-size: 0.75rem;
}

html[lang="en"] #consultModal h3 {
    font-size: 1.5rem;
}

html[lang="en"] .tab-btn {
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

.business-card-content,
.country-card-content,
.service-card-content {
    min-height: 320px;
}

.tab-contents {
    min-height: 400px;
}
