/* 
 * 全局样式文件 - 上海网站建设
 * 现代简约、商务大气、高端质感
 */

/* CSS Reset & 基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a5f7a;
    --secondary-color: #2d8b9e;
    --accent-color: #e8a838;
    --text-dark: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.section-title p {
    color: var(--text-light);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
}

.header.scrolled {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    transition: var(--transition);
}

.header.scrolled .header-inner {
    padding: 15px 0;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--bg-white);
    transition: var(--transition);
}

.header.scrolled .logo {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 35px;
}

.nav-menu li a {
    color: var(--bg-white);
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.header.scrolled .nav-menu li a {
    color: var(--text-dark);
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--bg-white);
    transition: var(--transition);
}

.header.scrolled .hamburger span {
    background: var(--text-dark);
}

/* Banner */
.banner {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--bg-white);
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 50px 50px;
    animation: moveBackground 60s linear infinite;
}

@keyframes moveBackground {
    from { background-position: 0 0; }
    to { background-position: 100% 100%; }
}

.banner-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.banner h1 {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.5s;
}

.banner p {
    font-size: 22px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.8s;
}

.banner-btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--accent-color);
    color: var(--bg-white);
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 1.1s;
}

.banner-btn:hover {
    background: #d4952a;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 服务卡片 */
.services {
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--bg-white);
}

.service-card h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* 优势板块 */
.advantages {
    background: var(--bg-white);
}

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

.advantage-item {
    text-align: center;
    padding: 30px;
}

.advantage-number {
    font-size: 48px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.advantage-item h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.advantage-item p {
    color: var(--text-light);
}

/* 资讯列表 */
.news {
    background: var(--bg-light);
}

.news-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.news-tab {
    padding: 10px 25px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
    font-weight: 500;
}

.news-tab:hover,
.news-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-white);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 25px;
}

.news-title {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-excerpt {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

.news-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-more {
    color: var(--accent-color);
    font-weight: 500;
}

.news-more:hover {
    text-decoration: underline;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--bg-white);
    padding: 60px 0 30px;
}

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

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #ccc;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-contact p {
    color: #ccc;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    color: #999;
}

/* 内页头部 */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 150px 0 80px;
    text-align: center;
    color: var(--bg-white);
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 18px;
    opacity: 0.9;
}

.breadcrumb {
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.8;
}

.breadcrumb a {
    color: var(--bg-white);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 内页内容 */
.page-content {
    padding: 80px 0;
}

.content-section {
    margin-bottom: 60px;
}

.content-section h2 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
}

.content-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* 案例展示 */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.case-card {
    background: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.case-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.case-content {
    padding: 25px;
}

.case-title {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.case-desc {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.case-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.case-tag {
    padding: 5px 15px;
    background: var(--bg-light);
    color: var(--primary-color);
    font-size: 12px;
    border-radius: 20px;
}

/* 团队展示 */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.team-card {
    text-align: center;
    padding: 30px;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--bg-white);
}

.team-name {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.team-position {
    color: var(--accent-color);
    font-size: 14px;
    margin-bottom: 15px;
}

.team-desc {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

/* 联系表单 */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.contact-text p {
    color: var(--text-light);
    font-size: 14px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

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

.submit-btn {
    padding: 15px 40px;
    background: var(--primary-color);
    color: var(--bg-white);
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 新闻列表页 */
.news-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

/* 新闻详情页 */
.news-detail {
    max-width: 900px;
    margin: 0 auto;
}

.news-detail-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.news-detail-title {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.4;
}

.news-detail-meta {
    display: flex;
    gap: 30px;
    color: var(--text-muted);
    font-size: 14px;
}

.news-detail-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-dark);
}

.news-detail-content p {
    margin-bottom: 20px;
}

.news-detail-content img {
    max-width: 100%;
    margin: 30px 0;
    border-radius: 10px;
}

.related-news {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.related-news h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 30px;
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .section {
        padding: 60px 0;
    }
    
    .banner h1 {
        font-size: 42px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        padding: 80px 30px;
        gap: 20px;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li a {
        color: var(--text-dark) !important;
        font-size: 18px;
    }
    
    .banner h1 {
        font-size: 32px;
    }
    
    .banner p {
        font-size: 18px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .services-grid,
    .advantages-grid,
    .news-grid,
    .cases-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        padding: 120px 0 60px;
    }
    
    .page-header h1 {
        font-size: 32px;
    }
    
    .news-detail-title {
        font-size: 24px;
    }
    
    .news-detail-meta {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .banner h1 {
        font-size: 26px;
    }
    
    .banner-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .section-title h2 {
        font-size: 24px;
    }
    
    .service-card,
    .advantage-item {
        padding: 25px 20px;
    }
}
