* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --info-color: #06b6d4;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --white: #ffffff;
    --text-color: #374151;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    transition: var(--transition);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-color);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

.btn-info {
    background: var(--info-color);
    color: var(--white);
}

.btn-info:hover {
    background: #0891b2;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 英雄区域 */
.hero {
    margin-top: 80px;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 4rem 20px;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    min-width: 300px;
}

.hero-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 章节标题 */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

/* 客户群体 */
.segments {
    padding: 5rem 20px;
    background: var(--light-color);
}

.segments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.segment-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: var(--transition);
}

.segment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.segment-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.segment-icon i {
    font-size: 2rem;
    color: var(--white);
}

.segment-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.segment-card p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.segment-features {
    list-style: none;
    margin-bottom: 1.5rem;
    text-align: left;
}

.segment-features li {
    padding: 0.5rem 0;
    color: var(--text-color);
}

.segment-features li:before {
    content: "✓";
    color: var(--success-color);
    margin-right: 0.5rem;
}

/* 热门产品 */
.featured-products {
    padding: 5rem 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card h3 {
    padding: 1rem;
    font-size: 1.2rem;
    color: var(--dark-color);
}

.product-card p {
    padding: 0 1rem;
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-card .price {
    display: block;
    padding: 0 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-card .btn {
    margin: 0 1rem 1rem;
    width: calc(100% - 2rem);
}

/* 联系方式 */
.contact {
    padding: 5rem 20px;
    background: var(--light-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.contact-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.contact-card p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.contact-card .btn {
    width: 100%;
}

/* 页脚 */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 3rem 20px 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    opacity: 0.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    padding: 0.5rem 0;
}

.footer-section ul li a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    opacity: 1;
}

.footer-section ul li i {
    margin-right: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* 语言切换器 */
.lang-switcher {
  position: relative;
  cursor: pointer;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: var(--transition);
  user-select: none;
}

.lang-current:hover {
  border-color: var(--primary-color);
  background: #f0f4ff;
}

.lang-current .lang-flag {
  font-size: 1.1rem;
}

.lang-current .lang-name {
  font-weight: 500;
  color: var(--text-color);
}

.lang-current .fa-chevron-down {
  font-size: 0.7rem;
  color: #9ca3af;
  transition: transform 0.2s;
}

.lang-switcher.open .lang-current .fa-chevron-down {
  transform: rotate(180deg);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  list-style: none;
  padding: 6px 0;
  min-width: 160px;
  z-index: 2000;
}

.lang-switcher.open .lang-dropdown {
  display: block;
}

.lang-dropdown li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-color);
  transition: background 0.15s;
}

.lang-dropdown li:hover {
  background: #f0f4ff;
  color: var(--primary-color);
}

.lang-dropdown li .lang-flag {
  font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .segments-grid,
    .products-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}


/* 导航品牌链接 */
.nav-brand a {
    text-decoration: none;
    color: inherit;
}

.nav-brand a:hover h1 {
    opacity: 0.8;
}

/* Google Translate 自定义按钮 */
.gt-switcher {
    position: relative;
    cursor: pointer;
    list-style: none;
}

.gt-switcher .gt-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: var(--transition);
    user-select: none;
    white-space: nowrap;
}

.gt-switcher .gt-current:hover {
    border-color: #10b981;
    background: #ecfdf5;
}

.gt-switcher .gt-current .gt-icon {
    font-size: 1rem;
}

.gt-switcher .gt-current .fa-chevron-down {
    font-size: 0.7rem;
    color: #9ca3af;
    transition: transform 0.2s;
}

.gt-switcher.open .gt-current .fa-chevron-down {
    transform: rotate(180deg);
}

.gt-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    list-style: none;
    padding: 6px 0;
    min-width: 170px;
    max-height: 360px;
    overflow-y: auto;
    z-index: 3000;
}

.gt-switcher.open .gt-dropdown {
    display: block;
}

.gt-dropdown li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-color);
    transition: background 0.15s;
}

.gt-dropdown li:hover {
    background: #ecfdf5;
    color: #10b981;
}

.gt-dropdown li .gt-flag {
    font-size: 1.1rem;
}

.gt-dropdown .gt-reset {
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
    padding-top: 8px;
    color: #9ca3af;
    font-size: 0.8rem;
}

.gt-dropdown .gt-reset:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* 隐藏 Google Translate 顶部横幅 */
.goog-te-banner-frame.skiptranslate { display: none !important; }
.goog-te-gadget { font-size: 0 !important; }
body { top: 0 !important; }
.goog-tooltip { display: none !important; }
.goog-tooltip:hover { display: none !important; }
.goog-text-highlight {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .gt-switcher .gt-current {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    .gt-dropdown {
        right: auto;
        left: 0;
        min-width: 150px;
    }
}

/* ========== Google Translate 翻译状态自动排版 ========== */

/* 全局：翻译激活时微缩字号 */
body.translated-ltr,
body.translated-rtl {
    font-size: 0.93em;
}

/* 防止所有文本溢出 */
body.translated-ltr *,
body.translated-rtl * {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* 导航栏：防止菜单项换行 */
body.translated-ltr .nav-menu,
body.translated-rtl .nav-menu {
    gap: 1.2rem;
}

body.translated-ltr .nav-menu > li > a,
body.translated-rtl .nav-menu > li > a {
    font-size: 0.82rem;
    white-space: nowrap;
}

body.translated-ltr .nav-brand h1,
body.translated-rtl .nav-brand h1 {
    font-size: 1.25rem;
}

/* Hero 区域：标题和正文自适应 */
body.translated-ltr .hero-content h1,
body.translated-rtl .hero-content h1 {
    font-size: 2.2rem;
    line-height: 1.3;
}

body.translated-ltr .hero-content p,
body.translated-rtl .hero-content p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 产品卡片：标题和描述防溢出 */
body.translated-ltr .product-card h3,
body.translated-rtl .product-card h3 {
    font-size: 0.95rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

body.translated-ltr .product-card p,
body.translated-rtl .product-card p {
    font-size: 0.82rem;
    line-height: 1.5;
}

/* Section 标题 */
body.translated-ltr .section-header h2,
body.translated-rtl .section-header h2 {
    font-size: 1.6rem;
}

body.translated-ltr .section-header p,
body.translated-rtl .section-header p {
    font-size: 0.9rem;
}

/* 按钮文字 */
body.translated-ltr .btn,
body.translated-rtl .btn {
    font-size: 0.85rem;
    padding: 10px 18px;
}

/* 表格 */
body.translated-ltr table,
body.translated-rtl table {
    font-size: 0.85rem;
}

body.translated-ltr th,
body.translated-ltr td,
body.translated-rtl th,
body.translated-rtl td {
    padding: 8px 10px;
    word-break: break-word;
}

/* 特性卡片 / 优势卡片 */
body.translated-ltr .feature-card h3,
body.translated-rtl .feature-card h3 {
    font-size: 0.95rem;
}

body.translated-ltr .feature-card p,
body.translated-rtl .feature-card p {
    font-size: 0.82rem;
    line-height: 1.5;
}

/* 页脚 */
body.translated-ltr .footer-section h3,
body.translated-rtl .footer-section h3 {
    font-size: 0.95rem;
}

body.translated-ltr .footer-section p,
body.translated-ltr .footer-section li,
body.translated-rtl .footer-section p,
body.translated-rtl .footer-section li {
    font-size: 0.8rem;
}

/* RTL 阿拉伯语支持 */
body.translated-rtl {
    direction: rtl;
    text-align: right;
}

body.translated-rtl .navbar .container,
body.translated-rtl .nav-menu,
body.translated-rtl .footer-content,
body.translated-rtl .hero .container {
    direction: rtl;
}

body.translated-rtl .nav-menu {
    flex-direction: row-reverse;
}

/* 移动端翻译时进一步缩小 */
@media (max-width: 768px) {
    body.translated-ltr,
    body.translated-rtl {
        font-size: 0.88em;
    }

    body.translated-ltr .hero-content h1,
    body.translated-rtl .hero-content h1 {
        font-size: 1.5rem;
    }

    body.translated-ltr .nav-brand h1,
    body.translated-rtl .nav-brand h1 {
        font-size: 1.1rem;
    }
}
