/* 公共样式表 - 所有页面共享的样式 */

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

:root {
    /* 颜色变量 */
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --primary-light: #ebf5fa;
    --secondary-color: #2ecc71;
    --secondary-dark: #27ae60;
    --dark-text: #2c3e50;
    --light-text: #7f8c8d;
    --light-bg: #f5f7fa;
    --white: #ffffff;
    --border-color: #e0e6ed;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--white);
}

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

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 600;
    font-size: 1.2rem;
}

.logo i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--light-text);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark-text);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

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

.primary-btn:hover {
    background-color: var(--primary-dark);
}

.secondary-btn {
    background-color: var(--light-bg);
    color: var(--dark-text);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background-color: var(--border-color);
}

.tertiary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.tertiary-btn:hover {
    background-color: var(--primary-light);
}

/* 页脚样式 */
footer {
    background-color: var(--dark-text);
    color: white;
    padding: 4rem 0 2rem;
}

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

.footer-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-section.about p {
    color: #bdc3c7;
    margin-bottom: 1rem;
}

.socials {
    display: flex;
    gap: 1rem;
}

.socials a {
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #34495e;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.socials a:hover {
    background-color: var(--primary-color);
}

.footer-section.links ul {
    list-style: none;
}

.footer-section.links li {
    margin-bottom: 0.8rem;
}

.footer-section.links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section.links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-section.contact p {
    color: #bdc3c7;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.footer-section.contact i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: #bdc3c7;
}

.footer-policies {
    display: flex;
    gap: 1.5rem;
}

.footer-policies a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* 响应式样式 */
@media (max-width: 768px) {
    /* 导航栏响应式 */
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background-color: var(--white);
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 70px);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        padding: 1.5rem;
    }
    
    .nav-links.show {
        right: 0;
    }
    
    .nav-links li {
        margin: 0 0 1.5rem 0;
    }
    
    .nav-links a {
        font-size: 1.1rem;
    }
    
    /* 页脚响应式 */
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 通用标题样式 */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
}

/* 通用段落样式 */
p {
    margin-bottom: 1rem;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
}

/* 清除浮动 */
.clearfix::after {
    content: '';
    display: table;
    clear: both;
}
