/* style.css (完整最终版 - 已添加外圈) */

/* --- 1. 全局样式 --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f9;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- 2. 头部样式 --- */
header {
    background-color: #4A90E2;
    color: white;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

main {
    padding: 15px;
}

/* --- 3. 首页组件 --- */

/* 3.1 轮播图样式 */
.slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: #e0e0e0; /* 防止图片加载时出现空白 */
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    box-sizing: border-box;
}

.slide img {
    width: 100%;
    height: 200px;      /* 设置一个固定的高度 */
    display: block;
    object-fit: cover;  /* 保持图片比例，裁剪多余部分 */
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
}

.dot.active {
    background-color: white;
}

/* 3.2 Tab 导航样式 */
.tabs {
    display: flex;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
}

.tab-link {
    flex: 1;
    padding: 15px 10px;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 16px;
    color: #555;
    text-align: center;
    transition: color 0.3s, border-color 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-link.active {
    color: #4A90E2;
    border-bottom-color: #4A90E2;
    font-weight: bold;
}

/* 3.3 Tab 内容与卡片列表样式 */
.tab-content {
    display: none;
    padding-top: 20px;
}

.card-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.card img {
    width: 100%;
    /*height: 110px;*/
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 12px;
}

.card-content h3 {
    margin: 0 0 5px;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-content p {
    margin: 0;
    font-size: 13px;
    color: #777;
    line-height: 1.4;
}

.card-content .card-meta {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    font-weight: 500;
}


/* --- 4. 详情页样式 --- */

/* 4.1 详情页头部 */
.detail-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #4A90E2;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-link {
    font-size: 28px;
    color: white;
    margin-right: 15px;
    line-height: 1;
}

.detail-header h1 {
    margin: 0;
    font-size: 20px;
}

/* 4.2 详情页内容区 */
.detail-container {
    background-color: #fff;
}

.detail-image {
    width: 80%;
    height: auto;
}
.dd{
    display: flex;
    justify-content: center;
}
.detail-content {
    padding: 20px;
}

.detail-content .intro {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

/* 4.3 详情页注册编号信息块 */
.reg-info {
    background-color: #eef5fc;
    border-left: 4px solid #4A90E2;
    padding: 10px 15px;
    margin: 10px 0 20px 0;
    font-size: 14px;
    color: #555;
    border-radius: 0 4px 4px 0;
}

.reg-info strong {
    color: #333;
}

/* 4.4 详情页内容模块 */
.detail-section {
    margin-bottom: 25px;
}

.detail-section h3 {
    font-size: 18px;
    color: #333;
    padding-left: 12px;
    border-left: 4px solid #4A90E2;
    margin-bottom: 15px;
}

.detail-section p, .detail-section li {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
}

.detail-section ul {
    list-style: none;
    padding-left: 0;
}

.detail-section li {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 8px;
}
