/* 首页间距优化 - 极致紧凑布局 */

/* ========================================
   全局间距覆盖
   ======================================== */

/* 减少所有section的内边距 */
section {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
}

/* 减少容器内边距 */
.container,
.features-container,
.workflow-container,
.tools-container,
.testimonial-container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* 减少标题区域间距 */
.section-header {
    margin-bottom: 1.25rem !important;
}

.section-title {
    font-size: 1.875rem !important;
    margin-bottom: 0.375rem !important;
}

.section-subtitle {
    font-size: 0.9375rem !important;
    margin-bottom: 1rem !important;
}

/* 优化卡片间距 */
.features-grid,
.tools-grid,
.tools-grid-horizontal,
.testimonial-grid {
    gap: 0.875rem !important;
}

.feature-card,
.tool-category,
.workflow-step,
.testimonial-card {
    margin-bottom: 0 !important;
}

/* 减少卡片内边距 */
.card-header {
    padding: 1rem !important;
}

.card-content {
    padding: 0 1rem !important;
}

.card-footer {
    padding: 0.875rem 1rem 1rem !important;
}

/* 优化功能卡片高度 */
.feature-card {
    min-height: 320px !important;
}

/* 减少按钮大小和间距 */
.feature-link,
.btn-primary,
.btn-secondary,
.btn-cta-primary,
.btn-cta-secondary {
    padding: 0.5rem 1rem !important;
    font-size: 0.8125rem !important;
}

/* 优化Hero区域 */
.hero-section {
    padding: 16px 0 !important;
}

.hero-title {
    font-size: 2rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.2 !important;
}

/* 确保标题在同一行显示 */
.hero-title-single-line {
    white-space: nowrap !important;
}

/* 在小屏幕上允许换行 */
@media (max-width: 768px) {
    .hero-title-single-line {
        white-space: normal !important;
    }
}

.hero-subtitle {
    font-size: 0.9375rem !important;
    margin-bottom: 1rem !important;
}

/* 优化工作流程步骤 */
.workflow-steps {
    gap: 1rem !important;
}

.step-card {
    padding: 1rem !important;
}

/* 优化列表和网格间距 */
.contract-types,
.feature-highlights,
.pdf-tools-grid,
.document-categories {
    gap: 0.375rem !important;
}

.type-item,
.highlight-item,
.tool-item {
    padding: 0.375rem 0.625rem !important;
    font-size: 0.8125rem !important;
}

/* 优化统计数据 */
.stats-container .stat-item {
    padding: 0.75rem !important;
}

.stat-number {
    font-size: 2rem !important;
}

/* 优化图标大小 */
.feature-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.125rem !important;
}

.category-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
}

/* 优化演示区域 */
.outline-preview,
.analysis-demo,
.writing-preview,
.ai-demo {
    padding: 0.625rem !important;
    margin-bottom: 0.75rem !important;
}

/* 优化底部CTA区域 */
.cta-section {
    padding: 1.25rem !important;
    margin: 1.5rem 0 !important;
}

.cta-title {
    font-size: 1.5rem !important;
    margin-bottom: 0.375rem !important;
}

/* 优化徽章和标签 */
.header-badge,
.featured-badge,
.ai-badge {
    padding: 0.1875rem 0.625rem !important;
    font-size: 0.6875rem !important;
}

/* 优化分隔线间距 */
hr {
    margin: 1rem 0 !important;
}

/* 优化段落间距 */
p {
    margin-bottom: 0.5rem !important;
    line-height: 1.5 !important;
}

/* 优化移动端响应式 */
@media (max-width: 768px) {
    section {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .section-header {
        margin-bottom: 1rem !important;
    }

    .section-title {
        font-size: 1.5rem !important;
    }

    .hero-title {
        font-size: 1.625rem !important;
    }

    .features-grid,
    .tools-grid,
    .testimonial-grid {
        gap: 0.75rem !important;
    }

    .feature-card {
        min-height: auto !important;
    }
}

/* 优化超大屏幕 */
@media (min-width: 1440px) {
    .features-container,
    .workflow-container,
    .tools-container,
    .testimonial-container {
        max-width: 1320px !important;
    }
}

/* 确保紧凑布局不影响可读性 */
.card-content h3 {
    font-size: 1.125rem !important;
    margin-bottom: 0.375rem !important;
}

.card-content p {
    font-size: 0.8125rem !important;
    line-height: 1.5 !important;
}

/* 优化动画元素间距 */
.icon-glow,
.icon-ripple,
.number-glow {
    transform: scale(0.85) !important;
}

/* 减少空白区域 */
.empty-space,
.spacer {
    height: 0.75rem !important;
}

/* 优化横向滚动区域 */
.tools-carousel {
    padding: 0.5rem 0 !important;
}

/* 确保内容不显得拥挤 */
.feature-card:hover,
.tool-category:hover {
    transform: translateY(-3px) !important;
}

/* 优化表单元素间距 */
input,
select,
textarea {
    padding: 0.375rem 0.625rem !important;
    margin-bottom: 0.5rem !important;
}

/* 优化列表项间距 */
ul li,
ol li {
    margin-bottom: 0.375rem !important;
}

/* 确保关键元素仍然突出 */
.featured .feature-card {
    transform: scale(1.005) !important;
}

/* 优化横向架构图间距 */
.hero-architecture-fullwidth {
    padding: 1rem 0 !important;
}

.fullwidth-modules-flow {
    gap: 0.75rem !important;
}

.function-module-expanded {
    padding: 1rem !important;
}

/* 紧凑但清晰的视觉层次 */
h1 { margin-bottom: 0.375rem !important; }
h2 { margin-bottom: 0.375rem !important; }
h3 { margin-bottom: 0.3rem !important; }
h4 { margin-bottom: 0.25rem !important; }

/* 优化工具统计 */
.tools-stats {
    margin-top: 0.75rem !important;
    margin-bottom: 0 !important;
}

.tools-stats .stat-item {
    padding: 0.375rem !important;
}

/* 减少评价卡片间距 */
.testimonial-card {
    padding: 1rem !important;
}

.testimonial-text {
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    margin-bottom: 0.75rem !important;
}

/* 确保紧凑布局下的可访问性 */
a:focus,
button:focus {
    outline-offset: 2px !important;
}

/* 优化加载动画位置 */
.loading,
.spinner {
    margin: 1rem auto !important;
}