﻿:root {
    --primary-color: #0066cc;
    --secondary-color: #004499;
    --accent-color: #00aaff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Han Sans CN', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* 翻译按钮样式 */
.translate-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 102, 204, 0.3);
}

    .translate-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
        text-decoration: none;
        color: white;
    }

/* 隐藏的语言内容 */
.lang-content {
    display: none;
}

    .lang-content.active {
        display: block;
    }

/* 导航栏样式 */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color) !important;
}

/* 导航菜单项样式 */
.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
}

    .navbar-nav .nav-link:hover {
        color: var(--primary-color) !important;
    }

    .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 50%;
        background-color: var(--primary-color);
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }

    .navbar-nav .nav-link:hover::after {
        width: 100%;
    }

/* 下拉菜单样式 */
.dropdown-menu {
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-top: 0;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    min-width: 200px;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    display: block !important;
}

.nav-item.has-submenu:hover .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.dropdown-item {
    color: var(--text-dark);
    padding: 12px 25px;
    font-size: 0.95rem;
    border: none;
    transition: all 0.3s ease;
    background: transparent;
    text-decoration: none;
    display: block;
    border-left: 3px solid transparent;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background: linear-gradient(90deg, var(--bg-light), white);
        color: var(--primary-color);
        text-decoration: none;
        border-left-color: var(--primary-color);
        padding-left: 28px;
    }

/* 主轮播区域 */
/* 桌面端大图：保持宽度100%，固定高度或最小高度，使用 object-fit:cover */
.hero-carousel .hero-bg {
    display: block;
    width: 100%;
    height: 500px; /* 桌面期望高度，可按需调整 */
    object-fit: cover; /* 保持纵横比并裁切溢出部分 */
    object-position: center;
}
/* 默认项（当没有图片时）可设置最小高度以保证布局一致 */
.hero-carousel .default-hero-item .carousel-content {
    min-height: 300px;
}

.carousel-item {
    height: 100vh;
    min-height: 500px;
    max-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.carousel-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
    width: 90%;
    max-width: 800px;
}

    .carousel-content h1 {
        font-size: 3.5rem;
        font-weight: 700;
        margin-bottom: 1.5rem;
        line-height: 1.2;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }

    .carousel-content .subtitle {
        font-size: 1.3rem;
        margin-bottom: 1rem;
        opacity: 0.9;
        font-weight: 300;
    }

    .carousel-content p {
        font-size: 1.2rem;
        margin-bottom: 2.5rem;
        line-height: 1.6;
        opacity: 0.95;
    }

.btn-hero {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    margin: 0 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

    .btn-hero:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
        color: var(--primary-color);
        text-decoration: none;
    }

/* 服务特色 */
.features-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

    .section-title h2 {
        font-size: 2.5rem;
        color: var(--text-dark);
        margin-bottom: 20px;
        font-weight: 700;
    }

    .section-title p {
        font-size: 1.1rem;
        color: var(--text-light);
        max-width: 600px;
        margin: 0 auto;
    }

.feature-card {
    text-align: center;
    padding: 50px 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: none;
}

    .feature-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 102, 204, 0.2);
    }

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 2rem;
    color: white;
}

.feature-card h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 30px;
}

    .footer h5 {
        color: white;
        margin-bottom: 20px;
        font-weight: 600;
    }

    .footer a {
        color: white;
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .footer a:hover {
            color: var(--accent-color);
        }

.footer-bottom {
    border-top: 1px solid #34495e;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    color: #95a5a6;
}

/* 手机专用轮播图片（仅在小屏显示） */
.mobile-carousel-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain; /* 显示整张图片，不裁切 */
    background-color: #000;
}

/* 移动端底部导航样式（默认隐藏，使用 d-md-none 控制显示） */
.mobile-bottom-nav {
    display: none;
    height: 56px;
    align-items: center;
    justify-content: space-around;
    gap: 6px;
    padding: 6px 12px;
    z-index: 1100;
}

    .mobile-bottom-nav a {
        text-decoration: none;
        color: #333;
        font-size: 14px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

        .mobile-bottom-nav a i {
            font-size: 18px;
        }

/* 响应式设计 */
/* 移动端轮播覆盖样式（仅在小屏生效） */
@media (max-width: 768px) {
    .hero-carousel,
    .carousel-inner,
    .carousel-item {
        height: auto !important;
        min-height: 0 !important;
    }

    .carousel-item {
        background-size: cover !important;
        background-position: center center !important;
    }

    /* 手机端使用 img 时尽量 cover，避免出现占位空白 */
    .mobile-carousel-img {
        display: block;
        width: 100%;
        height: auto;
        object-fit: cover !important;
        max-height: 60vh;
    }

    /* 将文字 overlay 放底部，避免遮挡图片主体 */
    .carousel-content {
        position: absolute;
        bottom: 12px;
        left: 12px;
        right: 12px;
        transform: none;
        color: #111;
        margin: 0;
        background: rgba(255,255,255,0.88);
        padding: 10px;
        border-radius: 8px;
        z-index: 3;
    }

    /* 缩小左右按钮尺寸，避免遮挡并节省空间 */
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 44px;
        height: 44px;
        background-size: 44px 44px;
        border-radius: 8px;
    }

    /* 指示点靠下显示，不被 overlay 遮挡 */
    .carousel-indicators {
        bottom: 6px;
    }
    /* 隐藏桌面页脚，显示移动底部导航 */
    .footer {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: flex !important;
    }

    /* 确保导航在最上层，避免被轮播覆盖 */
    .navbar {
        z-index: 2000;
    }

    /* 将轮播置于导航之下（如有需要可调整） */
    .hero-carousel {
        z-index: 1;
    }

    /* 让折叠图标在没有 navbar-light/dark 时也可见 */
    .navbar-toggler {
        border: none;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(0,0,0,0.6)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    }

    /* --- 修复移动端折叠菜单样式 --- */
    /* 折叠展开时作为独立面板显示（避免菜单项被绝对定位到页面其它位置） */
    .navbar .collapse.show {
        position: absolute;
        top: 72px; /* 根据 navbar 高度微调 */
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        padding: 8px 0 16px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.08);
        z-index: 1900;
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
    }

    /* 取消子菜单的绝对定位，让它在折叠面板内自然流布局 */
    .navbar-nav .dropdown-menu {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        background: transparent !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }

    /* 子项改为与父项同一列显示，并适当内缩 */
    .navbar-nav .dropdown-item {
        padding: 12px 1rem !important;
        border-left: none !important;
        color: var(--text-dark) !important;
    }

    /* 父菜单项样式优化（更大触控区） */
    .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar-nav .nav-link {
        padding: 12px 16px;
        display: block;
        width: 100%;
        color: var(--text-dark) !important;
        background: transparent;
    }

    /* 保证折叠面板内容可滚动（防止菜单过长时留空白） */
    .navbar-collapse {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-left: 8px;
        padding-right: 8px;
    }

    /* 小屏时去掉 hover 显示子菜单的规则干扰，使用上面静态布局 */
    .nav-item.has-submenu:hover .dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }


    .hero-carousel .hero-bg {
        display: none;
    }

    .hero-carousel .mobile-carousel-img {
        height: auto;
        object-fit: contain;
    }
}

/* 动画效果 */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

    .fade-up.animate {
        opacity: 1;
        transform: translateY(0);
    }

.list-unstyled i {
    margin-top: 5px;
}
