/* 
 * XYWMS 前端样式表
 * 版本: 1.0.0
 * 适用于: Windows Server 2022 + IIS 环境
 */

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    font-size: 16px;
}

/* 链接样式 */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 容器 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background: linear-gradient(120deg, #2c3e50, #1a2530);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.logo a {
    color: white;
    text-decoration: none;
}

.logo a:hover {
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: white;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* 首页英雄区域 */
.hero {
    text-align: center;
    padding: 6rem 0;
    background: linear-gradient(rgba(44, 62, 80, 0.85), rgba(44, 62, 80, 0.9)), 
                linear-gradient(45deg, #2c3e50, #3498db);
    color: white;
    margin: 0;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-weight: 300;
}

.hero p {
    font-size: 1.4rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

/* 内容区域 */
.section {
    margin: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 2.2rem;
    color: #2c3e50;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background: #3498db;
}

/* 卡片样式 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.card .date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.card p {
    color: #7f8c8d;
    margin-bottom: 15px;
    line-height: 1.7;
    flex-grow: 1;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* 页脚样式 */
footer {
    background: #2c3e50;
    color: rgba(255,255,255,0.85);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 8px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #3498db;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}

/* 面包屑导航 */
.breadcrumb {
    padding: 15px 0;
    background: #f1f1f1;
    margin-bottom: 30px;
}

.breadcrumb a {
    color: #3498db;
}

.breadcrumb span {
    color: #7f8c8d;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 3px 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination .active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* 警告和提示框 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }

/* 响应式设计 - 在同一文件中包含 */
@media (max-width: 992px) {
    .hero h2 {
        font-size: 2.3rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    nav ul {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section {
        margin: 3rem 0;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    header .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
        background: rgba(44, 62, 80, 0.95);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        margin: 0;
        text-align: center;
    }
    
    nav ul li a {
        display: block;
        padding: 12px 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

@media (max-width: 576px) {
    .container {
        width: 95%;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .btn {
        display: block;
        width: 100%;
        margin-top: 15px;
    }
    
    footer .copyright {
        font-size: 0.85rem;
    }
    
    .pagination a, .pagination span {
        padding: 6px 12px;
        margin: 0 2px 5px;
        font-size: 0.9rem;
    }
}

/* 打印样式 */
@media print {
    header, footer, .breadcrumb, .pagination {
        display: none;
    }
    
    body {
        background: white;
        font-size: 12pt;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
    
    .card {
        page-break-inside: avoid;
    }
}