/* 导航栏样式 */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: background-color 0.3s;
}

.header.scrolled {
    background-color: rgba(44, 62, 80, 0.95);
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: #0ABAB5;
}

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

.nav a {
    color: white;
    text-decoration: none;
    margin-left: 30px;
    font-size: 16px;
    transition: all 0.3s;
    position: relative;
}

.nav a:hover {
    color: #0ABAB5;
}

.nav a.contact-btn {
    background-color: #0ABAB5;
    padding: 8px 20px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav a.contact-btn:hover {
    background-color: #09a19c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 下拉菜单样式 */
.nav .dropdown {
    position: relative;
    display: inline-block;
}

.nav .dropdown-btn {
    color: white;
    text-decoration: none;
    margin-left: 30px;
    font-size: 16px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    padding: 5px 0;
}

.nav .dropdown-btn:hover {
    color: #0ABAB5;
}

.nav .dropdown-btn i {
    transition: transform 0.3s ease;
}

.nav .dropdown.active .dropdown-btn i {
    transform: rotate(180deg);
}

.nav .dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    color: #333;
    min-width: 1000px;
    max-height: 550px;
    overflow-y: auto;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12), 0 5px 15px rgba(0,0,0,0.08);
    z-index: 1000;
    border-radius: 12px;
    top: 100%;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(10, 186, 181, 0.1);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
    backdrop-filter: blur(5px);
}

.nav .dropdown-section {
    margin-bottom: 0;
    border-bottom: none;
    display: flex;
    flex-direction: column;
}

/* 第一列的第一个section顶部圆角 */
.nav .dropdown-content div:nth-child(1) {
    border-radius: 12px 0 0 0;
}

/* 第二列的第一个section顶部圆角和左右边框 */
.nav .dropdown-content div:nth-child(2) {
    border-radius: 0 0 0 0;
    border-left: 1px solid rgba(10, 186, 181, 0.1);
    border-right: 1px solid rgba(10, 186, 181, 0.1);
}

/* 第三列的第一个section顶部圆角 */
.nav .dropdown-content div:nth-child(3) {
    border-radius: 0 12px 0 0;
}

/* 第一列的最后一个section底部圆角 */
.nav .dropdown-content div:nth-last-child(3) {
    border-radius: 0 0 0 12px;
}

/* 第二列的最后一个section底部圆角和左右边框 */
.nav .dropdown-content div:nth-last-child(2) {
    border-radius: 0 0 0 0;
    border-left: 1px solid rgba(10, 186, 181, 0.1);
    border-right: 1px solid rgba(10, 186, 181, 0.1);
}

/* 为第二列的其他section添加左右边框 */
.nav .dropdown-content div:nth-child(n+4):nth-child(-n+7) {
    border-left: 1px solid rgba(10, 186, 181, 0.1);
    border-right: 1px solid rgba(10, 186, 181, 0.1);
}

/* 第三列的最后一个section底部圆角 */
.nav .dropdown-content div:last-child {
    border-radius: 0 0 12px 0;
}

/* 多列布局 - 仅在active状态应用 */
.nav .dropdown.active .dropdown-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 下拉菜单顶部装饰条 */
.nav .dropdown-content::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 30px;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #0ABAB5, #09a19c);
    border-radius: 0 0 4px 4px;
}

.nav .dropdown-content a {
    color: #333;
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    margin: 0;
    text-align: left;
    border-bottom: 1px solid rgba(10, 186, 181, 0.08);
    transition: all 0.25s ease;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.nav .dropdown-content a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background-color: #0ABAB5;
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.nav .dropdown-content a:hover {
    background-color: rgba(10, 186, 181, 0.05);
    color: #0ABAB5;
    padding-left: 24px;
    box-shadow: inset 3px 0 0 #0ABAB5;
}

.nav .dropdown-content a:hover::before {
    transform: scaleY(1);
}

.nav .dropdown-content a:last-child {
    border-bottom: none;
}

.nav .dropdown-section {
    margin-bottom: 2px;
    position: relative;
}

.nav .dropdown-header {
    padding: 12px 20px;
    background: linear-gradient(135deg, #0ABAB5 0%, #09a19c 100%);
    color: white;
    font-weight: 600;
    font-size: 14px;
    border-bottom: none;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav .dropdown-header::before {
    content: '▶';
    font-size: 10px;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.nav .dropdown-section:hover .dropdown-header::before {
    transform: translateX(3px);
}

/* 自定义滚动条 */
.nav .dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.nav .dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.nav .dropdown-content::-webkit-scrollbar-thumb {
    background: #0ABAB5;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.nav .dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #09a19c;
}

/* Firefox滚动条 */
.nav .dropdown-content {
    scrollbar-width: thin;
    scrollbar-color: #0ABAB5 #f1f1f1;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* 响应式设计：中等屏幕下2列布局 */
@media (max-width: 1100px) {
    .nav .dropdown.active .dropdown-content {
        grid-template-columns: repeat(2, 1fr);
        min-width: 760px;
    }
    
    /* 调整中等屏幕下的列边框 */
    .nav .dropdown-content div:nth-child(2) {
        border-right: none;
    }
    
    /* 调整中等屏幕下的圆角 */
    .nav .dropdown-content div:nth-child(1) {
        border-radius: 12px 0 0 0;
    }
    .nav .dropdown-content div:nth-child(2) {
        border-radius: 0 12px 0 0;
    }
    .nav .dropdown-content div:nth-last-child(2) {
        border-radius: 0 0 0 12px;
    }
    .nav .dropdown-content div:last-child {
        border-radius: 0 0 12px 0;
    }
    
    /* 调整中等屏幕下的边框规则 */
    .nav .dropdown-content div:nth-child(n+3) {
        border-left: 1px solid rgba(10, 186, 181, 0.1);
    }
    .nav .dropdown-content div:nth-child(n+4):nth-child(-n+7) {
        border-right: none;
    }
}

/* 响应式设计：小屏幕下1列布局 */
@media (max-width: 768px) {
    .nav .dropdown.active .dropdown-content {
        grid-template-columns: 1fr;
        min-width: 100%;
        max-width: 320px;
        left: auto;
        right: 0;
    }
    
    /* 调整小屏幕下的边框和圆角 */
    .nav .dropdown-content div {
        border-left: none !important;
        border-right: none !important;
    }
    .nav .dropdown-content div:first-child {
        border-radius: 12px 12px 0 0;
    }
    .nav .dropdown-content div:last-child {
        border-radius: 0 0 12px 12px;
    }
    .nav .dropdown-content div:nth-child(2),
    .nav .dropdown-content div:nth-last-child(2) {
        border-radius: 0;
    }
}