/* ========================================
   赛尔建造师 - 全局样式文件
   现代简约商务风格
   ======================================== */

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

:root {
    --primary-color: #1a5f7a;
    --secondary-color: #2d8b9e;
    --accent-color: #c9a227;
    --text-dark: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    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);
}

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

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

ul, ol {
    list-style: none;
}

.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: 2.5rem;
    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: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

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

/* ========================================
   导航栏样式
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-light);
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 移动端所有页面默认显示汉堡按钮，隐藏导航菜单 */
    .header .nav-menu {
        display: none;
    }
    
    .header .hamburger {
        display: flex;
    }
    
    /* 点击汉堡后显示菜单 */
    .header .nav-menu.active {
        display: flex;
    }
    
    .header .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .header .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .header .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* 桌面端适配：首页始终显示导航，非首页滚动后显示导航 */
@media (min-width: 769px) {
    /* 首页始终显示导航菜单，隐藏汉堡按钮 */
    body.home-page .header .nav-menu {
        display: flex;
    }
    
    body.home-page .header .hamburger {
        display: none;
    }
    
    /* 非首页默认隐藏导航菜单，显示汉堡按钮 */
    body:not(.home-page) .header .nav-menu {
        display: none;
    }
    
    body:not(.home-page) .header .hamburger {
        display: flex;
    }
    
    /* 非首页滚动后显示导航菜单，隐藏汉堡按钮 */
    body:not(.home-page).scrolled-body .header .nav-menu {
        display: flex;
    }
    
    body:not(.home-page).scrolled-body .header .hamburger {
        display: none;
    }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--bg-white);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

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

.nav-link {
    color: var(--bg-white);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

.header.scrolled .nav-link {
    color: var(--text-dark);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

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

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

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

/* 汉堡按钮动画由移动端媒体查询控制 */

/* ========================================
   Banner 样式
   ======================================== */
.banner {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(135deg, rgba(26, 95, 122, 0.9), rgba(45, 139, 158, 0.8)),
                url('../images/banner-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

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

.banner-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.5s;
}

.banner-subtitle {
    font-size: 1.5rem;
    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: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 1.1s;
}

.banner-btn:hover {
    background: #b8931f;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.4);
}

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

/* ========================================
   卡片样式
   ======================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.card-text {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   优势板块样式
   ======================================== */
.features {
    background: var(--bg-light);
}

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

.feature-item {
    text-align: center;
    padding: 40px 30px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.feature-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.feature-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: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-desc {
    color: var(--text-light);
    line-height: 1.7;
}

/* ========================================
   快速入口样式
   ======================================== */
.quick-links {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.quick-links .section-title h2 {
    color: white;
}

.quick-links .section-title h2::after {
    background: var(--accent-color);
}

.quick-links .section-title p {
    color: rgba(255, 255, 255, 0.8);
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.link-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateY(30px);
}

.link-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.link-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.link-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.link-title {
    font-size: 1.2rem;
    font-weight: 600;
}

/* ========================================
   页脚样式
   ======================================== */
.footer {
    background: #1a1a2e;
    color: white;
    padding: 60px 0 30px;
}

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

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    line-height: 2;
}

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

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

/* ========================================
   内页 Banner
   ======================================== */
.page-banner {
    height: 400px;
    background: linear-gradient(135deg, rgba(26, 95, 122, 0.9), rgba(45, 139, 158, 0.8)),
                url('../images/page-banner.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 80px;
}

.page-banner-content h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.page-banner-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ========================================
   新闻列表页样式
   ======================================== */
.news-list-container {
    padding: 60px 0;
}

.news-category-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 10px 25px;
    background: var(--bg-light);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

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

.news-section-block {
    margin-bottom: 60px;
}

.news-section-block h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 4px solid var(--accent-color);
}

/* ========================================
   新闻详情页样式
   ======================================== */
.news-detail-container {
    padding: 60px 0;
}

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

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

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

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

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

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

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

.related-news h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

/* ========================================
   关于我们页面样式
   ======================================== */
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 60px;
}

.about-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.about-text h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transition: var(--transition);
        box-shadow: var(--shadow-medium);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        color: var(--text-dark);
        font-size: 1.3rem;
    }

    .hamburger {
        display: flex;
    }

    .banner-title {
        font-size: 2.5rem;
    }

    .banner-subtitle {
        font-size: 1.2rem;
    }

    .about-intro {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 50px 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .banner-title {
        font-size: 2rem;
    }

    .page-banner {
        height: 300px;
        margin-top: 70px;
    }

    .page-banner-content h1 {
        font-size: 2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .banner-title {
        font-size: 1.6rem;
    }

    .banner-subtitle {
        font-size: 1rem;
    }

    .banner-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .news-category-tabs {
        justify-content: center;
    }

    .category-tab {
        padding: 8px 18px;
        font-size: 0.9rem;
    }
}
