/* 企业AI业务咨询电商网站 - 公共样式文件 */

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

/* 根元素样式 */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* 颜色变量 */
:root {
    --primary-black: #000000;
    --primary-white: #ffffff;
    --primary-gray: #333333;
    --light-gray: #f5f5f5;
    --medium-gray: #999999;
    --accent-beige: #f5f5dc;
    --accent-blue: #2c3e50;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-shadow: rgba(0, 0, 0, 0.15);
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航样式 */
.header {
    background-color: var(--primary-white);
    box-shadow: 0 2px 10px var(--shadow-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-black);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--accent-blue);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu li a {
    color: var(--primary-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu li a:hover {
    color: var(--accent-blue);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-blue);
    transition: width 0.3s ease;
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-black);
    transition: all 0.3s ease;
}

/* 主要内容区域 */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background-color: var(--light-gray);
    color: var(--primary-black);
    border: 1px solid var(--border-color);
}

.btn-primary:hover {
    background-color: var(--accent-beige);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.btn-secondary {
    background-color: var(--primary-white);
    color: var(--primary-black);
    border: 2px solid var(--primary-black);
}

.btn-secondary:hover {
    background-color: var(--primary-black);
    color: var(--primary-white);
}

.btn-accent {
    background-color: var(--accent-blue);
    color: var(--primary-white);
}

.btn-accent:hover {
    background-color: #34495e;
    transform: translateY(-2px);
}

/* 卡片样式 */
.card {
    background-color: var(--primary-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--hover-shadow);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 10px;
}

.card-description {
    color: var(--medium-gray);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.card-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent-blue);
    margin-bottom: 15px;
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-gray);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--primary-white);
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--medium-gray);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-black);
}

/* 页脚样式 */
.footer {
    background-color: var(--primary-black);
    color: var(--primary-white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: var(--primary-white);
}

.footer-section p,
.footer-section a {
    color: #cccccc;
    text-decoration: none;
    line-height: 1.6;
}

.footer-section a:hover {
    color: var(--primary-white);
}

.footer-bottom {
    border-top: 1px solid #444444;
    padding-top: 20px;
    text-align: center;
    color: #cccccc;
    font-size: 14px;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mt-50 { margin-top: 50px; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mb-50 { margin-bottom: 50px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

.hidden { display: none; }
.visible { display: block; }

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 20px var(--shadow-color);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .modal-content {
        margin: 20px;
        padding: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--accent-blue);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 敬请期待状态 */
.coming-soon {
    text-align: center;
    padding: 60px 20px;
    color: var(--medium-gray);
}

.coming-soon h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary-gray);
}

.coming-soon p {
    font-size: 16px;
    line-height: 1.6;
}