/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    padding-top: 63px; /* 为固定导航栏预留空间 */
    cursor: url('./cur_yo.cur'),  pointer;
    font-family: 'Inter', system-ui, sans-serif;
}

/* 导航栏 - 固定置顶（电脑端默认样式） */
header {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    transition: box-shadow 0.3s ease;
}

header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #165DFF;
    text-decoration: none;
}

.logo img {
    height: 40px;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

/* 电脑端导航菜单样式（完全保留） */
nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    position: relative;
    margin: 0 10px;
}

/* 导航项样式（电脑端） */
nav ul li a {
    display: block;
    padding: 20px 10px;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 15px;
}

nav ul li:not(:has(.item-children)) a {
    color: #333;
}

nav ul li:has(.item-children) a {
    color: #165DFF;
    font-weight: 500;
}

nav ul li:hover > a {
    color: #00b655;
}

/* 下拉菜单样式（电脑端） */
.item-children {
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(135deg, #ff66ba 0%, #8cff49 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    z-index: 1000;
    display: none;
    padding: 15px;
    min-width: 300px;
}

li:hover .item-children {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 子项网格布局（电脑端） */
.children-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.children-list li {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin: 0;
}

.children-list li a {
    display: block;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    transition: all .35s ease;
}

.children-list li a:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #fff;
}

/* 微光扫过效果（电脑端） */
.children-list li a::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg,
                transparent 20%,
                rgba(255, 255, 255, 0.3) 50%,
                transparent 80%);
    transform: rotate(45deg) translateY(-100%);
    transition: transform .6s;
}

.children-list li a:hover::before {
    transform: rotate(45deg) translateY(100%);
}

.edge-right .item-children {
    left: auto;
    right: 0;
}

/* 移动端菜单按钮（默认隐藏，仅移动端显示） */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #165DFF;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

/* 轮播图样式（电脑端默认） */
.carousel {
    position: relative;
    width: 98%;
    max-width: 1500px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    display: none;
}

.carousel-item.active {
    display: block;
    animation: fadeIn 0.8s ease;
}

.carousel-item img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.carousel:hover .carousel-item img {
    transform: scale(1.02);
}

/* 轮播控制按钮（电脑端） */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.carousel:hover .carousel-button {
    opacity: 1;
}

.carousel-button:hover {
    background-color: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: 15px;
}

.next {
    right: 15px;
}

/* 轮播指示器（电脑端） */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-indicator.active {
    background-color: white;
    transform: scale(1.2);
}

/* 主内容区样式（通用） */
main {
    padding: 20px 0;
}

/* 链接按钮样式优化（通用） */
.link-button {
    transition: all 0.3s ease;
}

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 图片展示区域（通用） */
.image-fieldset {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-fieldset:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.image-fieldset img {
    transition: transform 0.5s ease;
}

.image-fieldset:hover img {
    transform: scale(1.03);
}

/* 页脚链接样式（通用） */
.footer-nav a {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #165DFF;
    transition: width 0.3s ease;
}

.footer-nav a:hover::after {
    width: 100%;
}

/* ---------- 移动端适配（768px及以下） ---------- */
/* 1024px 过渡适配 */
@media (max-width: 1024px) {
    .carousel-item img {
        height: 500px;
    }
}

/* 768px 核心移动端适配 */
@media (max-width: 768px) {
    body {
        padding-top: 63px;
    }
    
    .header-container {
        flex-direction: row;
        height: 60px;
    }
    
    /* 显示移动端汉堡菜单按钮 */
    .menu-toggle {
        display: block;
    }
    
    /* 移动端导航菜单重置为垂直布局 */
    nav {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        display: none; /* 默认隐藏，通过JS控制active显示 */
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        padding: 10px 0;
    }
    
    nav ul li {
        margin: 0;
        border-bottom: 1px solid #f1f1f1;
    }
    
    nav ul li:last-child {
        border-bottom: none;
    }
    
    /* 移动端导航项内边距调整 */
    nav ul li a {
        padding: 12px 20px;
    }
    
    /* 移动端下拉菜单适配（取消渐变背景，改为轻量样式） */
    .item-children {
        position: static;
        display: none;
        padding: 0 20px;
        background: none; /* 取消电脑端渐变背景 */
        box-shadow: none;
        min-width: auto;
    }
    
    /* 移动端下拉菜单显示逻辑（hover + active类兼容触控） */
    li:hover .item-children,
    .item-children.active {
        display: block;
        background-color: rgba(22, 93, 255, 0.05);
    }
    
    /* 移动端子项改为双列网格 */
    .children-list {
        grid-template-columns: 1fr 1fr;
        padding: 10px 0;
    }
    
    /* 移动端子项样式重置（适配浅色背景） */
    .children-list li a {
        color: #165DFF;
        background: none;
        border: none;
        padding: 8px 10px;
        text-align: left;
    }
    
    /* 移动端子项hover效果重置 */
    .children-list li a:hover {
        background-color: rgba(22, 93, 255, 0.1);
        color: #0E42D2;
        transform: none;
        box-shadow: none;
    }
    
    /* 移除移动端微光效果（避免冲突） */
    .children-list li a::before {
        display: none;
    }
    
    /* 移动端轮播图高度适配 */
    .carousel-item img {
        height: 350px;
    }
    
    /* 移动端轮播按钮优化（提高触控体验） */
    .carousel-button {
        opacity: 0.7; /* 移动端默认显示按钮，无需hover触发 */
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .carousel-button:hover {
        opacity: 1;
        transform: translateY(-50%) scale(1.05);
    }
}
/* 修复 HR 线过长导致手机端横向滚动、布局错乱 */
hr {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* 全局禁止页面横向溢出（根治问题） */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}