/**
 * 2026企业CMS - 默认模板样式表
 * 蓝色科技风格 - 响应式设计
 */

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

body {
    font-family: 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

a {
    color: #2c82e0;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #1a6bc4;
}

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

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

/* ============================================
   顶部信息栏
   ============================================ */
.top-bar {
    background: #2c82e0;
    color: #fff;
    padding: 8px 0;
    font-size: 12px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar .top-right span {
    margin-left: 20px;
}

/* ============================================
   导航栏
   ============================================ */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 50px;
}

.logo h1 {
    font-size: 24px;
    color: #2c82e0;
}

.slogan {
    color: #666;
    font-size: 12px;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav a {
    display: block;
    padding: 10px 15px;
    color: #333;
    font-size: 15px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav a:hover,
.nav li.active a {
    background: #2c82e0;
    color: #fff;
}

/* ============================================
   多级下拉菜单
   ============================================ */
.menu-item-has-children {
    position: relative;
}

.menu-item-has-children > a::after {
    content: ' ▼';
    font-size: 10px;
}

.menu-item-has-children:hover > .sub-menu {
    display: block;
}

.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 1001;
    list-style: none;
    padding: 5px 0;
}

.sub-menu li {
    position: relative;
}

.sub-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-size: 14px;
    border-radius: 0;
}

.sub-menu a:hover {
    background: #f8f9fa;
    color: #2c82e0;
}

.sub-menu .menu-item-has-children > a::after {
    content: ' ▶';
    float: right;
}

.sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 0;
}

@media (max-width: 768px) {
    .menu-item-has-children:hover > .sub-menu {
        display: none;
    }
    
    .menu-item-has-children.active > .sub-menu {
        display: block;
    }
    
    .sub-menu {
        position: static;
        box-shadow: none;
        padding-left: 20px;
    }
    
    .sub-menu .sub-menu {
        padding-left: 20px;
    }
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

/* ============================================
   搜索框
   ============================================ */
.search-bar {
    background: #f0f0f0;
    padding: 10px 0;
}

.search-bar form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
}

.search-bar input {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-bar button {
    padding: 8px 20px;
    background: #2c82e0;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* ============================================
   幻灯片/轮播图
   ============================================ */
.slider {
    position: relative;
    height: 400px;
    overflow: hidden;
    background: #2c82e0;
}

.slide-item {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    opacity: 0;
    transition: opacity 1s;
}

.slide-item.active {
    opacity: 1;
}

.slide-item h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.slide-item p {
    font-size: 20px;
    margin-bottom: 30px;
}

.slide-item .btn {
    display: inline-block;
    padding: 12px 30px;
    background: #fff;
    color: #2c82e0;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
}

/* ============================================
   主内容区
   ============================================ */
.main-content {
    padding: 40px 0;
    min-height: 500px;
}

.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 28px;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #2c82e0;
}

/* ============================================
   首页产品/新闻/案例展示
   ============================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-img {
    height: 200px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.card-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.card-meta {
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

/* ============================================
   文章列表
   ============================================ */
.article-list {
    display: grid;
    gap: 20px;
}

.article-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.article-thumb {
    width: 250px;
    flex-shrink: 0;
    overflow: hidden;
}

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

.article-info {
    padding: 20px;
    flex: 1;
}

.article-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.article-summary {
    color: #666;
    margin-bottom: 10px;
}

.article-meta {
    color: #999;
    font-size: 12px;
}

/* ============================================
   文章详情
   ============================================ */
.article-detail {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.article-detail .title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.article-detail .meta {
    color: #999;
    font-size: 14px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-detail .content {
    line-height: 1.8;
    font-size: 16px;
}

.article-detail .content img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   侧边栏
   ============================================ */
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.widget {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.widget-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c82e0;
}

/* ============================================
   联系表单
   ============================================ */
.contact-form {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c82e0;
}

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #2c82e0;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #1a6bc4;
}

/* ============================================
   分页
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
}

.pagination span.current {
    background: #2c82e0;
    color: #fff;
    border-color: #2c82e0;
}

/* ============================================
   面包屑导航
   ============================================ */
.breadcrumb {
    padding: 15px 0;
    color: #666;
    font-size: 14px;
}

.breadcrumb a {
    color: #2c82e0;
}

.breadcrumb span {
    color: #333;
}

/* ============================================
   底部
   ============================================ */
.footer {
    background: #333;
    color: #fff;
    padding: 40px 0 0;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-bottom: 40px;
}

.footer h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c82e0;
}

.footer ul {
    list-style: none;
}

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

.footer ul a {
    color: #ccc;
}

.footer ul a:hover {
    color: #fff;
}

.footer-bottom {
    background: #222;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
}

.footer-bottom a {
    color: #ccc;
}

/* ============================================
   返回顶部
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2c82e0;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: background 0.3s;
    z-index: 999;
}

.back-to-top:hover {
    background: #1a6bc4;
}

/* ============================================
   提示信息
   ============================================ */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .header .container {
        flex-wrap: wrap;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-top: 15px;
    }
    
    .nav ul.show {
        display: flex;
    }
    
    .slider {
        height: 250px;
    }
    
    .slide-item h2 {
        font-size: 28px;
    }
    
    .article-item {
        flex-direction: column;
    }
    
    .article-thumb {
        width: 100%;
        height: 200px;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        width: 100%;
        margin-top: 30px;
    }
}
