/* 通用组件样式 */

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.2);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}


/* 导航栏样式 */
.navbar {

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    transition: var(--transition);

}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;

    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo img {
    height: 40px;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-left: 10px;
}

.logo i {
    margin-right: 10px;
    color: var(--accent);
}

.nav-links {
    display: flex;
}

.nav-item {
    position: relative;
    margin: 0 15px;
}

.nav-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    padding: 8px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active::after {
    width: 100%;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
    display: none;
}

.dropdown-category {
    padding: 8px 20px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(0, 102, 204, 0.05);
    border-bottom: 1px solid var(--light-gray);
}

.dropdown-item {
    padding: 10px 20px 10px 30px;
    border-bottom: 1px solid var(--light-gray);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
}

.dropdown.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/*
.dropdown-item {
    padding: 10px 20px;
    border-bottom: 1px solid var(--light-gray);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
*/
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}


/* Mega Menu 样式 */
.mega-nav {
    position: relative;
}

.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    padding: 30px 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    z-index: 999;
    width: 600px;
    gap: 40px;
    border-radius: 8px;
}

.mega-column {
    flex: 1;
}

.mega-column h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #0066cc;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 5px;
}

.mega-column ul {
    list-style: none;
    padding: 0;
}

.mega-column ul li {
    margin: 10px 0;
}

.mega-column ul li a {
    color: #212529;
    font-size: 0.95rem;
    transition: 0.3s;
}

.mega-column ul li a:hover {
    color: #0066cc;
    padding-left: 5px;
}

/* 显示 Mega Menu on hover */
.mega-nav:hover .mega-menu {
    display: flex;
}

.category-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-title {
    font-weight: 600;
    color: #0066cc;
    font-size: 0.95rem;
    margin-top: 10px;
    margin-bottom: 6px;
    padding-left: 5px;
    border-left: 3px solid #0066cc;
}

.category-title i {
    margin-right: 6px;
    color: #0066cc;
}

.sub-links {
    padding-left: 15px;
    list-style: none;
}

.sub-links li {
    margin: 4px 0;
}

.sub-links li a {
    font-size: 0.88rem;
    color: #212529;
    padding-left: 10px;
    display: block;
    transition: 0.3s ease;
}

.sub-links li a:hover {
    color: #0066cc;
    background-color: #f1f7ff;
    border-radius: 4px;
}



/* 页脚样式 */
.footer {
    background: var(--dark);
    color: white;
    padding: 70px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}


.footer-col h4 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #a0aec0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    margin-bottom: 15px;
}

.contact-info i {
    color: var(--primary);
    margin-right: 15px;
    min-width: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 25px 0;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0aec0;
    font-size: 0.9rem;
}


/* 响应式设计 */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-item {
        margin: 10px 0;
    }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 10px;
        display: none;
    }

    .dropdown.active {
        display: block;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-text h1 {
        font-size: 2.3rem;
    }
}

@media (max-width: 576px) {
    .hero {
        padding-top: 90px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }
}

/* 控制内嵌子菜单展开样式 */
.inner-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 20px;
    background: none;
    width: max-content;
    min-width: 240px;
}
