/* 多語言佈局一致性優化 */

/* 語言特定字體調整 */
[lang="en"] .text-content,
[lang="en"] .card-content,
[lang="en"] .description,
[lang="en"] p {
    font-size: 0.95rem;
    line-height: 1.5;
}

[lang="vi"] .text-content,
[lang="vi"] .card-content,
[lang="vi"] .description,
[lang="vi"] p {
    font-size: 0.95rem;
    line-height: 1.6;
}

[lang="ja"] .text-content,
[lang="ja"] .card-content,
[lang="ja"] .description,
[lang="ja"] p {
    font-size: 0.95rem;
    line-height: 1.6;
}

[lang="ko"] .text-content,
[lang="ko"] .card-content,
[lang="ko"] .description,
[lang="ko"] p {
    font-size: 0.95rem;
    line-height: 1.6;
}

[lang="zh-CN"] .text-content,
[lang="zh-CN"] .card-content,
[lang="zh-CN"] .description,
[lang="zh-CN"] p,
[lang="zh-TW"] .text-content,
[lang="zh-TW"] .card-content,
[lang="zh-TW"] .description,
[lang="zh-TW"] p {
    font-size: 1rem;
    line-height: 1.7;
}

/* Hero區域語言特定高度調整 */
[lang="en"] .hero-section {
    min-height: calc(100vh + 40px); /* 英文較長，需要更多空間 */
}

[lang="vi"] .hero-section,
[lang="ja"] .hero-section,
[lang="ko"] .hero-section {
    min-height: calc(100vh + 20px); /* 中等長度語言 */
}

[lang="zh-CN"] .hero-section,
[lang="zh-TW"] .hero-section {
    min-height: 100vh; /* 中文較簡潔 */
}

/* 固定所有卡片組件的最小高度 */
.advantage-card,
.cert-card,
.env-card,
.about-card {
    min-height: 280px !important;
    display: flex !important;
    flex-direction: column !important;
}

.capability-card {
    min-height: 380px !important;
    display: flex !important;
    flex-direction: column !important;
}

.product-card {
    min-height: 380px !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 確保卡片內容區域彈性佈局 */
.advantage-card .card-content,
.cert-card .card-content,
.env-card .card-content,
.about-card .card-content,
.capability-card .card-content,
.product-card .card-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

/* 固定標題區域高度 */
.advantage-card h3,
.cert-card h3,
.env-card h3,
.about-card h3,
.capability-card h3,
.product-card h3 {
    min-height: 2.5rem !important;
    display: flex !important;
    align-items: center !important;
    margin-bottom: 1rem !important;
}

/* 固定描述區域最小高度 */
.advantage-card p,
.cert-card p,
.env-card p,
.about-card p,
.capability-card .card-description,
.product-card .product-description {
    min-height: 3rem !important;
    margin-bottom: 1rem !important;
}

/* Section 最小高度確保一致性 */
.section {
    min-height: 400px !important;
}

.hero-section {
    min-height: 100vh !important;
}

.contact-section {
    min-height: 600px !important;
}

.about-section,
.services-section,
.products-section {
    min-height: 500px !important;
}

.certifications-section,
.environmental-section,
.vietnam-advantage-section {
    min-height: 450px !important;
}

/* 產品卡片特殊佈局 */
.product-image {
    height: 200px !important;
    overflow: hidden !important;
}

.product-info {
    padding: 1.5rem !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.product-features {
    margin-top: auto !important;
}

/* 圖示區域固定高度 */
.card-icon {
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 1rem !important;
}

/* 語言切換過渡效果 */
[data-text] {
    transition: opacity 0.2s ease, height 0.3s ease !important;
}

/* 防止文字區塊高度跳動 */
.hero-content h1,
.hero-content p,
.section-title,
.section-subtitle {
    transition: all 0.3s ease !important;
}

/* Grid 容器一致性 */
.advantage-grid,
.capabilities-grid,
.certifications-grid,
.environmental-grid,
.products-grid {
    align-items: stretch !important; /* 確保所有項目高度一致 */
}

/* 響應式調整保持一致性 */
@media (max-width: 768px) {
    .advantage-card,
    .cert-card,
    .env-card,
    .about-card,
    .capability-card,
    .product-card {
        min-height: 250px !important;
    }
    
    .section {
        min-height: 300px !important;
    }
}

@media (max-width: 480px) {
    .advantage-card,
    .cert-card,
    .env-card,
    .about-card,
    .capability-card,
    .product-card {
        min-height: 220px !important;
    }
    
    .section {
        min-height: 250px !important;
    }
    
    /* 手機版字體進一步調整 */
    [lang="en"] .text-content,
    [lang="en"] .card-content,
    [lang="en"] p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
    
    [lang="vi"] .text-content,
    [lang="vi"] .card-content,
    [lang="vi"] p,
    [lang="ja"] .text-content,
    [lang="ja"] .card-content,
    [lang="ja"] p,
    [lang="ko"] .text-content,
    [lang="ko"] .card-content,
    [lang="ko"] p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    [lang="zh-CN"] .text-content,
    [lang="zh-CN"] .card-content,
    [lang="zh-CN"] p,
    [lang="zh-TW"] .text-content,
    [lang="zh-TW"] .card-content,
    [lang="zh-TW"] p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
}

