/* main.css - 全局样式与工具类 */

@import url('variables.css');

/* 容器 */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* 通用区块 */
.section {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
}

.section-light {
    background-color: var(--bg-light);
}

.section-dark {
    background-color: var(--bg-dark);
    color: #ffffff;
}

.section-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #ffffff;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.section-label {
    display: inline-block;
    font-family: var(--font-number);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-color);
    margin-bottom: 16px;
}

.section-dark .section-title,
.section-primary .section-title {
    color: #ffffff;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    text-indent: 2em;
}

.section-dark .section-desc,
.section-primary .section-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* 网格系统 */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

/* 弹性布局 */
.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

/* 间距工具类 */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }
.mt-6 { margin-top: 32px; }
.mt-8 { margin-top: 48px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; }
.mb-6 { margin-bottom: 32px; }
.mb-8 { margin-bottom: 48px; }

/* 文本工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-primary {
    color: var(--primary-color);
}

.text-accent {
    color: var(--accent-color);
}

.text-secondary {
    color: var(--text-secondary);
}

.font-number {
    font-family: var(--font-number);
}

/* 图片占位 */
.img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border: 2px dashed #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    overflow: hidden;
}


/* 滚动显现动画类 */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 页面横幅 */
.page-banner {
    position: relative;
    height: 360px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    overflow: hidden;
    margin-top:80px;
}

.page-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
    background-size: 50px 50px;
    opacity: 1;
}

.page-banner-content {
    position: relative;
    z-index: 1;
}

.page-banner-title {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.page-banner-breadcrumb {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.page-banner-breadcrumb a:hover {
    color: var(--accent-color);
}

.page-banner-breadcrumb span {
    margin: 0 8px;
}

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}
