/* ==========================================
   全局样式设置
   ========================================== */

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

/* 根元素变量定义 - 方便后期修改主题色 */
:root {
    --primary-color: #3b82f6;        /* 主色调：蓝色 */
    --secondary-color: #2563eb;      /* 次要色：深蓝 */
    --accent-color: #60a5fa;         /* 强调色：亮蓝 */
    --text-primary: #1a1a2e;         /* 主文本色 */
    --text-secondary: #4a4a6a;       /* 次要文本色 */
    --background: #fefefe;           /* 背景色 */
    --background-alt: #f8f9fa;       /* 备用背景色 */
    --border-color: #dee2e6;         /* 边框色 */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.15);  /* 阴影效果 */
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);  /* 大阴影 */
}

/* 强制亮色模式，防止系统自动切换到暗色导致黑白灰色 */
html {
    color-scheme: light;
    /* 强制浏览器使用正常色彩渲染 */
    -webkit-filter: none !important;
    filter: none !important;
}

/* 基础文本样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
    background-color: #fefefe;
    /* 强制亮色主题 */
    color-scheme: light;
    /* 强制正常色彩显示。
       注意：这里必须写 none。写成 grayscale(0%) 虽然视觉上完全相同，
       但 filter 只要不是 none，body 就会变成 containing block，
       导致内部 position: fixed 的元素（登录/注册弹窗）不再相对视口
       定位，而是跑到整页的最底部。 */
    -webkit-filter: none !important;
    filter: none !important;
}

/* 容器宽度限制 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 链接样式 */
a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* 图片响应式 */
img {
    max-width: 100%;
    height: auto;
    display: block;
    /* 强制彩色显示 */
    -webkit-filter: grayscale(0%) !important;
    filter: grayscale(0%) !important;
}

/* 图标颜色样式 - 确保彩色显示 */
i {
    /* 强制图标显示颜色，不受系统颜色模式影响 */
    -webkit-filter: grayscale(0%) !important;
    filter: grayscale(0%) !important;
}

/* FontAwesome图标确保彩色 */
.fas,
.fab,
.far {
    -webkit-filter: grayscale(0%) !important;
    filter: grayscale(0%) !important;
}

/* 确保所有彩色元素不被转换为黑白 */
.service-icon,
.booking-icon,
.contact-item i,
.footer-section i {
    -webkit-filter: grayscale(0%) !important;
    filter: grayscale(0%) !important;
}

/* ==========================================
   导航栏样式
   ========================================== */

.header {
    background-color: var(--background);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo样式 */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #3b82f6;
}

.logo i {
    font-size: 2rem;
    color: #3b82f6;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: #3b82f6;
    color: white;
}

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

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

/* ==========================================
   主横幅区域样式
   ========================================== */

.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
}

/* 横幅背景 - 可替换背景图片 */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #60a5fa 100%);
    /* 替换为图片背景的示例：
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    */
    z-index: -1;
}

/* 添加渐变遮罩效果 */
.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s both;
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background-color: white;
    color: #3b82f6;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: white;
    color: #3b82f6;
}

/* ==========================================
   服务区域样式
   ========================================== */

.services {
    padding: 2.25rem 0;
    background-color: var(--background-alt);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* 「我们的主营业务」和「快速访问」整体收紧，
   标题与间距都比全站默认小一档（不影响其它板块） */
.services .section-title,
.quick-links .section-title {
    font-size: 1.6rem;
    margin-bottom: 0.35rem;
}

.services .section-subtitle,
.quick-links .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

/* 服务卡片 */
.service-card {
    background: white;
    padding: 1.1rem 1rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

.service-icon {
    font-size: 1.8rem;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.service-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.service-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================
   快速链接区域样式
   ========================================== */

.quick-links {
    padding: 2.25rem 0;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.link-card {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: white;
    padding: 1.5rem 1.25rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.link-card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.link-card i {
    font-size: 2rem;
    margin-bottom: 0.4rem;
}

.link-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.link-card p {
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    opacity: 0.9;
}

.link-btn {
    display: inline-block;
    padding: 0.45rem 1.25rem;
    background: white;
    color: #3b82f6;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.link-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* ==========================================
   关于我们区域样式
   ========================================== */

.about {
    padding: 5rem 0;
    background-color: var(--background-alt);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-features {
    list-style: none;
    margin-top: 1.5rem;
}

.about-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

.about-features i {
    color: #3b82f6;
    margin-right: 0.5rem;
}

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

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    /* 如果没有图片，显示占位背景 */
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

/* ==========================================
   联系我们区域样式
   ========================================== */

.contact {
    padding: 5rem 0;
}

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

.contact-item {
    text-align: center;
    padding: 2rem;
    background: var(--background-alt);
    border-radius: 8px;
    transition: all 0.3s ease;
}

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

.contact-item i {
    font-size: 2.5rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.contact-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-item p {
    color: var(--text-secondary);
}

/* ==========================================
   页脚样式
   ========================================== */

.footer {
    background-color: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.6;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #3b82f6;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* ==========================================
   页面标题样式（用于下载和博客页面）
   ========================================== */

.page-header {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* ==========================================
   下载页面样式
   ========================================== */

.download-section {
    padding: 3rem 0;
}

/* 下载筛选按钮 */
.download-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: var(--text-primary);
}

.filter-btn:hover,
.filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* 下载卡片网格 */
.download-grid {
    display: grid;
    gap: 1.5rem;
}

.download-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

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

.download-icon {
    font-size: 3rem;
    color: #3b82f6;
    width: 80px;
    text-align: center;
}

.download-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.download-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.download-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.download-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.download-btn {
    padding: 0.75rem 2rem;
    background: #3b82f6;
    color: white;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.download-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 下载说明区域 */
.download-notice {
    padding: 3rem 0;
    background: var(--background-alt);
}

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

.notice-item {
    text-align: center;
    padding: 2rem;
}

.notice-item i {
    font-size: 2.5rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.notice-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.notice-item p {
    color: var(--text-secondary);
}

/* ==========================================
   博客页面样式
   ========================================== */

.blog-section {
    padding: 3rem 0;
}

/* 博客筛选按钮 */
.blog-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* 博客卡片网格 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

/* 博客图片 */
.blog-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    /* 如果没有图片，显示占位背景 */
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* 博客内容 */
.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-title {
    margin-bottom: 1rem;
}

.blog-title a {
    font-size: 1.25rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.blog-title a:hover {
    color: #3b82f6;
}

.blog-excerpt {
    color: #4a4a6a;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-read-more {
    color: #3b82f6;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.blog-read-more:hover {
    gap: 0.75rem;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.page-link:hover:not(.disabled) {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.page-link.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 博客侧边栏 */
.blog-sidebar-section {
    padding: 3rem 0;
    background: var(--background-alt);
}

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

.sidebar-widget {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #1a1a2e;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3b82f6;
}

.popular-posts {
    list-style: none;
}

.popular-posts li {
    margin-bottom: 1rem;
}

.popular-posts a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.popular-posts a:hover {
    color: #3b82f6;
}

.popular-posts i {
    color: #f59e0b;
}

/* 标签云 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: var(--background-alt);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tag:hover {
    background: #3b82f6;
    color: white;
}

/* ==========================================
   动画效果
   ========================================== */

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

/* ==========================================
   响应式设计 - 平板设备
   ========================================== */

@media (max-width: 768px) {
    /* 导航栏响应式 */
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    /* 横幅响应式 */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    /* 关于我们响应式 */
    .about-content {
        grid-template-columns: 1fr;
    }
    
    /* 下载卡片响应式 */
    .download-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .download-meta {
        justify-content: center;
    }
    
    /* 博客卡片响应式 */
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   常用软件官方下载（首页）
   ========================================== */

.official {
    padding: 5rem 0;
    background-color: var(--background);
}

.official-group {
    margin-bottom: 1.1rem;
}

.official-group:last-child {
    margin-bottom: 0;
}

.official-cat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border-color);
}

/* 自适应网格：卡片做得更小，屏幕越宽每行排得越多 */
.official-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 0.35rem;
}

.official-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.3rem 0.5rem;
    background-color: var(--background-alt);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.22s ease;
}

.official-item:hover {
    background-color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.official-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    /* 名称过长时省略，避免把卡片撑高 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.official-desc {
    font-size: 0.68rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.official-item:hover .official-name {
    color: var(--secondary-color);
}

@media (max-width: 640px) {
    .official {
        padding: 3rem 0;
    }

    .official-grid {
        grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    }
}

/* ==========================================
   响应式设计 - 手机设备
   ========================================== */

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .services-grid,
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .download-filters,
    .blog-filters {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
    }
}