/* 官网样式 - 专业政务风格 */

/* 引入字体 */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* CSS 变量 */
:root {
    /* 主色调 */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    /* 中性色 */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* 功能色 */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    --cta: #f97316;

    /* 语义化颜色 */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #475569;
    --accent-color: #f97316;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;

    /* 阴影 */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* 过渡 */
    --transition-fast: all 0.15s ease;
    --transition-normal: all 0.2s ease;
    --transition-slow: all 0.3s ease;

    /* 布局 */
    --header-height: 72px;
    --container-max: 1200px;
}

/* 重置样式 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

/* 标题字体 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-normal);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* 容器 */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    border: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--gray-300);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-primary);
    border-color: transparent;
}

.btn-ghost:hover {
    background-color: var(--bg-secondary);
}

.btn-white {
    background-color: white;
    color: var(--primary-color);
    border-color: white;
}

.btn-white:hover {
    background-color: var(--gray-50);
    border-color: var(--gray-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* ==================== 头部导航 ==================== */
.portal-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-xs);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-700));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
}

.main-nav a {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.main-nav a:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.main-nav a.active {
    background-color: var(--primary-50);
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-normal);
}

/* ==================== 主内容区域 ==================== */
.portal-main {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height) - 300px);
}

/* ==================== Banner 区域 ==================== */
.banner-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-color) 50%, var(--primary-500) 100%);
    color: white;
    padding: 100px 0;
    overflow: hidden;
}

.banner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.banner-title {
    font-family: 'Poppins', sans-serif;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: white;
}

.banner-subtitle {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 48px;
    line-height: 1.7;
    color: white;
}

.banner-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.banner-actions .btn {
    min-width: 180px;
}

.banner-actions .btn-ghost {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.banner-actions .btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: white;
    color: white;
}

/* ==================== Section 通用样式 ==================== */
.section {
    padding: 100px 0;
}

.section-alt {
    background-color: var(--bg-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 64px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-title p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== 产品亮点网格 ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-200);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 15px;
}

/* ==================== 统计数据区域 ==================== */
.stats-section {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-600) 100%);
    padding: 80px 0;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
    text-align: center;
}

.stat-item h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.stat-item p {
    font-size: 16px;
    opacity: 0.9;
}

/* ==================== CTA 区域 ==================== */
.cta-section {
    background: var(--bg-secondary);
    padding: 100px 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.cta-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== 页脚 ==================== */
.portal-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 80px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--gray-800);
}

.footer-section h4 {
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
}

.footer-section p {
    line-height: 1.8;
    font-size: 14px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: var(--gray-400);
    font-size: 14px;
    transition: var(--transition-normal);
}

.footer-section a:hover {
    color: white;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-info svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-links a {
    color: var(--gray-400);
}

.footer-links a:hover {
    color: white;
}

.footer-links span {
    color: var(--gray-700);
}

/* ==================== 页面标题区域 ==================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-700) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: white;
}

.page-header p {
    font-size: 18px;
    opacity: 0.9;
    color: white;
}

/* ==================== 内容页面 ==================== */
.content-section {
    padding: 80px 0;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.content-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.content-card h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--primary-color);
    letter-spacing: -0.01em;
}

.content-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 16px;
    color: var(--text-primary);
}

.content-card p {
    margin-bottom: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.content-card ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.content-card li {
    margin-bottom: 10px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.content-card li strong {
    color: var(--text-primary);
}

/* ==================== 列表页面 ==================== */
.list-page {
    padding: 80px 0;
}

.list-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.list-tabs a {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-normal);
}

.list-tabs a:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.list-tabs a.active {
    background: var(--primary-color);
    color: white;
}

.list-item {
    display: flex;
    padding: 24px;
    background: white;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
    cursor: pointer;
}

.list-item:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.list-item-content {
    flex: 1;
}

.list-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    transition: var(--transition-normal);
}

.list-item:hover h3 {
    color: var(--primary-color);
}

.list-item p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.list-item-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.list-item-image {
    width: 180px;
    height: 120px;
    margin-left: 24px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}

.list-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.list-item:hover .list-item-image img {
    transform: scale(1.05);
}

/* ==================== 详情页面 ==================== */
.detail-page {
    padding: 80px 0;
}

.detail-header {
    text-align: center;
    margin-bottom: 48px;
}

.detail-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.detail-meta {
    font-size: 14px;
    color: var(--text-muted);
}

.detail-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.detail-content img {
    max-width: 100%;
    margin: 24px 0;
    border-radius: var(--radius-md);
}

/* ==================== 联系表单 ==================== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group label .required {
    color: var(--error);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: 'Open Sans', sans-serif;
    transition: var(--transition-normal);
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-normal);
    cursor: pointer;
}

.pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--primary-50);
}

.pagination .active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ==================== 代码块 ==================== */
.code-block {
    background: var(--gray-900);
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ==================== API 文档卡片 ==================== */
.api-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.api-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.api-card:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-md);
}

.api-card h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

.api-method {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.api-method.get { background: #dcfce7; color: #166534; }
.api-method.post { background: #dbeafe; color: #1e40af; }
.api-method.put { background: #fef3c7; color: #92400e; }
.api-method.delete { background: #fee2e2; color: #991b1b; }

.api-path {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding: 6px 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.api-card p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ==================== 功能表格 ==================== */
.feature-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.feature-table th,
.feature-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.feature-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.feature-table tr:hover td {
    background: var(--bg-secondary);
}

.feature-table td {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== 工具类 ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }

/* ==================== 动画 ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* 响应式动画减少 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
