/* --- KUNLUN GROWTH V3.1 STYLESHEET (Final Polished Version) --- */
/* Font loading moved to HTML <link> for better performance */


/* General Body Styles */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    /* Soft light gray for text */
    margin: 0;
    padding: 0;
    background-color: #0f172a;
    /* Deep midnight blue */
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: rgba(15, 23, 42, 0.8);
    /* Semi-transparent midnight blue */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* For Safari */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    /* Logo to white */
    text-decoration: none;
}

.navbar nav>ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    /* Ensure vertical alignment */
}

/* ... existing styles ... */

.navbar nav>ul>li {
    margin-left: 25px;
    position: relative;
    /* Context for absolute dropdown */
}

/* ... existing styles ... */

/* Language Selector Fix */
.lang-selector {
    position: relative;
    margin-left: 15px;
    height: 100%;
    display: flex;
    align-items: center;
}

.lang-dropdown {
    display: none !important;
    /* Force hide by default */
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 100%;
    right: 0;
    background: #0f172a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    /* Stronger shadow */
    border-radius: 6px;
    list-style: none;
    padding: 10px 0;
    min-width: 160px;
    /* Bit wider */
    z-index: 10000;
    border: 1px solid #334155;
    flex-direction: column;
    /* Force vertical list */
}

.lang-selector:hover .lang-dropdown {
    display: block !important;
    /* Force show on hover */
    opacity: 1;
    visibility: visible;
    animation: fadeIn 0.2s ease-in-out;
}

/* Add fade animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-dropdown li {
    display: block !important;
    width: 100%;
    margin: 0 !important;
}

.lang-dropdown li a {
    display: block;
    width: 100%;
    padding: 12px 20px;
    /* Larger hit area */
    color: #cbd5e1;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: left;
    /* Ensure text aligns left even in RTL context via global override if needed */
    box-sizing: border-box;
    transition: all 0.2s;
}

.navbar nav ul li a {
    text-decoration: none;
    color: #e2e8f0;
    /* Nav link to light gray */
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar nav ul li a:hover {
    color: #d4af37;
    /* Gold for hover */
}

.language-switcher a {
    margin-left: 10px;
    text-decoration: none;
    color: #e2e8f0;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.language-switcher a.active-lang {
    background-color: #d4af37;
    color: #002349;
}

/* Light Navbar Variant (for Blog/White Pages) */
.navbar.navbar-light {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: none;
}

.navbar.navbar-light .logo,
.navbar.navbar-light nav ul li a {
    color: #333333;
}

.navbar.navbar-light nav ul li a:hover {
    color: #d4af37;
}

/* Hero Section */
.hero {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding-top: 80px;
    background-color: #0f172a;
    /* Fallback background color */
}

.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

#heroVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {

    /* Performance: Hide heavy video on mobile to improve LCP */
    #heroVideo {
        display: none;
    }

    .hero {
        background-color: #0f172a;
        /* Fallback */
        background-image: linear-gradient(135deg, #0f172a 0%, #1a2a6c 100%);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.7);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* General Section Styling */
section {
    padding: 80px 0;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #ffffff;
}

/* Solutions / Services Section */
.solutions-section {
    background-color: transparent;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.solution-card {
    background: #1e293b;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.solution-icon {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 20px;
}

.solution-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    color: #ffffff;
}

.solution-card .target-market {
    color: #94a3b8;
    margin-bottom: 20px;
    flex-grow: 1;
}

.solution-card .btn {
    margin-top: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 16px;
    margin: 0 10px;
}

.btn-primary {
    background-color: #d4af37;
    color: #002349;
    border: 2px solid #d4af37;
}

.btn-primary:hover {
    background-color: #c8a02a;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #002349;
    color: #ffffff;
    border: 2px solid #002349;
}

.btn-secondary:hover {
    background-color: #003366;
    border-color: #003366;
    transform: translateY(-2px);
}

/* About Section */
.about-section {
    background-color: #1e293b;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* Photo | Text */
    gap: 50px;
    align-items: center;
}

.about-photo img {
    width: 100%;
    max-width: 350px;
    border-radius: 50%;
    /* Circular photo */
    border: 5px solid #d4af37;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.about-text h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 10px;
}

.about-text p strong {
    color: #d4af37;
}

.philosophy-section {
    margin-top: 60px;
    grid-column: 1 / -1;
}

.philosophy-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.philosophy-points .point h4 {
    color: #d4af37;
    font-size: 1.2rem;
}

.philosophy-points .point p {
    color: #cbd5e1;
}

/* Trust Badge Section */
.trust-badge-section {
    padding: 50px 0;
    background-color: #0f172a;
}

.trust-badge-title {
    text-align: center;
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
}

.trust-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
}

.logo-container {
    width: 150px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.trust-logos img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.trust-logos img:hover {
    opacity: 1;
}

/* Contact Section */
.contact-section {
    background-color: #1e293b;
}

.contact-subtitle {
    text-align: center;
    max-width: 600px;
    margin: -30px auto 50px auto;
    color: #94a3b8;
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.contact-form .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    /* Force Stack, align-items default is stretch which is good */
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    /* More space */
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    /* Force full width */
    padding: 12px 15px;
    border: 1px solid #334155;
    border-radius: 6px;
    box-sizing: border-box;
    /* Include padding in width */
    background-color: #0f172a;
    color: #e2e8f0;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: #d4af37;
    /* Gold focus */
}

.btn-submit {
    width: 100%;
    background-color: #d4af37;
    color: #002349;
    border: none;
    font-size: 18px;
}

.btn-submit:hover {
    background-color: #c8a02a;
}

.form-privacy {
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 10px;
}

.contact-info h3 {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 20px;
}

.contact-info a {
    color: #e2e8f0;
    text-decoration: none;
}

.contact-info a:hover {
    color: #d4af37;
}

/* Footer */
.footer {
    background-color: #001229;
    color: #94a3b8;
    text-align: center;
    padding: 20px 0;
}

/* Slightly brighten the IGI logo to match GIA's visual weight */
#igi-logo {
    filter: brightness(1.2);
}

/* --- Blog Section Styles --- */
.blog-header {
    background-color: #f8f9fa;
    padding: 120px 0 60px;
    /* Top padding to clear navbar */
    text-align: center;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.blog-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 20px;
}

.blog-date {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 10px;
    display: block;
}

.blog-title {
    font-size: 1.2em;
    margin-bottom: 10px;
    line-height: 1.4;
}

.read-more {
    color: #333;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid #ddd;
}

/* --- Single Article Styles --- */
.article-container {
    max-width: 800px;
    /* Limits width for better reading experience */
    margin: 0 auto;
    padding: 40px 20px;
}

.article-content {
    font-size: 1.1em;
    line-height: 1.8;
    color: #333;
}

.article-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 30px 0;
    border-radius: 4px;
}

/* =========================================
   BLOG STYLES (把这段加到 style.css 最底部)
   ========================================= */

/* 博客顶部的白色区域 */
.blog-header {
    background-color: #0f172a;
    /* 深色背景，与主页一致 */
    padding: 120px 0 60px;
    /* 避开顶部导航栏 */
    text-align: center;
    color: #e2e8f0;
}

.blog-header h1 {
    color: #ffffff;
    margin-bottom: 10px;
}

.blog-header p {
    color: #94a3b8;
}

/* 博客列表的网格布局 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* 自动排成多列 */
    gap: 30px;
    margin: 50px auto;
    max-width: 1200px;
    padding: 0 20px;
}

/* 文章卡片样式 - 深色主题 */
.blog-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-content {
    padding: 20px;
    text-align: left;
}

.blog-date {
    font-size: 0.85em;
    color: #94a3b8;
    margin-bottom: 10px;
    display: block;
}

.blog-title {
    font-size: 1.2em;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 700;
}

.blog-content p {
    font-size: 0.95em;
    color: #cbd5e1;
    margin-bottom: 20px;
    line-height: 1.6;
}

.read-more {
    color: #d4af37;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid #64748b;
    padding-bottom: 2px;
    transition: all 0.3s;
}

.read-more:hover {
    border-bottom-color: #d4af37;
    color: #c8a02a;
}

/* =========================================
   SINGLE ARTICLE STYLES (文章详情页样式)
   ========================================= */
/* =========================================
   SINGLE ARTICLE STYLES (文章详情页样式)
   ========================================= */
.article-container {
    max-width: 800px;
    margin: 120px auto 60px;
    /* 顶部留出导航栏空间 */
    padding: 0 20px;
}

.article-category {
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #b21f1f;
    /* Kunlun Red */
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
}

.article-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    color: #0f172a;
    margin-top: 10px;
    margin-bottom: 10px;
    line-height: 1.2;
}

.article-meta {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 30px;
}

.article-content {
    font-family: 'Roboto', sans-serif;
    font-size: 1.15rem;
    /* 稍微大一点，易读 */
    line-height: 1.8;
    color: #334155;
}

.article-content h2 {
    margin-top: 50px;
    margin-bottom: 20px;
    font-size: 1.8em;
    color: #0f172a;
    font-family: 'Montserrat', sans-serif;
}

.article-content h3 {
    margin-top: 40px;
    margin-bottom: 15px;
    font-size: 1.5em;
    color: #0f172a;
    font-family: 'Montserrat', sans-serif;
}

.article-content p {
    margin-bottom: 25px;
}

.article-content ul {
    margin-bottom: 25px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 40px 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Callout / Highlight Box */
.blog-callout {
    background: #f8fafc;
    padding: 25px;
    border-left: 5px solid #b21f1f;
    margin: 40px 0;
    border-radius: 0 8px 8px 0;
    font-size: 1.05rem;
    color: #1e293b;
}

.blog-cta-wrapper {
    margin-top: 60px;
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #e2e8f0;
}

/* =========================================
   WHATSAPP FLOAT BUTTON STYLES
   ========================================= */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    /* 保证在最上层 */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    /* 鼠标放上去变深一点 */
    transform: translateY(-3px);
    /* 稍微上浮 */
    box-shadow: 2px 5px 15px rgba(0, 0, 0, 0.3);
}

/* 手机端适配：稍微变小一点，避免遮挡内容 */
@media screen and (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}



/* Newsletter Section Responsiveness */
@media (max-width: 768px) {
    .newsletter-section h2 {
        font-size: 1.8rem !important;
    }

    .newsletter-section form {
        flex-direction: column;
        align-items: center;
    }

    .newsletter-section input[type="email"] {
        width: 100% !important;
        max-width: 300px;
    }
}

/* =========================================
   MOBILE RESPONSIVENESS FIXES (手机端适配修复)
   ========================================= */
@media (max-width: 768px) {

    /* 1. Navbar: Stack Logo and Menu */
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .navbar nav ul {
        flex-wrap: wrap;
        /* Allow navigation items to wrap */
        justify-content: center;
        gap: 15px;
        padding-bottom: 5px;
    }

    .navbar nav ul li {
        margin-left: 0;
        /* Reset desktop margin */
        margin: 0 5px;
        /* Small side margins */
    }

    .language-switcher {
        position: absolute;
        /* Float to top right corner */
        top: 20px;
        right: 20px;
    }

    /* 2. Hero Typography */
    .hero-title {
        font-size: 2rem;
        /* Reduce from 2.8rem */
        padding: 0 10px;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 10px;
    }

    /* 3. Solutions Grid (Prevent Overflow) */
    .solutions-grid {
        /* Previously minmax(400px, 1fr) which caused scroll */
        grid-template-columns: 1fr !important;
        padding: 0 10px;
    }

    /* 4. About Section (Stack Image & Text) */
    .about-content {
        grid-template-columns: 1fr !important;
        gap: 30px;
        text-align: center;
    }

    .about-photo {
        display: flex;
        justify-content: center;
    }

    /* 5. Contact Section (Stack Form & Info) */
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    .contact-subtitle {
        margin-top: 0;
        margin-bottom: 30px;
    }

    /* 6. Blog Article Fixes */
    .article-title {
        font-size: 1.8rem;
    }

    .article-container {
        margin-top: 160px;
        /* More space for taller mobile navbar */
        padding: 0 15px;
    }
}
/* =========================================
   1. Floating Action Buttons (New Layout)
   ========================================= */
#floating-actions-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: flex;
    gap: 15px; /* Spacing between buttons */
    z-index: 2147483647;
    align-items: center;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    text-decoration: none;
}

.floating-btn:hover {
    transform: scale(1.1);
}

.email-btn {
    background-color: #0F172A; /* Dark Blue */
}

.whatsapp-btn {
    background-color: #25d366; /* WhatsApp Green */
}

.float-icon {
    width: 30px;
    height: 30px;
    fill: white;
}

@media screen and (max-width: 768px) {
    #floating-actions-container {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }

    .floating-btn {
        width: 50px;
        height: 50px;
    }

    .float-icon {
        width: 24px;
        height: 24px;
    }
}
