/* 通用样式 - 导航栏、底部、全屏菜单、页面布局 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "hmr", sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 导航栏样式 */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
    transition: all 0.3s ease;
}

.nav-container {
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 品牌logo样式 */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
}

.nav-brand .logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.nav-brand .logo:hover {
    transform: scale(1.05);
}

/* 导航图标样式 */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.nav-icon:hover {
    background-color: #f1f3f4;
    color: #333;
    transform: translateY(-1px);
}

.nav-icon:active {
    transform: translateY(0);
}

.nav-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    transition: all 0.2s ease;
}

/* 导航栏滚动效果 */
.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 全屏菜单样式 */
.fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-menu.active {
    opacity: 1;
    visibility: visible;
}

.menu-content {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 80px 40px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 关闭按钮 */
.menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    transition: all 0.2s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-close:hover {
    background-color: #f1f3f4;
    transform: rotate(90deg);
}

.menu-close svg {
    width: 24px;
    height: 24px;
}

/* 菜单项容器 */
.menu-items {
    display: flex;
    flex-direction: column;
    gap: 60px;
    animation: menuSlideIn 0.5s ease-out 0.1s both;
}

/* 菜单分类 */
.menu-category:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.category-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.category-link:hover {
    transform: translateY(-2px);
}

.category-link:hover .category-title {
    color: #4a90e2;
}

.category-title {
    font-size: 1.25vw; /* 24px / 1920px * 100 */
    font-family: "hmb", sans-serif;
    color: #333;
    margin-bottom: 30px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.category-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-items li {
    margin-bottom: 20px;
}

.menu-item {
    display: block;
    font-size: 1.67vw; /* 32px / 1920px * 100 */
    font-weight: 300;
    font-family: "hmr", sans-serif;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 10px 0;
    position: relative;
}

.menu-item:hover {
    color: #333;
    transform: translateX(10px);
}

.menu-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #333;
    transition: width 0.3s ease;
}

.menu-item:hover::after {
    width: 60px;
}

/* 通用底部样式 */
.footer {
    background: #B7DDF0;
    color: #255560;
    text-align: center;
    padding: 40px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-text {
    font-size: 0.94vw; /* 18px / 1920px * 100 */
    font-weight: 500;
    font-family: "hmr", sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* 主要内容区域 */
.main-content {
    min-height: calc(100vh - 60px);
    margin-top: 60px;
    animation: fadeIn 0.6s ease-out;
}

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

h1 {
    font-size: 2.08vw; /* 40px / 1920px * 100 (2.5rem ≈ 40px) */
    margin-bottom: 1rem;
    color: #333;
    text-align: center;
}

p {
    font-size: 0.91vw; /* 17.6px / 1920px * 100 (1.1rem ≈ 17.6px) */
    color: #666;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 菜单动画 */
@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 750px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-icons {
        gap: 12px;
    }
    
    .nav-icon {
        width: 36px;
        height: 36px;
    }
    
    .nav-icon-img {
        width: 18px;
        height: 18px;
    }

    .menu-content {
        padding: 60px 20px 20px;
    }

    .menu-close {
        top: 20px;
        right: 20px;
        width: 36px;
        height: 36px;
    }

    .menu-close svg {
        width: 20px;
        height: 20px;
    }

    .menu-items {
        gap: 20px;
    }

    .category-title {
        font-size: 2.67vw; /* 20px / 750px * 100 */
        margin-bottom: 20px;
    }

    .menu-item {
        font-size: 3.2vw; /* 24px / 750px * 100 */
        padding: 8px 0;
    }

    .footer {
        padding: 30px 15px;
    }

    .footer-text {
        font-size: 2.13vw; /* 16px / 750px * 100 */
    }

    h1 {
        font-size: 4.27vw; /* 32px / 750px * 100 (2rem ≈ 32px) */
    }

    .container {
        padding: 0 15px;
    }

    /* 更小屏幕的额外样式 */
    .nav-icons {
        gap: 8px;
    }

    .nav-icon {
        width: 32px;
        height: 32px;
    }

    .nav-icon-img {
        width: 16px;
        height: 16px;
    }

    .menu-content {
        padding: 50px 15px 15px;
    }

    .menu-items {
        gap: 10px;
    }

    .category-title {
        font-size: 2.4vw; /* 18px / 750px * 100 */
        margin-bottom: 15px;
    }

    .menu-item {
        font-size: 2.67vw; /* 20px / 750px * 100 */
        padding: 6px 0;
    }

    .menu-item:hover {
        transform: translateX(5px);
    }

    .footer-text {
        font-size: 1.87vw; /* 14px / 750px * 100 */
        letter-spacing: 1px;
    }

    /* 手机端隐藏底部 */
    .footer {
        display: none;
    }
}
