/* 홈페이지 전용 스타일 - 미니멀 디자인 */
.homepage {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* 전체 섹션 간격 조정 */
.homepage > section {
    margin-bottom: 2rem;
}

.homepage > section:last-child {
    margin-bottom: 0;
}

/* Hero Section - 미니멀 디자인 */
.hero-section {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: -1rem -1rem 0 -1rem;
    border-radius: 12px 12px 0 0;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-actions .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hero-actions .btn-primary {
    background: white;
    color: #667eea;
    border: 2px solid white;
}

.hero-actions .btn-primary:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
}

.hero-actions .btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}

.hero-actions .btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    transform: translateY(-2px);
}

/* Stats Section - 컴팩트 */
.stats-section {
    padding: 1.5rem 2rem;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    margin: 0 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

/* Content Section */
.content-section {
    padding: 0 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f8f9fa;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.section-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.section-link:hover {
    color: #5a6fd8;
}

/* Document Grid - 컴팩트 */
.documents-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.document-card {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.4rem;
    flex-wrap: nowrap;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: flex-start;
    flex: 1;
    gap: 0.5rem;
    flex-direction: column;
}

.document-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.document-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.document-title a:hover {
    color: #667eea;
}

.card-badges {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
    align-self: flex-start;
    margin-left: auto;
}

.badge {
    padding: 0.15rem 0.4rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-ai {
    background: #e74c3c;
    color: white;
}

.badge-views {
    background: #95a5a6;
    color: white;
}

.document-category {
    margin-bottom: 0;
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
}

.title-and-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
}

.document-title {
    flex: 1;
}

.card-badges {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}

.category-chain {
    font-size: 0.75rem;
    color: #667eea;
    background: #f8f9fa;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    display: inline-block;
    white-space: nowrap;
}

.category-chain a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.category-chain a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

.document-excerpt {
    color: #495057;
    line-height: 1.4;
    font-size: 0.85rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Categories Section */
.categories-section {
    padding: 0 2rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.category-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.category-card h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.category-card h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.category-card h3 a:hover {
    color: #667eea;
}

.category-card p {
    color: #6c757d;
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.3;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        margin: 0 1rem;
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .homepage {
        padding: 0;
    }
    
    .content-section,
    .categories-section {
        padding: 0 1rem;
    }
    
    .hero-section {
        padding: 1.5rem 1rem;
        margin: -1rem -1rem 0 -1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .document-card {
        padding: 0.75rem;
    }
    
    .category-card {
        padding: 0.75rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
}