/* 新型材料公司官网 - 公共样式 */

/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1E3A8A; /* 深蓝色 - 专业、科技感 */
    --secondary-color: #3B82F6; /* 浅蓝色 - 辅助色 */
    --accent-color: #F59E0B; /* 金色 - 强调色 */
    --text-dark: #1F2937;
    --text-gray: #6B7280;
    --text-light: #9CA3AF;
    --bg-white: #FFFFFF;
    --bg-gray: #F9FAFB;
    --bg-dark: #111827;
    --border-color: #E5E7EB;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.menu-toggle {
    display: none;
}
/* 移动端专用电话项，桌面端隐藏 */
.nav-phone-mobile {
    display: none;
}

/* ==================== 导航栏样式 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar .nav-container {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    width: 100%;
    justify-content: space-between;
}

.navbar .logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.navbar .logo p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 10px 0; 
}

.navbar .logo img {
    width: 100px;
    /* 移除原来的 padding-top: 15px，如果需要图片上方留白，用 margin 或父容器 padding */
}

.navbar .nav-menu {
    display: flex;
    gap: 40px;
    flex: 1;
    justify-content: center;
}

.navbar .nav-menu a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding: 8px 0;
}

.navbar .nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar .nav-menu a:hover::after,
.navbar .nav-menu a.active::after {
    width: 100%;
}

.navbar .nav-menu a:hover,
.navbar .nav-menu a.active {
    color: var(--primary-color);
}

.navbar .nav-cta {
    flex-shrink: 0;
}

.navbar .nav-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
}

.navbar .nav-phone i {
    font-size: 20px;
}

/* ==================== 页脚样式 ==================== */
.footer {
    background: var(--bg-dark);
    color: var(--bg-white);
    padding: 60px 5% 30px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1.6fr; /* 快速链接列占比较小 */
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-section p,
.footer-section a {
    font-size: 14px;
    color: #9CA3AF;
    line-height: 2;
    display: block;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 14px;
    color: #9CA3AF;
}

/* 联系方式内部平行布局 */
.footer-section .contact-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;  /* 顶部对齐 */
    flex-wrap: wrap;          /* 移动端自动换行 */
}

.contact-text {
    flex: 1;
    min-width: 180px;
}

.contact-qr {
    flex-shrink: 0;           /* 防止图片被压缩 */
    width: 130px;
    height: auto;
}

/* ==================== 通用组件样式 ==================== */
.section {
    padding: 30px 5%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.map-wrapper {
    margin-top: 40px;      /* 与上方内容拉开距离 */
    border-radius: 12px;   /* 可选：圆角边框 */
    overflow: hidden;      /* 确保圆角生效 */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* 可选：轻微阴影 */
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .navbar .nav-container {
        gap: 20px;
    }

    .navbar .nav-menu {
        gap: 20px;
    }

    .navbar .logo {
        font-size: 16px;
    }

    .navbar .nav-phone {
        font-size: 14px;
    }

    .navbar .nav-phone i {
        font-size: 18px;
    }

    .section {
        padding: 60px 5%;
    }

    .section-title {
        font-size: 28px;
    }

    /* 移动端适配：恢复为单列，图片可居中 */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-section .contact-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .contact-qr {
        margin-top: 10px;
    }
    /* 移动端菜单底部显示电话项 */
    .nav-phone-mobile {
        display: block;          /* 或 flex，根据设计调整 */
        border-top: 1px solid var(--border-color);
        margin-top: 5px;
    }

    .nav-phone-mobile a {
        display: block;
        padding: 15px 0;
        color: var(--primary-color);
        font-weight: 600;
    }

    .nav-phone-mobile a i {
        margin-right: 8px;
    }
    /* 移动端菜单按钮 */
    .menu-toggle {
        display: block;  /* 桌面端隐藏 */
        font-size: 28px;
        cursor: pointer;
        color: var(--primary-color);
    }

    /* 导航栏容器改为相对定位，菜单绝对定位 */
    .navbar .nav-container {
        position: relative;
    }

    /* 水平菜单改为垂直折叠菜单 */
    .navbar .nav-menu {
        position: absolute;
        top: 70px;          /* 与导航栏高度一致 */
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 0;
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        z-index: 999;
    }

    /* 菜单展开状态 */
    .navbar .nav-menu.active {
        max-height: 300px;  /* 根据菜单项数量调整 */
    }

    /* 菜单项样式 */
    .navbar .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .navbar .nav-menu a {
        display: block;
        padding: 15px 0;
    }

    /* 手机号码在移动端可隐藏或调整位置，这里建议隐藏原位置，放入菜单内 */
    .navbar .nav-phone {
        display: none;
    }

    /* 可选：在菜单内增加一个手机号选项（需修改JS动态添加）或直接展示在菜单底部 */

    /* 隐藏或调整背景装饰图片，避免重叠 */
    .banner-products-bg .banner-product-bg {
        width: 150px;          /* 缩小图片尺寸 */
        height: 150px;
        opacity: 0.4;          /* 降低透明度，减少视觉干扰 */
    }

    /* 调整位置，避免重叠和压住文字 */
    .banner-product-bg:nth-child(1) {
        top: 5%;
        left: -10%;
    }
    .banner-product-bg:nth-child(2) {
        top: auto;
        bottom: 5%;
        right: -10%;
    }
    /* 如果后续有更多图片，可一并调整 */

    /* 隐藏或调整背景装饰图片，避免重叠 */
    .page-header-products-bg .page-header-product-bg {
        width: 150px;          /* 缩小图片尺寸 */
        height: 150px;
        opacity: 0.4;          /* 降低透明度，减少视觉干扰 */
    }

    /* 调整位置，避免重叠和压住文字 */
    .page-header-product-bg:nth-child(1) {
        top: 5%;
        left: -10%;
    }
    .page-header-product-bg:nth-child(2) {
        top: auto;
        bottom: 5%;
        right: -10%;
    }
    /* 如果后续有更多图片，可一并调整 */
    
}