@charset "utf-8";

/* Global Reset & Base */
body, html {
    font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #333;
    background-color: #fff;
    scroll-behavior: smooth;

}

a { text-decoration: none; transition: all .3s; }
a:hover { color: #1E9FFF; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: transparent; /* 默认透明 */
    /* box-shadow: 0 2px 10px rgba(0,0,0,0.05); */
    z-index: 1000;
    transition: all .3s;
}

/* 滚动后显示的样式类 */
.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .logo {
    height: 70px;
    line-height: 70px;
    font-size: 24px;
    font-weight: bold;
    color: #fff; /* 默认白色 */
    float: left;
    display: flex; /* 使用Flex布局实现垂直居中 */
    align-items: center;
}

/* 滚动后Logo文字变蓝（或保持白色，取决于设计，这里按原逻辑变色） */
.header.scrolled .logo {
    color: #1a1a1a;
}

.header .logo a {
    color: inherit; /* 继承父级颜色 */
    display: flex;
    align-items: center;
}

.header .logo img { 
    height: 40px; 
    margin-right: 10px; /* 图片与文字间距 */
}

.header .nav {
    float: right;
    height: 70px;
    /* line-height: 70px;  移除父级行高，改用flex布局垂直居中 */
    display: flex;
    align-items: center;
}

.header .nav ul {
    display: flex;
    align-items: center;
}

.header .nav li {
    display: inline-block;
    margin: 0 5px; /* 进一步减小LI间距 */
    position: relative;
    height: auto; /* 重置高度 */
    line-height: normal; /* 重置行高 */
    /* 移除 LI 上的圆角和过渡，移交给 A 标签 */
}

/* 移除 LI 的悬停背景效果 */
.header .nav li:hover {
    background: none;
}
.header.scrolled .nav li:hover {
    background: none;
}

.header .nav li a {
    font-size: 16px;
    color: #fff; /* 默认白色字体，适应深色Banner */
    display: inline-block; /* 改为 inline-block 以适应内容宽度 */
    padding: 0 6px; /* 移除内边距，交给span */
    transition: all .3s;
}

.header .nav li a span {
    display: inline-block;
    padding: 2px 16px; /* 调整内边距 */
    border-radius: 10px;
    transition: all .3s;
    line-height: 1.5; /* 设置合理的行高 */
}

/* A 标签悬停背景效果（仿影刀） */
.header .nav li a:hover {
    background: none; /* 移除A标签背景 */
}

/* 将悬停背景加到 span 上 */
.header .nav li a:hover span {
    background: rgba(255, 255, 255, 0.1);
}
.header.scrolled .nav li a:hover span {
    background: #f5f5f5;
}

/* 滚动后导航字体变黑 */
.header.scrolled .nav li a {
    color: #333;
}

/* 排除登录按钮的字体颜色（保持白色） */
.header.scrolled .nav li a.nav-btn {
    color: #fff;
}

/* 激活状态 */
.header .nav li.active a {
    background: none;
}
.header .nav li.active a span {
    background: rgba(255, 255, 255, 0.1);
}
.header.scrolled .nav li.active a {
    background: none;
}
.header.scrolled .nav li.active a span {
    background: rgba(236, 237, 239, 0.8);
    color: #333;
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 320px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all .3s;
    z-index: 1001;
}

/* 下拉菜单箭头 */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    margin-left: -6px;
    border-width: 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent #fff;
}

/* 鼠标悬停显示下拉 */
.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 下拉项样式 */
.dropdown-item {
    display: flex !important; /* 覆盖默认block */
    align-items: center;
    padding: 15px !important;
    border-radius: 6px;
    color: #333 !important; /* 强制黑色字体 */
    text-align: left;
}

.dropdown-item:hover {
    background: #f9f9f9;
}

.dropdown-item i {
    font-size: 24px;
    margin-right: 15px;
}

.dropdown-item .item-info {
    display: flex;
    flex-direction: column;
}

.dropdown-item .item-info strong {
    font-size: 15px;
    margin-bottom: 4px;
    color: #333;
}

.dropdown-item .item-info span {
    font-size: 12px;
    color: #999;
}

.header .nav-btn {
    display: inline-block;
    padding: 0 20px;
    height: 28px;
    line-height: 28px;
    background: #1E9FFF;
    color: #fff !important;
    border-radius: 30px;
    margin-left: 30px;
    font-size: 16px !important;
}
.header .nav-btn span {
    padding: 0 3px;
}

.header .nav-btn:hover {
    background: #16b7ff !important;
    color: #fff !important;
}
.header .nav-btn-user {
    background: none !important;
    color: #fff !important;
    padding: 0 3px!important;
}
.header .nav-btn-user:hover {
    background: none !important;
}
.header .nav-btn-user span {
   font-size: 14px!important;
   /* padding: 0 3px!important;  移除强制内边距，使其与通用菜单保持一致 */
}
.header.scrolled .nav-btn-user {  
    color: #333 !important;
}

.header .nav-free-down {
    background: #ffffff !important;
    color: #333 !important;
    margin-left: 0px!important;
}
.header .nav-free-down:hover {
    background: #bdc3c7 !important;
    color: #333 !important;
}
.header .nav-free-down span {
   padding:0px 5px!important;
   font-size: 14px!important;
}
/*  滚动后 */
.header.scrolled .nav-free-down {
    background: #121212 !important;
    color: #ffffff !important;
}
.header.scrolled .nav-free-down:hover {
    background: #1d1d1d !important;
    color: #ffffff !important;
}

/* Banner Section */
.layui-carousel[lay-filter="home-banner"] {
    background-color: #000;
    background-image: url('/static/images/home_banner_bg.jpg');
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: cover;
    margin-top: 0; /* 移除顶部偏移，让Banner延伸到Header下方 */
    height: 680px !important; /* 调整高度 */
}

.banner-slide {
    position: relative;
    height: 100%;
    width: 100%;
    background-image: url('https://winrobot-pub-a-oss.yingdao.com/static/xybot-front-homepage-v3/online/267/static/cases_banner.2a0f5f5c.jpg');
    background-size: cover;
    background-position: center top; /* 图片顶部对齐 */
    background-repeat: no-repeat;
    display: flex !important; /* Force flex display for centering */
    align-items: center;
    justify-content: center;
    color: #fff;
    padding-top: 70px; /* 增加内边距，避免内容被Header遮挡 */
    box-sizing: border-box;
}

/* Ensure Layui carousel items are visible */
/* Hide Layui carousel default loading icon */
.layui-carousel > [carousel-item]:before {
    display: none !important;
    content: '' !important;
}

.layui-carousel > [carousel-item] > *:not(.layui-this) {
    display: none !important;
}

.layui-carousel > [carousel-item] > .layui-this,
.layui-carousel > [carousel-item] > .layui-carousel-prev,
.layui-carousel > [carousel-item] > .layui-carousel-next {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.banner-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Overlay for text readability */
}

.banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
}

.banner-content h1 {
    font-size: 58px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.banner-content p {
    font-size: 20px;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.banner-btns {
    margin-top: 40px;
}

.cta-btn.primary {
    background: #1E9FFF;
    color: #fff;
    margin: 0 10px;
}
.cta-btn.primary:hover {
    background: #16b7ff;
}

.cta-btn.outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    margin: 0 10px;
    padding: 10px 38px; /* Compensate border width */
}
.cta-btn.outline:hover {
    background: rgba(255,255,255,0.1);
}

/* 覆盖Layui Carousel默认样式 */
.layui-carousel > [carousel-item] > * {
    background: none;
}
.layui-carousel-ind ul {
    background: none;
}
.layui-carousel-ind li {
    background-color: rgba(255,255,255,0.3);
}
.layui-carousel-ind li.layui-this {
    background-color: #fff;
}

/* Section Common */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.section-title p {
    font-size: 16px;
    color: #666;
}

/* Best Practice Section */
.practice-section {
    background-color: #f9f9f9;
}

.practice-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform .3s;
    height: 100%;
}

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

.practice-img {
    height: 200px;
    background-color: #eee;
    overflow: hidden;
}
.practice-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.practice-card:hover .practice-img img {
    transform: scale(1.05);
}

.practice-info {
    padding: 25px;
}

.practice-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.practice-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    height: 44px; /* Limit 2 lines */
    overflow: hidden;
}

.practice-tags span {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f8ff;
    color: #1E9FFF;
    font-size: 12px;
    border-radius: 4px;
    margin-right: 5px;
}

/* Case Categories */
.case-tabs {
    text-align: center;
    margin-bottom: 40px;
}

.case-tabs span {
    display: inline-block;
    padding: 8px 25px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 20px;
    color: #666;
    transition: all .3s;
    font-size: 16px;
}

.case-tabs span.active, .case-tabs span:hover {
    background: #1E9FFF;
    color: #fff;
}

.case-grid .layui-col-md3 {
    margin-bottom: 30px;
}

.case-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    transition: all .3s;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.case-item:hover {
    border-color: #1E9FFF;
    box-shadow: 0 5px 20px rgba(30, 159, 255, 0.1);
}

.case-logo {
    height: 60px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.case-logo img { max-height: 100%; max-width: 100%; }

.case-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    height: 44px;
    overflow: hidden;
}

.case-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 159, 255, 0.95);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s;
    padding: 20px;
    box-sizing: border-box;
}

.case-item:hover .case-hover {
    opacity: 1;
}

.case-hover h4 { font-size: 18px; margin-bottom: 10px; font-weight: bold; }
.case-hover p { font-size: 13px; margin-bottom: 15px; }
.case-hover .btn {
    border: 1px solid #fff;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #1E9FFF 0%, #16b7ff 100%);
    color: #fff;
    text-align: center;
    padding: 60px 0;
}

.cta-section h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.cta-btn {
    display: inline-block;
    padding: 12px 40px;
    background: #fff;
    color: #1E9FFF;
    font-size: 18px;
    border-radius: 30px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Form Section */
.form-section {
    background: #fff;
}

.form-box {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #bdc3c7;
    padding: 60px 0 20px;
}

.footer-links {
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #bdc3c7;
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}
.footer-bottom a {
    color: #bdc3c7;
}
.footer-bottom a:hover {
    color: #fff;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    /* 移动端头部样式 */
    .header { height: 60px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
    .header .logo { height: 60px; line-height: 60px; color: #333; }
    .header .logo img { height: 30px; }
    
    /* 移动端菜单按钮 */
    .mobile-nav-btn {
        display: block !important;
        float: right;
        height: 60px;
        line-height: 60px;
        color: #333;
        font-size: 24px;
        cursor: pointer;
    }
    
    /* 移动端导航菜单 */
    .header .nav { 
        display: none; 
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        float: none;
        height: auto;
        padding: 10px 0; /* 减小上下内边距 */
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        flex-direction: column;
        align-items: center; /* 居中对齐 */
        z-index: 999;
        border-top: 1px solid #f0f0f0;
    }
    
    .header .nav.active { display: flex; animation: slideDown 0.3s ease; }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .header .nav ul {
        display: block;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
    }
    
    .header .nav li {
        display: block;
        margin: 0;
        width: 100%;
        text-align: center; /* 文字居中 */
        border-bottom: 1px solid #f9f9f9; /* 添加分隔线 */
    }
    
    .header .nav li:last-child { border-bottom: none; }
    
    .header .nav li a {
        color: #333;
        padding: 15px 0; /* 增加点击区域 */
        display: block;
        font-size: 16px;
    }
    
    .header .nav li a span {
        padding: 0; /* 移除PC端的内边距 */
    }
    
    /* 移动端激活状态 */
    .header .nav li.active a {
        color: #1E9FFF;
        background: #f0f8ff; /* 激活背景 */
        font-weight: bold;
    }
    
    /* 移动端下拉菜单交互调整 */
    /* 默认隐藏下拉菜单，移除 !important 允许JS控制 */
    .dropdown-menu { 
        display: none; 
        position: static; /* 改为静态定位，挤占下方空间 */
        width: 100%;
        min-width: 100%; /* 确保撑满 */
        box-shadow: none;
        background: #f9f9f9; /* 区分背景色 */
        padding: 0;
        margin: 0; /* 清除可能存在的边距 */
        opacity: 1;
        visibility: visible;
        transform: none !important; /* 强制移除位移 */
        left: auto; /* 重置left */
        top: auto; /* 重置top */
        border-radius: 0; /* 移除圆角 */
    }
    
    .dropdown-menu::before { display: none; } /* 隐藏小三角 */
    
    .has-dropdown > a > span i { display: inline-block !important; } /* 显示下拉箭头 */
    
    /* 移动端下拉项样式 */
    .dropdown-item {
        padding: 12px 20px !important;
        border-bottom: 1px solid #eee;
        display: block !important; /* 强制块级显示，便于居中 */
        text-align: center; /* 文本居中 */
    }
    
    .dropdown-item i { display: none; } /* 隐藏图标 */
    
    .dropdown-item .item-info span { display: none; } /* 隐藏副标题 */
    
    .dropdown-item .item-info {
        display: block; /* 改为块级 */
        text-align: center;
    }
    
    .dropdown-item .item-info strong {
        font-size: 14px;
        color: #666;
        font-weight: normal;
        margin: 0;
    }
    
    .dropdown-item:last-child { border-bottom: none; }
    
    /* 激活状态显示下拉菜单 */
    .has-dropdown.active .dropdown-menu { display: block; }
    .has-dropdown.active > a > span i { transform: rotate(180deg); transition: transform .3s; }
    
    /* Banner调整 */
    .layui-carousel[lay-filter="home-banner"] { height: 400px !important; margin-top: 60px; }
    .banner-slide { padding-top: 0; } /* 移动端移除 padding-top */
    .banner-content h1 { font-size: 36px; line-height: 1.4; margin-bottom: 10px; }
    .banner-content p { font-size: 14px; max-width: 90%; }
    .banner-btns { margin-top: 20px; }
    .cta-btn { padding: 8px 20px; font-size: 14px; }
    
    .section { padding: 40px 0; }
    .case-grid .layui-col-md3 { width: 50%; float: left; padding: 0 5px; }
    .form-box { padding: 20px; }
    
    /* 移动端按钮调整 */
    .nav-btn-user, .nav-free-down {
        display: block;
        margin: 10px 0 !important;
        text-align: center;
        background: #1E9FFF !important;
        color: #fff !important;
    }
    .nav-free-down { background: #f2f2f2 !important; color: #333 !important; }
}

/* PC端默认隐藏菜单按钮 */
.mobile-nav-btn { display: none; }
