/* styles.css */

/* 通用样式 */
body {
    font-family: 'Roboto', sans-serif; /* 使用Google Fonts引入的字体 */
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6; /* 淡灰色背景 */
    color: #333;
}

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

/* 头部样式 */
header {
    background-color: #2c3e50; /* 深蓝色背景 */
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 3em;
    letter-spacing: 2px;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* 主要内容区域 */
main {
    padding: 40px 20px;
}

section {
    margin-bottom: 50px;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

section h2 {
    color: #34495e; /* 稍浅的蓝色 */
    font-size: 2em;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
}

/* 资源网格布局 */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 响应式网格 */
    gap: 30px; /* 网格间距 */
}

.resource-item {
    background-color: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-item:hover {
    transform: translateY(-5px); /* 鼠标悬停时上浮效果 */
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.resource-item h3 {
    color: #2980b9; /* 蓝色标题 */
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
}

.resource-item p {
    font-size: 1em;
    color: #555;
    margin-bottom: 20px;
}

/* 按钮样式 */
.button {
    display: inline-block;
    background-color: #3498db; /* 蓝色按钮 */
    color: #fff;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #2980b9; /* 鼠标悬停时颜色变深 */
}

/* 底部样式 */
footer {
    background-color: #34495e; /* 深灰色背景 */
    color: #fff;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    margin-top: 50px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5em;
    }

    section {
        padding: 20px;
    }

    .resource-grid {
        grid-template-columns: 1fr; /* 小屏幕下堆叠显示 */
    }
}

/* 新增样式 */

/* 表单样式 */
form {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

input, textarea, select {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    max-height: 70vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* FAQ样式 */
.faq-item {
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.faq-question {
    background-color: #f8f9fa;
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
    color: #2c3e50;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #e9ecef;
}

.faq-answer {
    padding: 15px;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
}

/* 时间轴样式 */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline-item {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #3498db;
    transition: width 0.3s ease;
}

/* 搜索框样式 */
.search-box {
    position: relative;
    margin-bottom: 30px;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

/* 文章样式 */
article {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

article h3 {
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 15px;
}

article .meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* 标签样式 */
.tag {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* 卡片悬停效果增强 */
.resource-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.resource-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    background-color: #f8f9fa;
}

/* 按钮变体 */
.button.secondary {
    background-color: #95a5a6;
    color: white;
}

.button.secondary:hover {
    background-color: #7f8c8d;
}

.button.success {
    background-color: #27ae60;
    color: white;
}

.button.success:hover {
    background-color: #219a52;
}

.button.danger {
    background-color: #e74c3c;
    color: white;
}

.button.danger:hover {
    background-color: #c0392b;
}

/* 通知样式 */
.notification {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
    background-color: #d4edda;
    color: #155724;
}

.notification.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式表格 */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}

tr:hover {
    background-color: #f5f5f5;
}

/* 网格增强 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 0;
    margin-bottom: 20px;
    list-style: none;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    padding: 0 10px;
    color: #666;
}

.breadcrumb-item a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #666;
}