/* 外贸风险控制手册样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding-top: 80px;
}

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

/* 页面头部 */
header {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1rem;
    min-height: 50vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 工具栏 */
.toolbar {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.search {
    position: relative;
    margin-bottom: 1.5rem;
}

#searchInput {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: #f8f9fa;
    font-family: inherit;
    line-height: 1.4;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

#searchInput::placeholder {
    color: #999;
    opacity: 1;
    font-size: 0.95rem;
    line-height: 1.4;
}

.hint {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 0.9rem;
    pointer-events: none;
}

.tags {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.tag {
    padding: 8px 16px;
    background: #f0f2f5;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
}

.tag:hover {
    background: #667eea;
    color: white;
}

/* 导航 */
nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

nav a {
    color: #667eea;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    transition: all 0.3s;
    font-weight: 600;
}

nav a:hover {
    background: #667eea;
    color: white;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: stretch;
}

/* 统一卡片高度：让列作为flex容器，卡片拉伸填满并以列布局 */
.grid > .col-4,
.grid > .col-6,
.grid > .col-12 {
    display: flex;
    min-width: 0; /* 防止内容撑开导致列变宽 */
}

.grid > .col-4 > .card,
.grid > .col-6 > .card,
.grid > .col-12 > .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.col-4 {
    grid-column: span 4;
}

.col-6 {
    grid-column: span 6;
}

.col-12 {
    grid-column: span 12;
}

/* 卡片样式 */
.card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    border: 1px solid #eee;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

.card li {
    padding: 0.5rem 0;
    color: #666;
    position: relative;
    padding-left: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.card li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 标签样式 */
.labels {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.label {
    padding: 4px 12px;
    background: #f0f2f5;
    color: #667eea;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.label.ok {
    background: #d4edda;
    color: #155724;
}

.label.warn {
    background: #fff3cd;
    color: #856404;
}

.label.bad {
    background: #f8d7da;
    color: #721c24;
}

/* 步骤样式 */
.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.num {
    width: 40px;
    height: 40px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step h3 {
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pill {
    display: inline-block;
    padding: 2px 8px;
    background: #ffd700;
    color: #333;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 详情展开样式 */
details {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    overflow: hidden;
}

summary {
    padding: 1.5rem 2rem;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    transition: background 0.3s;
    border-bottom: 1px solid #eee;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

summary:hover {
    background: #f8f9fa;
}

details[open] summary {
    background: #667eea;
    color: white;
}

details ul {
    padding: 1.5rem 2rem;
    list-style: none;
}

details li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

details li:last-child {
    border-bottom: none;
}

details li.bad {
    color: #721c24;
    font-weight: 500;
}

details li.ok {
    color: #155724;
    font-weight: 500;
}

/* 搜索高亮 */
.highlight {
    background: #ffd700;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* 隐藏搜索结果 */
.hide {
    display: none !important;
}

/* 现代页脚样式（外贸之门专用） */
.site-footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #cbd5e1;
    padding: 3rem 0 2rem 0;
    margin-top: 3rem;
}

.site-footer a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #ffffff;
}

.site-footer .columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    text-align: center;
}

.site-footer .column h3 {
    color: #ffd700;
    font-weight: 700;
    margin-bottom: 1rem;
}

.site-footer .column p {
    color: #aab4c5;
    line-height: 1.7;
}

.site-footer .link-list,
.site-footer .contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.site-footer .qr {
    background: #ffffff;
    padding: 0.75rem;
    border-radius: 12px;
    width: 180px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
    border: 2px solid rgba(255, 215, 0, 0.7);
    margin: 0 auto; /* 水平居中 */
}

.site-footer .qr img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.site-footer .qr-text {
    display: block;
    color: #334155;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 0.5rem;
}

.site-footer .bottom-bar {
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
    color: #9aa6b2;
    font-size: 0.9rem;
}

@media (max-width: 992px) {
    .site-footer .columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .site-footer .columns {
        grid-template-columns: 1fr;
    }
    .site-footer .qr {
        width: 160px;
    }
}


/* 新增：卡片动作与按钮样式 */
.actions {
    margin-top: auto;
    padding-top: 0.75rem;
}

.learn-btn {
    display: inline-block;
    padding: 10px 16px;
    background: #667eea;
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.learn-btn:hover {
    background: #5567d9;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

.learn-btn:active {
    transform: translateY(0);
}

.learn-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .learn-btn {
        padding: 9px 14px;
        border-radius: 8px;
        font-size: 0.95rem;
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .col-4 {
        grid-column: span 6;
    }
    
    .col-6 {
        grid-column: span 12;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header {
        margin: 0 15px 1.5rem 15px;
        padding: 3rem 1rem;
        min-height: 40vh;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    // ... existing code ...
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 0.95rem;
    }
    
    .toolbar {
        padding: 1rem;
    }
    
    #searchInput {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    #searchInput::placeholder {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .hint {
        font-size: 0.8rem;
    }
    
    nav {
        flex-direction: column;
        align-items: center;
    }
    
    nav a {
        width: 200px;
        text-align: center;
    }
    
    .card {
        padding: 1rem;
    }
    
    .card h3 {
        font-size: 1.1rem;
    }
    
    .step h3 {
        font-size: 1rem;
    }
    
    .pill {
        font-size: 0.7rem;
        padding: 1px 6px;
    }
    
    summary {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
    
    details ul {
        padding: 1rem 1.5rem;
    }
    
    details li {
        font-size: 0.9rem;
    }
}

/* 焦点样式 */
#searchInput:focus,
nav a:focus,
.tag:focus,
summary:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
} 