/* style.css - 影云CMS 前端样式 */
:root {
    --primary-color: #1976d2;
    --primary-dark: #1565c0;
    --primary-light: #bbdefb;
    --secondary-color: #42a5f5;
    --accent-color: #ff9800;
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-light: #bdbdbd;
    --background: #f8fafc;
    --surface: #ffffff;
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --footer-bg: #263238; /* 灰黑色页脚背景 */
    --footer-text: #b0bec5; /* 页脚文字颜色 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    position: relative;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* —————— 头部导航 —————— */
.site-header {
    background: var(--surface);
    box-shadow: 0 4px 12px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 10px var(--shadow);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* 在中等屏幕及以上设备设置logo左边距 */
@media (min-width: 769px) {
    .logo {
        margin-left: 60px;
    }
}

.logo i {
    margin-right: 10px;
    font-size: 1.5rem;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 25px; /* 圆角导航项 */
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.nav-links a:hover {
    color: white;
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* —————— 轮播图 —————— */
.hero-slider {
    position: relative;
    height: 100vh; /* 高度设为视口高度的100% */
    min-height: 600px; /* 最小高度为600px，防止在小屏幕上过小 */
    overflow: hidden;
    margin-bottom: 3rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px var(--shadow);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.slide-content h2 {
    font-size: 4rem; /* 放大字体 */
    margin-bottom: 0.5rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
    color: var(--primary-color);
}

.slide-content p {
    font-size: 1.6rem; /* 放大描述文字 */
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* —————— 内容区块 —————— */
.about,
.news,
.news-page,
.article-page {
    padding: 4rem 0;
}

h1, h2, h3 {
    margin-bottom: 1.2rem;
    color: var(--text-primary);
    position: relative;
    text-align: center;
}

h1 { 
    font-size: 2.2rem; 
    margin-bottom: 1.5rem;
}

h2 { 
    font-size: 1.8rem; 
    margin-bottom: 1.2rem;
}

h3 { 
    font-size: 1.4rem; 
    margin-bottom: 1rem;
}

h1::after,
h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.news-list {
    display: grid;
    gap: 2rem;
}

.news-item h2 {
    font-size: 1.4rem;
}

.news-item h2 a {
    color: #333;
    text-decoration: none;
}

.news-item h2 a:hover {
    color: #6a11cb;
}

.news-item time {
    color: #777;
    font-size: 0.95rem;
}

/* —————— 文章详情 —————— */
.article-content {
    margin-top: 1.5rem;
    font-size: 1.05rem;
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    margin: 1.8rem 0 1rem;
    color: var(--primary-color);
}

.article-content h1 {
    font-size: 1.8rem;
}

.article-content h2 {
    font-size: 1.6rem;
}

.article-content h3 {
    font-size: 1.4rem;
}

.article-content ul,
.article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    padding-left: 1.2rem;
}

.article-content ul li,
.article-content ol li {
    margin-bottom: 0.8rem;
}

.article-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.article-content em {
    font-style: italic;
    color: var(--text-secondary);
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 0.5rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--primary-light);
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: var(--text-primary);
}

.publish-date {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.back-link {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.back-link a:hover {
    color: var(--primary-dark);
}

/* —————— 页脚 —————— */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 20px;
    margin-top: 5rem;
}

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

.footer-column h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
    text-align: left; /* 左对齐页脚标题 */
}

.footer-column h3::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    bottom: 0;
    left: 0;
    border-radius: 1.5px;
}

.footer-column ul {
    list-style: none;
}

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

.footer-column ul li a {
    color: var(--footer-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-column ul li a:hover {
    color: white;
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icons a:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.copyright {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    color: var(--footer-text);
}

.icp {
    margin-top: 10px;
    font-size: 0.9rem;
}

/* —————— 卡片样式 —————— */
.card {
    background: var(--surface);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* —————— 响应式 —————— */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .logo {
        margin-left: 0; /* 确保移动端无左侧边距 */
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero-slider {
        height: 300px;
    }

    .slide-content {
        padding: 2rem 1rem;
    }

    .slide-content h2 {
        font-size: 1.8rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

    h1 { 
        font-size: 1.8rem; 
    }
    
    h2 { 
        font-size: 1.5rem; 
    }
    
    h3 { 
        font-size: 1.3rem; 
    }

    .article-content {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }

    .news-list {
        gap: 1.8rem;
    }

    .news-item h2 {
        padding: 1rem 1rem 0.5rem;
    }

    .news-item .news-excerpt,
    .news-item time {
        padding: 0 1rem 1rem;
    }
}









